Update PyQt bindings to 4.3.0 (#622)

This commit is contained in:
Nicolas Elie 2024-04-03 23:49:08 +02:00 committed by GitHub
parent 8da0713bf0
commit d7e6c613c6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 39 additions and 7 deletions

View File

@ -12,10 +12,14 @@ class CTitleBarButton : QToolButton
%End %End
public: public:
CTitleBarButton(bool visible = true, QWidget* parent /TransferThis/ = Q_NULLPTR ); CTitleBarButton(bool ShowInTitleBar, bool HideWhenDisabled, TitleBarButton ButtonId,
QWidget* /TransferThis/ = Q_NULLPTR );
virtual void setVisible(bool); virtual void setVisible(bool);
void setShowInTitleBar(bool); void setShowInTitleBar(bool);
TitleBarButton buttonId() const;
ads::CDockAreaTitleBar* titleBar() const;
bool isInAutoHideArea() const;
protected: protected:
bool event(QEvent *ev); bool event(QEvent *ev);
@ -44,13 +48,15 @@ public:
ads::CDockAreaTabBar* tabBar() const; ads::CDockAreaTabBar* tabBar() const;
ads::CTitleBarButton* button(ads::TitleBarButton which) const; ads::CTitleBarButton* button(ads::TitleBarButton which) const;
ads::CElidingLabel* autoHideTitleLabel() const; ads::CElidingLabel* autoHideTitleLabel() const;
ads::CDockAreaWidget* dockAreaWidget() const;
void updateDockWidgetActionsButtons(); void updateDockWidgetActionsButtons();
virtual void setVisible(bool Visible); virtual void setVisible(bool Visible);
void insertWidget(int index, QWidget *widget /Transfer/ ); void insertWidget(int index, QWidget *widget /Transfer/ );
int indexOf(QWidget *widget) const; int indexOf(QWidget *widget) const;
QString titleBarButtonToolTip(ads::TitleBarButton Button) const; QString titleBarButtonToolTip(ads::TitleBarButton Button) const;
void setAreaFloating(); void setAreaFloating();
void showAutoHideControls(bool Show);
bool isAutoHide() const;
signals: signals:
void tabBarClicked(int index); void tabBarClicked(int index);

View File

@ -41,6 +41,7 @@ public:
ads::CDockManager* dockManager() const; ads::CDockManager* dockManager() const;
ads::CDockContainerWidget* dockContainer() const; ads::CDockContainerWidget* dockContainer() const;
ads::CAutoHideDockContainer* autoHideDockContainer() const; ads::CAutoHideDockContainer* autoHideDockContainer() const;
ads::CDockSplitter* parentSplitter() const;
bool isAutoHide() const; bool isAutoHide() const;
void setAutoHideDockContainer(CAutoHideDockContainer*); void setAutoHideDockContainer(CAutoHideDockContainer*);
virtual QSize minimumSizeHint() const; virtual QSize minimumSizeHint() const;

View File

@ -20,13 +20,14 @@ class CDockContainerWidget : QFrame
protected: protected:
virtual bool event(QEvent *e); virtual bool event(QEvent *e);
QSplitter* rootSplitter() const; ads::CDockSplitter* rootSplitter() const;
ads::CAutoHideDockContainer* createAndSetupAutoHideContainer(ads::SideBarLocation area, ads::CDockWidget* DockWidget /Transfer/, int TabIndex = -1); ads::CAutoHideDockContainer* createAndSetupAutoHideContainer(ads::SideBarLocation area, ads::CDockWidget* DockWidget /Transfer/, int TabIndex = -1);
void createRootSplitter(); void createRootSplitter();
void dropFloatingWidget(ads::CFloatingDockContainer* FloatingWidget, const QPoint& TargetPos); void dropFloatingWidget(ads::CFloatingDockContainer* FloatingWidget, const QPoint& TargetPos);
void dropWidget(QWidget* Widget, DockWidgetArea DropArea, CDockAreaWidget* TargetAreaWidget, int TabIndex = -1); void dropWidget(QWidget* Widget, DockWidgetArea DropArea, CDockAreaWidget* TargetAreaWidget, int TabIndex = -1);
void addDockArea(ads::CDockAreaWidget* DockAreaWidget /Transfer/, ads::DockWidgetArea area = ads::CenterDockWidgetArea); void addDockArea(ads::CDockAreaWidget* DockAreaWidget /Transfer/, ads::DockWidgetArea area = ads::CenterDockWidgetArea);
void removeDockArea(ads::CDockAreaWidget* area /TransferBack/); void removeDockArea(ads::CDockAreaWidget* area /TransferBack/);
/*QList<QPointer<ads::CDockAreaWidget>> removeAllDockAreas();*/
void saveState(QXmlStreamWriter& Stream) const; void saveState(QXmlStreamWriter& Stream) const;
bool restoreState(CDockingStateReader& Stream, bool Testing); bool restoreState(CDockingStateReader& Stream, bool Testing);
ads::CDockAreaWidget* lastAddedDockAreaWidget(ads::DockWidgetArea area) const; ads::CDockAreaWidget* lastAddedDockAreaWidget(ads::DockWidgetArea area) const;

View File

@ -172,6 +172,8 @@ public:
FloatingContainerForceNativeTitleBar, FloatingContainerForceNativeTitleBar,
FloatingContainerForceQWidgetTitleBar, FloatingContainerForceQWidgetTitleBar,
MiddleMouseButtonClosesTab, MiddleMouseButtonClosesTab,
DisableTabTextEliding,
ShowTabTextOnlyForActiveTab,
DefaultDockAreaButtons, DefaultDockAreaButtons,
DefaultBaseConfig, DefaultBaseConfig,
DefaultOpaqueConfig, DefaultOpaqueConfig,
@ -188,6 +190,8 @@ public:
AutoHideSideBarsIconOnly, AutoHideSideBarsIconOnly,
AutoHideShowOnMouseOver, AutoHideShowOnMouseOver,
AutoHideCloseButtonCollapsesDock, AutoHideCloseButtonCollapsesDock,
AutoHideHasCloseButton,
AutoHideHasMinimizeButton,
DefaultAutoHideConfig, DefaultAutoHideConfig,
}; };
typedef QFlags<ads::CDockManager::eAutoHideFlag> AutoHideFlags; typedef QFlags<ads::CDockManager::eAutoHideFlag> AutoHideFlags;
@ -245,6 +249,12 @@ public:
void setSplitterSizes(ads::CDockAreaWidget *ContainedArea, const QList<int>& sizes); void setSplitterSizes(ads::CDockAreaWidget *ContainedArea, const QList<int>& sizes);
static void setFloatingContainersTitle(const QString& Title); static void setFloatingContainersTitle(const QString& Title);
static QString floatingContainersTitle(); static QString floatingContainersTitle();
void setDockWidgetToolBarStyle(Qt::ToolButtonStyle Style, ads::CDockWidget::eState State);
Qt::ToolButtonStyle dockWidgetToolBarStyle(ads::CDockWidget::eState State) const;
void setDockWidgetToolBarIconSize(const QSize& IconSize, ads::CDockWidget::eState State);
QSize dockWidgetToolBarIconSize(ads::CDockWidget::eState State) const;
ads::CDockWidget::DockWidgetFeatures globallyLockedDockWidgetFeatures() const;
void lockDockWidgetFeaturesGlobally(ads::CDockWidget::DockWidgetFeatures Features = ads::CDockWidget::GloballyLockableFeatures);
public slots: public slots:
void endLeavingMinimizedState(); void endLeavingMinimizedState();

View File

@ -39,6 +39,7 @@ public:
DefaultDockWidgetFeatures, DefaultDockWidgetFeatures,
AllDockWidgetFeatures, AllDockWidgetFeatures,
DockWidgetAlwaysCloseAndDelete, DockWidgetAlwaysCloseAndDelete,
GloballyLockableFeatures,
NoDockWidgetFeatures NoDockWidgetFeatures
}; };
typedef QFlags<ads::CDockWidget::DockWidgetFeature> DockWidgetFeatures; typedef QFlags<ads::CDockWidget::DockWidgetFeature> DockWidgetFeatures;
@ -50,6 +51,12 @@ public:
StateFloating StateFloating
}; };
enum eToolBarStyleSource
{
ToolBarStyleFromDockManager,
ToolBarStyleFromDockWidget
};
enum eInsertMode enum eInsertMode
{ {
AutoScrollArea, AutoScrollArea,
@ -72,7 +79,7 @@ public:
}; };
CDockWidget(const QString &title, QWidget* parent /TransferThis/ = 0); CDockWidget(const QString &title, QWidget* parent /TransferThis/ = Q_NULLPTR);
virtual ~CDockWidget(); virtual ~CDockWidget();
virtual QSize minimumSizeHint() const; virtual QSize minimumSizeHint() const;
void setWidget(QWidget* widget /Transfer/, ads::CDockWidget::eInsertMode InsertMode = AutoScrollArea); void setWidget(QWidget* widget /Transfer/, ads::CDockWidget::eInsertMode InsertMode = AutoScrollArea);
@ -82,6 +89,7 @@ public:
void setFeatures(ads::CDockWidget::DockWidgetFeatures features); void setFeatures(ads::CDockWidget::DockWidgetFeatures features);
void setFeature(ads::CDockWidget::DockWidgetFeature flag, bool on); void setFeature(ads::CDockWidget::DockWidgetFeature flag, bool on);
ads::CDockWidget::DockWidgetFeatures features() const; ads::CDockWidget::DockWidgetFeatures features() const;
void notifyFeaturesChanged();
ads::CDockManager* dockManager() const; ads::CDockManager* dockManager() const;
ads::CDockContainerWidget* dockContainer() const; ads::CDockContainerWidget* dockContainer() const;
ads::CFloatingDockContainer* floatingDockContainer() const; ads::CFloatingDockContainer* floatingDockContainer() const;
@ -95,6 +103,7 @@ public:
bool isInFloatingContainer() const; bool isInFloatingContainer() const;
bool isClosed() const; bool isClosed() const;
QAction* toggleViewAction() const; QAction* toggleViewAction() const;
void setToggleViewAction(QAction* action);
void setToggleViewActionMode(ads::CDockWidget::eToggleViewActionMode Mode); void setToggleViewActionMode(ads::CDockWidget::eToggleViewActionMode Mode);
void setMinimumSizeHintMode(ads::CDockWidget::eMinimumSizeHintMode Mode); void setMinimumSizeHintMode(ads::CDockWidget::eMinimumSizeHintMode Mode);
ads::CDockWidget::eMinimumSizeHintMode minimumSizeHintMode() const; ads::CDockWidget::eMinimumSizeHintMode minimumSizeHintMode() const;
@ -104,6 +113,8 @@ public:
QToolBar* toolBar() const; QToolBar* toolBar() const;
QToolBar* createDefaultToolBar(); QToolBar* createDefaultToolBar();
void setToolBar(QToolBar* ToolBar /Transfer/ ); void setToolBar(QToolBar* ToolBar /Transfer/ );
void setToolBarStyleSource(ads::CDockWidget::eToolBarStyleSource Source);
ads::CDockWidget::eToolBarStyleSource toolBarStyleSource() const;
void setToolBarStyle(Qt::ToolButtonStyle Style, ads::CDockWidget::eState State); void setToolBarStyle(Qt::ToolButtonStyle Style, ads::CDockWidget::eState State);
Qt::ToolButtonStyle toolBarStyle(ads::CDockWidget::eState State) const; Qt::ToolButtonStyle toolBarStyle(ads::CDockWidget::eState State) const;
void setToolBarIconSize(const QSize& IconSize, ads::CDockWidget::eState State); void setToolBarIconSize(const QSize& IconSize, ads::CDockWidget::eState State);

View File

@ -17,8 +17,8 @@ protected:
virtual void mouseDoubleClickEvent( QMouseEvent *ev ); virtual void mouseDoubleClickEvent( QMouseEvent *ev );
public: public:
CElidingLabel(QWidget* parent /TransferThis/ = 0, Qt::WindowFlags f = 0); CElidingLabel(QWidget* parent /TransferThis/ = Q_NULLPTR, Qt::WindowFlags f = Qt::WindowFlags ());
CElidingLabel(const QString& text, QWidget* parent /TransferThis/ = 0, Qt::WindowFlags f = 0); CElidingLabel(const QString& text, QWidget* parent /TransferThis/ = Q_NULLPTR, Qt::WindowFlags f = Qt::WindowFlags ());
virtual ~CElidingLabel(); virtual ~CElidingLabel();
Qt::TextElideMode elideMode() const; Qt::TextElideMode elideMode() const;
void setElideMode(Qt::TextElideMode mode); void setElideMode(Qt::TextElideMode mode);

View File

@ -44,6 +44,7 @@ protected:
void startDragging(const QPoint& DragStartMousePos, const QSize& Size, void startDragging(const QPoint& DragStartMousePos, const QSize& Size,
QWidget* MouseEventHandler); QWidget* MouseEventHandler);
virtual void finishDragging(); virtual void finishDragging();
void deleteContent();
void initFloatingGeometry(const QPoint& DragStartMousePos, const QSize& Size); void initFloatingGeometry(const QPoint& DragStartMousePos, const QSize& Size);
void moveFloating(); void moveFloating();
bool restoreState(ads::CDockingStateReader& Stream, bool Testing); bool restoreState(ads::CDockingStateReader& Stream, bool Testing);
@ -82,6 +83,7 @@ public:
bool hasTopLevelDockWidget() const; bool hasTopLevelDockWidget() const;
ads::CDockWidget* topLevelDockWidget() const; ads::CDockWidget* topLevelDockWidget() const;
QList<ads::CDockWidget*> dockWidgets() const; QList<ads::CDockWidget*> dockWidgets() const;
void finishDropOperation();
%If (WS_X11) %If (WS_X11)
void onMaximizeRequest(); void onMaximizeRequest();

View File

@ -73,7 +73,8 @@ namespace ads
TitleBarButtonTabsMenu, TitleBarButtonTabsMenu,
TitleBarButtonUndock, TitleBarButtonUndock,
TitleBarButtonClose, TitleBarButtonClose,
TitleBarButtonAutoHide TitleBarButtonAutoHide,
TitleBarButtonMinimize
}; };
enum eDragState enum eDragState