Skip to content

Commit

Permalink
Update PyQt bindings to 4.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
n-elie committed Apr 3, 2024
1 parent 8da0713 commit c08bf82
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 7 deletions.
10 changes: 8 additions & 2 deletions sip/DockAreaTitleBar.sip
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@ class CTitleBarButton : QToolButton
%End

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);
void setShowInTitleBar(bool);

TitleBarButton buttonId() const;
ads::CDockAreaTitleBar* titleBar() const;
bool isInAutoHideArea() const;

protected:
bool event(QEvent *ev);
Expand Down Expand Up @@ -44,13 +48,15 @@ public:
ads::CDockAreaTabBar* tabBar() const;
ads::CTitleBarButton* button(ads::TitleBarButton which) const;
ads::CElidingLabel* autoHideTitleLabel() const;
ads::CDockAreaWidget* dockAreaWidget() const;
void updateDockWidgetActionsButtons();
virtual void setVisible(bool Visible);
void insertWidget(int index, QWidget *widget /Transfer/ );
int indexOf(QWidget *widget) const;
QString titleBarButtonToolTip(ads::TitleBarButton Button) const;
void setAreaFloating();

void showAutoHideControls(bool Show);
bool isAutoHide() const;

signals:
void tabBarClicked(int index);
Expand Down
1 change: 1 addition & 0 deletions sip/DockAreaWidget.sip
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public:
ads::CDockManager* dockManager() const;
ads::CDockContainerWidget* dockContainer() const;
ads::CAutoHideDockContainer* autoHideDockContainer() const;
ads::CDockSplitter* parentSplitter() const;
bool isAutoHide() const;
void setAutoHideDockContainer(CAutoHideDockContainer*);
virtual QSize minimumSizeHint() const;
Expand Down
3 changes: 2 additions & 1 deletion sip/DockContainerWidget.sip
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@ class CDockContainerWidget : QFrame

protected:
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);
void createRootSplitter();
void dropFloatingWidget(ads::CFloatingDockContainer* FloatingWidget, const QPoint& TargetPos);
void dropWidget(QWidget* Widget, DockWidgetArea DropArea, CDockAreaWidget* TargetAreaWidget, int TabIndex = -1);
void addDockArea(ads::CDockAreaWidget* DockAreaWidget /Transfer/, ads::DockWidgetArea area = ads::CenterDockWidgetArea);
void removeDockArea(ads::CDockAreaWidget* area /TransferBack/);
QList<QPointer<ads::CDockAreaWidget>> removeAllDockAreas();
void saveState(QXmlStreamWriter& Stream) const;
bool restoreState(CDockingStateReader& Stream, bool Testing);
ads::CDockAreaWidget* lastAddedDockAreaWidget(ads::DockWidgetArea area) const;
Expand Down
10 changes: 10 additions & 0 deletions sip/DockManager.sip
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@ public:
FloatingContainerForceNativeTitleBar,
FloatingContainerForceQWidgetTitleBar,
MiddleMouseButtonClosesTab,
DisableTabTextEliding,
ShowTabTextOnlyForActiveTab,
DefaultDockAreaButtons,
DefaultBaseConfig,
DefaultOpaqueConfig,
Expand All @@ -188,6 +190,8 @@ public:
AutoHideSideBarsIconOnly,
AutoHideShowOnMouseOver,
AutoHideCloseButtonCollapsesDock,
AutoHideHasCloseButton,
AutoHideHasMinimizeButton,
DefaultAutoHideConfig,
};
typedef QFlags<ads::CDockManager::eAutoHideFlag> AutoHideFlags;
Expand Down Expand Up @@ -245,6 +249,12 @@ public:
void setSplitterSizes(ads::CDockAreaWidget *ContainedArea, const QList<int>& sizes);
static void setFloatingContainersTitle(const QString& Title);
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:
void endLeavingMinimizedState();
Expand Down
13 changes: 12 additions & 1 deletion sip/DockWidget.sip
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public:
DefaultDockWidgetFeatures,
AllDockWidgetFeatures,
DockWidgetAlwaysCloseAndDelete,
GloballyLockableFeatures,
NoDockWidgetFeatures
};
typedef QFlags<ads::CDockWidget::DockWidgetFeature> DockWidgetFeatures;
Expand All @@ -49,6 +50,12 @@ public:
StateDocked,
StateFloating
};

enum eToolBarStyleSource
{
ToolBarStyleFromDockManager,
ToolBarStyleFromDockWidget
};

enum eInsertMode
{
Expand All @@ -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 QSize minimumSizeHint() const;
void setWidget(QWidget* widget /Transfer/, ads::CDockWidget::eInsertMode InsertMode = AutoScrollArea);
Expand All @@ -82,6 +89,7 @@ public:
void setFeatures(ads::CDockWidget::DockWidgetFeatures features);
void setFeature(ads::CDockWidget::DockWidgetFeature flag, bool on);
ads::CDockWidget::DockWidgetFeatures features() const;
void notifyFeaturesChanged();
ads::CDockManager* dockManager() const;
ads::CDockContainerWidget* dockContainer() const;
ads::CFloatingDockContainer* floatingDockContainer() const;
Expand All @@ -95,6 +103,7 @@ public:
bool isInFloatingContainer() const;
bool isClosed() const;
QAction* toggleViewAction() const;
void setToggleViewAction(QAction* action);
void setToggleViewActionMode(ads::CDockWidget::eToggleViewActionMode Mode);
void setMinimumSizeHintMode(ads::CDockWidget::eMinimumSizeHintMode Mode);
ads::CDockWidget::eMinimumSizeHintMode minimumSizeHintMode() const;
Expand All @@ -104,6 +113,8 @@ public:
QToolBar* toolBar() const;
QToolBar* createDefaultToolBar();
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);
Qt::ToolButtonStyle toolBarStyle(ads::CDockWidget::eState State) const;
void setToolBarIconSize(const QSize& IconSize, ads::CDockWidget::eState State);
Expand Down
4 changes: 2 additions & 2 deletions sip/ElidingLabel.sip
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ protected:
virtual void mouseDoubleClickEvent( QMouseEvent *ev );

public:
CElidingLabel(QWidget* parent /TransferThis/ = 0, Qt::WindowFlags f = 0);
CElidingLabel(const QString& text, QWidget* parent /TransferThis/ = 0, Qt::WindowFlags f = 0);
CElidingLabel(QWidget* parent /TransferThis/ = void notifyFeaturesChanged();, Qt::WindowFlags f = Qt::WindowFlags ());
CElidingLabel(const QString& text, QWidget* parent /TransferThis/ = void notifyFeaturesChanged();, Qt::WindowFlags f = Qt::WindowFlags ());
virtual ~CElidingLabel();
Qt::TextElideMode elideMode() const;
void setElideMode(Qt::TextElideMode mode);
Expand Down
2 changes: 2 additions & 0 deletions sip/FloatingDockContainer.sip
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public:

virtual void moveFloating() = 0;
virtual void finishDragging() = 0;
void deleteContent();
virtual ~IFloatingWidget();
};

Expand Down Expand Up @@ -82,6 +83,7 @@ public:
bool hasTopLevelDockWidget() const;
ads::CDockWidget* topLevelDockWidget() const;
QList<ads::CDockWidget*> dockWidgets() const;
void finishDropOperation();

%If (WS_X11)
void onMaximizeRequest();
Expand Down
3 changes: 2 additions & 1 deletion sip/ads_globals.sip
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ namespace ads
TitleBarButtonTabsMenu,
TitleBarButtonUndock,
TitleBarButtonClose,
TitleBarButtonAutoHide
TitleBarButtonAutoHide,
TitleBarButtonMinimize
};

enum eDragState
Expand Down

0 comments on commit c08bf82

Please sign in to comment.