From db16c5f1b5709f490a4426a08c39ab43bacedafc Mon Sep 17 00:00:00 2001 From: Nicolas Elie <40382614+n-elie@users.noreply.github.com> Date: Tue, 21 Mar 2023 06:04:19 +0100 Subject: [PATCH] Update python bindings to 4.0.2 (#495) * start adaption of PyQt5 bindings to Qt-ADS 4.0 * Update PyQt bindings * Fix Python bindings build on Linux --------- Co-authored-by: Mira Weller --- pyproject.toml | 20 +++++-- sip/AutoHideDockContainer.sip | 46 ++++++++++++++ sip/AutoHideSideBar.sip | 41 +++++++++++++ sip/AutoHideTab.sip | 36 +++++++++++ sip/DockAreaTitleBar.sip | 2 + sip/DockAreaWidget.sip | 5 ++ sip/DockComponentsFactory.sip | 1 + sip/DockContainerWidget.sip | 109 +++++----------------------------- sip/DockFocusController.sip | 1 + sip/DockManager.sip | 29 ++++++++- sip/DockWidget.sip | 8 +++ sip/FloatingDockContainer.sip | 1 + sip/FloatingDragPreview.sip | 3 +- sip/PushButton.sip | 31 ++++++++++ sip/ResizeHandle.sip | 36 +++++++++++ sip/ads.sip | 5 ++ sip/ads_globals.sip | 16 ++++- 17 files changed, 283 insertions(+), 107 deletions(-) create mode 100644 sip/AutoHideDockContainer.sip create mode 100644 sip/AutoHideSideBar.sip create mode 100644 sip/AutoHideTab.sip create mode 100644 sip/PushButton.sip create mode 100644 sip/ResizeHandle.sip diff --git a/pyproject.toml b/pyproject.toml index 825aa90..027d09d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,12 +1,12 @@ # Specify the build system. [build-system] -requires = ["sip >=6.0.2, <6.6", "PyQt-builder >=1.6, <2", "PyQt5>=5.15.4", "PyQt5-sip<13,>=12.8"] +requires = ["sip >=6.0.2, <6.3", "PyQt-builder >=1.6, <2", "PyQt5==5.15.4", "PyQt5-sip<13,>=12.8"] build-backend = "sipbuild.api" # Specify the PEP 566 metadata for the project. [tool.sip.metadata] name = "PyQtAds" -version = "3.8.2" +version = "4.0.2" summary = "Python bindings for Qt Advanced Docking System" home-page = "https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System/" license = "LGPL v2.1" @@ -21,8 +21,11 @@ tag-prefix = "QtAds" define-macros = ["ADS_SHARED_EXPORT"] sip-file = "ads.sip" include-dirs = ["src"] -qmake-QT = ["widgets"] +qmake-QT = ["widgets", "gui-private; platform_system == 'Linux'"] headers = [ + "src/AutoHideDockContainer.h", + "src/AutoHideSideBar.h", + "src/AutoHideTab.h", "src/DockAreaTabBar.h", "src/DockAreaTitleBar.h", "src/DockAreaTitleBar_p.h", @@ -40,10 +43,15 @@ headers = [ "src/FloatingDockContainer.h", "src/FloatingDragPreview.h", "src/IconProvider.h", + "src/PushButton.h", + "src/ResizeHandle.h", "src/ads_globals.h", - # "src/linux/FloatingWidgetTitleBar.h", + "src/linux/FloatingWidgetTitleBar.h; platform_system == 'Linux'", ] sources = [ + "src/AutoHideTab.cpp", + "src/AutoHideDockContainer.cpp", + "src/AutoHideSideBar.cpp", "src/DockAreaTabBar.cpp", "src/DockAreaTitleBar.cpp", "src/DockAreaWidget.cpp", @@ -60,6 +68,8 @@ sources = [ "src/FloatingDockContainer.cpp", "src/FloatingDragPreview.cpp", "src/IconProvider.cpp", + "src/PushButton.cpp", + "src/ResizeHandle.cpp", "src/ads_globals.cpp", - # "src/linux/FloatingWidgetTitleBar.cpp", + "src/linux/FloatingWidgetTitleBar.h; platform_system == 'Linux'", ] diff --git a/sip/AutoHideDockContainer.sip b/sip/AutoHideDockContainer.sip new file mode 100644 index 0000000..7d5a18b --- /dev/null +++ b/sip/AutoHideDockContainer.sip @@ -0,0 +1,46 @@ +%Import QtWidgets/QtWidgetsmod.sip + +%If (Qt_5_0_0 -) + +namespace ads +{ + +class CAutoHideDockContainer : QFrame +{ + + %TypeHeaderCode + #include + %End + +protected: + virtual bool eventFilter(QObject* watched, QEvent* event); + virtual void resizeEvent(QResizeEvent* event); + virtual void leaveEvent(QEvent *event); + virtual bool event(QEvent* event); + void updateSize(); + void saveState(QXmlStreamWriter& Stream); + +public: + CAutoHideDockContainer(ads::CDockWidget* DockWidget /Transfer/, ads::SideBarLocation area, + ads::CDockContainerWidget* parent /TransferThis/); + virtual ~CAutoHideDockContainer(); + ads::CAutoHideSideBar* sideBar() const; + ads::CAutoHideTab* autoHideTab() const; + ads::CDockWidget* dockWidget() const; + void addDockWidget(ads::CDockWidget* DockWidget /Transfer/); + ads::SideBarLocation sideBarLocation() const; + void setSideBarLocation(ads::SideBarLocation SideBarLocation); + ads::CDockAreaWidget* dockAreaWidget() const; + ads::CDockContainerWidget* dockContainer() const; + void moveContentsToParent(); + void cleanupAndDelete(); + void toggleView(bool Enable); + void collapseView(bool Enable); + void toggleCollapseState(); + void setSize(int Size); + +}; + +}; + +%End \ No newline at end of file diff --git a/sip/AutoHideSideBar.sip b/sip/AutoHideSideBar.sip new file mode 100644 index 0000000..492464b --- /dev/null +++ b/sip/AutoHideSideBar.sip @@ -0,0 +1,41 @@ +%Import QtWidgets/QtWidgetsmod.sip + +%If (Qt_5_0_0 -) + +namespace ads +{ + + +class CAutoHideSideBar : QScrollArea +{ + + %TypeHeaderCode + #include + %End + +protected: + virtual bool eventFilter(QObject *watched, QEvent *event); + void saveState(QXmlStreamWriter& Stream) const; + void insertTab(int Index, ads::CAutoHideTab* SideTab /Transfer/); + +public: + CAutoHideSideBar(ads::CDockContainerWidget* parent /TransferThis/, SideBarLocation area); + virtual ~CAutoHideSideBar(); + void removeTab(ads::CAutoHideTab* SideTab) /TransferBack/; + ads::CAutoHideDockContainer* insertDockWidget(int Index, ads::CDockWidget* DockWidget /Transfer/); + void removeAutoHideWidget(ads::CAutoHideDockContainer* AutoHideWidget) /TransferBack/; + void addAutoHideWidget(ads::CAutoHideDockContainer* AutoHideWidget); + Qt::Orientation orientation() const; + ads::CAutoHideTab* tabAt(int index) const; + int tabCount() const; + ads::SideBarLocation sideBarLocation() const; + virtual QSize minimumSizeHint() const; + virtual QSize sizeHint() const; + int spacing() const; + void setSpacing(int Spacing); + CDockContainerWidget* dockContainer() const; +}; + +}; + +%End \ No newline at end of file diff --git a/sip/AutoHideTab.sip b/sip/AutoHideTab.sip new file mode 100644 index 0000000..42e607c --- /dev/null +++ b/sip/AutoHideTab.sip @@ -0,0 +1,36 @@ +%Import QtWidgets/QtWidgetsmod.sip + +%If (Qt_5_0_0 -) + +namespace ads +{ + +class CAutoHideTab : CPushButton +{ + + %TypeHeaderCode + #include + %End + +protected: + void setSideBar(ads::CAutoHideSideBar *SideTabBar); + void removeFromSideBar(); + virtual bool event(QEvent* event); + +public: + CAutoHideTab(QWidget* parent /TransferThis/ = 0); + virtual ~CAutoHideTab(); + void updateStyle(); + ads::SideBarLocation sideBarLocation() const; + void setOrientation(Qt::Orientation Orientation); + Qt::Orientation orientation() const; + bool isActiveTab() const; + ads::CDockWidget* dockWidget() const; + void setDockWidget(ads::CDockWidget* DockWidget); + bool iconOnly() const; + ads::CAutoHideSideBar* sideBar() const; +}; + +}; + +%End diff --git a/sip/DockAreaTitleBar.sip b/sip/DockAreaTitleBar.sip index f4dd32d..8d3fad7 100644 --- a/sip/DockAreaTitleBar.sip +++ b/sip/DockAreaTitleBar.sip @@ -27,10 +27,12 @@ public: virtual ~CDockAreaTitleBar(); ads::CDockAreaTabBar* tabBar() const; QAbstractButton* button(ads::TitleBarButton which) const; + ads::CElidingLabel* autoHideTitleLabel() 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; signals: diff --git a/sip/DockAreaWidget.sip b/sip/DockAreaWidget.sip index 8196047..ae74263 100644 --- a/sip/DockAreaWidget.sip +++ b/sip/DockAreaWidget.sip @@ -23,6 +23,7 @@ protected: void updateTitleBarVisibility(); void internalSetCurrentDockWidget(ads::CDockWidget* DockWidget /Transfer/); void markTitleBarMenuOutdated(); + void updateTitleBarButtonVisibility(bool IsTopLevel) const; protected slots: void toggleView(bool Open); @@ -52,6 +53,8 @@ public: ads::CDockWidget* currentDockWidget() const; void setCurrentDockWidget(ads::CDockWidget* DockWidget); void saveState(QXmlStreamWriter& Stream) const; + static bool restoreState(ads::CDockingStateReader& Stream, ads::CDockAreaWidget*& CreatedWidget, + bool Testing, ads::CDockContainerWidget* ParentContainer); ads::CDockWidget::DockWidgetFeatures features(ads::eBitwiseOperator Mode = ads::BitwiseAnd) const; QAbstractButton* titleBarButton(ads::TitleBarButton which) const; virtual void setVisible(bool Visible); @@ -65,6 +68,8 @@ public: void setDockAreaFlag(eDockAreaFlag Flag, bool On); bool isCentralWidgetArea() const; + bool containsCentralWidget() const; + bool isTopLevelArea() const; public slots: void setCurrentIndex(int index); diff --git a/sip/DockComponentsFactory.sip b/sip/DockComponentsFactory.sip index e227608..b00eb62 100644 --- a/sip/DockComponentsFactory.sip +++ b/sip/DockComponentsFactory.sip @@ -13,6 +13,7 @@ class CDockComponentsFactory public: virtual ~CDockComponentsFactory(); virtual CDockWidgetTab* createDockWidgetTab(CDockWidget* DockWidget /Transfer/ ) const; + virtual CAutoHideTab* createDockWidgetSideTab(CDockWidget* DockWidget /Transfer/) const; virtual CDockAreaTabBar* createDockAreaTabBar(CDockAreaWidget* DockArea /Transfer/ ) const; virtual CDockAreaTitleBar* createDockAreaTitleBar(CDockAreaWidget* DockArea /Transfer/ ) const; static const CDockComponentsFactory* factory(); diff --git a/sip/DockContainerWidget.sip b/sip/DockContainerWidget.sip index be8e6d7..922db75 100644 --- a/sip/DockContainerWidget.sip +++ b/sip/DockContainerWidget.sip @@ -21,6 +21,7 @@ class CDockContainerWidget : QFrame protected: virtual bool event(QEvent *e); QSplitter* rootSplitter() const; + ads::CAutoHideDockContainer* createAndSetupAutoHideContainer(ads::SideBarLocation area, ads::CDockWidget* DockWidget /Transfer/); void createRootSplitter(); void dropFloatingWidget(ads::CFloatingDockContainer* FloatingWidget, const QPoint& TargetPos); void dropWidget(QWidget* Widget, DockWidgetArea DropArea, CDockAreaWidget* TargetAreaWidget); @@ -33,124 +34,44 @@ protected: ads::CDockAreaWidget* topLevelDockArea() const; QList dockWidgets() const; void updateSplitterHandles(QSplitter* splitter); + void registerAutoHideWidget(ads::CAutoHideDockContainer* AutoHideWidget /Transfer/); + void removeAutoHideWidget(ads::CAutoHideDockContainer* AutoHideWidget /TransferBack/); + void handleAutoHideWidgetEvent(QEvent* e, QWidget* w); public: - /** - * Default Constructor - */ CDockContainerWidget(ads::CDockManager* DockManager /TransferThis/, QWidget* parent /TransferThis/ = 0); - - /** - * Virtual Destructor - */ virtual ~CDockContainerWidget(); - - /** - * Adds dockwidget into the given area. - * If DockAreaWidget is not null, then the area parameter indicates the area - * into the DockAreaWidget. If DockAreaWidget is null, the Dockwidget will - * be dropped into the container. - * \return Returns the dock area widget that contains the new DockWidget - */ ads::CDockAreaWidget* addDockWidget(ads::DockWidgetArea area, ads::CDockWidget* Dockwidget /Transfer/, - ads::CDockAreaWidget* DockAreaWidget /Transfer/ = 0); - - /** - * Removes dockwidget - */ + ads::CDockAreaWidget* DockAreaWidget /Transfer/ = 0, + int Index = -1); void removeDockWidget(ads::CDockWidget* Dockwidget) /TransferBack/; - - /** - * Returns the current zOrderIndex - */ virtual unsigned int zOrderIndex() const; - - /** - * This function returns true if this container widgets z order index is - * higher than the index of the container widget given in Other parameter - */ bool isInFrontOf(ads::CDockContainerWidget* Other) const; - - /** - * Returns the dock area at teh given global position or 0 if there is no - * dock area at this position - */ ads::CDockAreaWidget* dockAreaAt(const QPoint& GlobalPos) const; - - /** - * Returns the dock area at the given Index or 0 if the index is out of - * range - */ ads::CDockAreaWidget* dockArea(int Index) const; - - /** - * Returns the list of dock areas that are not closed - * If all dock widgets in a dock area are closed, the dock area will be closed - */ QList openedDockAreas() const; + QList openedDockWidgets() const; bool hasTopLevelDockWidget() const; - - /** - * Returns the number of dock areas in this container - */ int dockAreaCount() const; - - /** - * Returns the number of visible dock areas - */ int visibleDockAreaCount() const; - - /** - * This function returns true, if this container is in a floating widget - */ bool isFloating() const; - - /** - * Dumps the layout for debugging purposes - */ void dumpLayout(); - - /** - * This functions returns the dock widget features of all dock widget in - * this container. - * A bitwise and is used to combine the flags of all dock widgets. That - * means, if only dock widget does not support a certain flag, the whole - * dock are does not support the flag. - */ ads::CDockWidget::DockWidgetFeatures features() const; - - /** - * If this dock container is in a floating widget, this function returns - * the floating widget. - * Else, it returns a nullptr. - */ ads::CFloatingDockContainer* floatingWidget() const; - - /** - * Call this function to close all dock areas except the KeepOpenArea - */ void closeOtherAreas(ads::CDockAreaWidget* KeepOpenArea); + ads::CAutoHideSideBar* sideTabBar(SideBarLocation area) const; + QList autoHideWidgets() const; + QRect contentRect() const; + QRect contentRectGlobal() const; + ads::CDockManager* dockManager() const; signals: - /** - * This signal is emitted if one or multiple dock areas has been added to - * the internal list of dock areas. - * If multiple dock areas are inserted, this signal is emitted only once - */ void dockAreasAdded(); - - /** - * This signal is emitted if one or multiple dock areas has been removed - */ + void autoHideWidgetCreated(ads::CAutoHideDockContainer* AutoHideWidget); void dockAreasRemoved(); - - /** - * This signal is emitted if a dock area is opened or closed via - * toggleView() function - */ void dockAreaViewToggled(ads::CDockAreaWidget* DockArea, bool Open); -}; // class DockContainerWidget }; - // namespace ads + +}; %End diff --git a/sip/DockFocusController.sip b/sip/DockFocusController.sip index a701096..a5cf1d1 100644 --- a/sip/DockFocusController.sip +++ b/sip/DockFocusController.sip @@ -22,6 +22,7 @@ public: void notifyFloatingWidgetDrop(ads::CFloatingDockContainer* FloatingWidget); ads::CDockWidget* focusedDockWidget() const; void setDockWidgetTabFocused(ads::CDockWidgetTab* Tab); + void clearDockWidgetFocus(ads::CDockWidget* dockWidget); public slots: void setDockWidgetFocused(ads::CDockWidget* focusedNow); diff --git a/sip/DockManager.sip b/sip/DockManager.sip index 66d4ca8..5abc9b5 100644 --- a/sip/DockManager.sip +++ b/sip/DockManager.sip @@ -156,7 +156,6 @@ public: TabCloseButtonIsToolButton, AllTabsHaveCloseButton, RetainTabSizeWhenCloseButtonHidden, - OpaqueUndocking, DragPreviewIsDynamic, DragPreviewShowsContentPixmap, DragPreviewHasWindowFrame, @@ -180,6 +179,17 @@ public: NonOpaqueWithWindowFrame, }; typedef QFlags ConfigFlags; + enum eAutoHideFlag + { + AutoHideFeatureEnabled, + DockAreaHasAutoHideButton, + AutoHideButtonTogglesArea, + AutoHideButtonCheckable, + AutoHideSideBarsIconOnly, + AutoHideShowOnMouseOver, + DefaultAutoHideConfig, + }; + typedef QFlags AutoHideFlags; CDockManager(QWidget* parent /TransferThis/ = 0); virtual ~CDockManager(); @@ -187,13 +197,24 @@ public: static void setConfigFlags(const ads::CDockManager::ConfigFlags Flags); static void setConfigFlag(ads::CDockManager::eConfigFlag Flag, bool On = true); static bool testConfigFlag(eConfigFlag Flag); + static ads::CDockManager::AutoHideFlags autoHideConfigFlags(); + static void setAutoHideConfigFlags(const ads::CDockManager::AutoHideFlags Flags); + static void setAutoHideConfigFlag(ads::CDockManager::eAutoHideFlag Flag, bool On = true); + static bool testAutoHideConfigFlag(eAutoHideFlag Flag); static ads::CIconProvider& iconProvider(); ads::CDockAreaWidget* addDockWidget(ads::DockWidgetArea area, ads::CDockWidget* Dockwidget /Transfer/, - ads::CDockAreaWidget* DockAreaWidget /Transfer/ = 0); + ads::CDockAreaWidget* DockAreaWidget /Transfer/ = 0, + int Index = -1); + ads::CDockAreaWidget* addDockWidgetToContainer(ads::DockWidgetArea area, ads::CDockWidget* Dockwidget /Transfer/, + ads::CDockContainerWidget* DockContainerWidget /Transfer/ = 0); + ads::CAutoHideDockContainer* addAutoHideDockWidget(ads::SideBarLocation Location, ads::CDockWidget* Dockwidget /Transfer/); + ads::CAutoHideDockContainer* addAutoHideDockWidgetToContainer(SideBarLocation Location, + ads::CDockWidget* Dockwidget /Transfer/, ads::CDockContainerWidget* DockContainerWidget); ads::CDockAreaWidget* addDockWidgetTab(ads::DockWidgetArea area, ads::CDockWidget* Dockwidget /Transfer/); ads::CDockAreaWidget* addDockWidgetTabToArea(ads::CDockWidget* Dockwidget /Transfer/, - ads::CDockAreaWidget* DockAreaWidget /Transfer/); + ads::CDockAreaWidget* DockAreaWidget /Transfer/, + int Index = -1); ads::CFloatingDockContainer* addDockWidgetFloating(ads::CDockWidget* DockWidget /Transfer/); ads::CDockWidget* findDockWidget(const QString& ObjectName) const; void removeDockWidget(ads::CDockWidget* Dockwidget) /TransferBack/; @@ -220,6 +241,8 @@ public: ads::CDockWidget* focusedDockWidget() const; QList splitterSizes(ads::CDockAreaWidget *ContainedArea) const; void setSplitterSizes(ads::CDockAreaWidget *ContainedArea, const QList& sizes); + static void setFloatingContainersTitle(const QString& Title); + static QString floatingContainersTitle(); public slots: void openPerspective(const QString& PerspectiveName); diff --git a/sip/DockWidget.sip b/sip/DockWidget.sip index 581fa7b..d428912 100644 --- a/sip/DockWidget.sip +++ b/sip/DockWidget.sip @@ -35,6 +35,7 @@ public: DockWidgetForceCloseWithArea, NoTab, DeleteContentOnClose, + DockWidgetPinnable, DefaultDockWidgetFeatures, AllDockWidgetFeatures, DockWidgetAlwaysCloseAndDelete, @@ -81,7 +82,12 @@ public: ads::CDockWidget::DockWidgetFeatures features() const; ads::CDockManager* dockManager() const; ads::CDockContainerWidget* dockContainer() const; + ads::CFloatingDockContainer* floatingDockContainer() const; ads::CDockAreaWidget* dockAreaWidget() const; + ads::CAutoHideTab* sideTabWidget() const; + void setSideTabWidget(ads::CAutoHideTab* SideTab /Transfer/) const; + bool isAutoHide() const; + ads::CAutoHideDockContainer* autoHideDockContainer() const; bool isFloating() const; bool isInFloatingContainer() const; bool isClosed() const; @@ -118,6 +124,8 @@ public slots: void closeDockWidget(); void showFullScreen(); void showNormal(); + void setAutoHide(bool Enable, ads::SideBarLocation Location = ads::SideBarNone); + void toggleAutoHide(ads::SideBarLocation Location = ads::SideBarNone); signals: void viewToggled(bool Open); diff --git a/sip/FloatingDockContainer.sip b/sip/FloatingDockContainer.sip index 0a6d51f..b36f4ce 100644 --- a/sip/FloatingDockContainer.sip +++ b/sip/FloatingDockContainer.sip @@ -64,6 +64,7 @@ protected: %If (WS_X11) virtual void moveEvent(QMoveEvent *event); virtual void resizeEvent(QResizeEvent *event); + virtual bool event(QEvent *e); %End %If (WS_WIN) diff --git a/sip/FloatingDragPreview.sip b/sip/FloatingDragPreview.sip index 9a76e0b..0dfc502 100644 --- a/sip/FloatingDragPreview.sip +++ b/sip/FloatingDragPreview.sip @@ -27,10 +27,9 @@ public: public: // implements IFloatingWidget virtual void startFloating(const QPoint& DragStartMousePos, const QSize& Size, ads::eDragState DragState, QWidget* MouseEventHandler); - virtual void moveFloating(); - virtual void finishDragging(); + void cleanupAutoHideContainerWidget(); signals: void draggingCanceled(); diff --git a/sip/PushButton.sip b/sip/PushButton.sip new file mode 100644 index 0000000..5613f92 --- /dev/null +++ b/sip/PushButton.sip @@ -0,0 +1,31 @@ +%Import QtWidgets/QtWidgetsmod.sip + +%If (Qt_5_0_0 -) + +namespace ads +{ + + +class CPushButton : QPushButton +{ + %TypeHeaderCode + #include + %End + +public: + enum Orientation { + Horizontal, + VerticalTopToBottom, + VerticalBottomToTop + }; + virtual QSize sizeHint() const; + + ads::CPushButton::Orientation buttonOrientation() const; + void setButtonOrientation(ads::CPushButton::Orientation orientation); + +}; + +}; + +%End + diff --git a/sip/ResizeHandle.sip b/sip/ResizeHandle.sip new file mode 100644 index 0000000..0cfdea1 --- /dev/null +++ b/sip/ResizeHandle.sip @@ -0,0 +1,36 @@ +%Import QtWidgets/QtWidgetsmod.sip + +%If (Qt_5_0_0 -) + +namespace ads +{ + +class CResizeHandle : QFrame +{ + + %TypeHeaderCode + #include + %End + +protected: + void mouseMoveEvent(QMouseEvent *); + void mousePressEvent(QMouseEvent *); + void mouseReleaseEvent(QMouseEvent *); + +public: + CResizeHandle(Qt::Edge HandlePosition, QWidget* parent /TransferThis/); + virtual ~CResizeHandle(); + void setHandlePosition(Qt::Edge HandlePosition); + Qt::Edge handlePostion() const; + Qt::Orientation orientation() const; + QSize sizeHint() const; + bool isResizing() const; + void setMinResizeSize(int MinSize); + void setMaxResizeSize(int MaxSize); + void setOpaqueResize(bool opaque = true); + bool opaqueResize() const; +}; + +}; + +%End diff --git a/sip/ads.sip b/sip/ads.sip index 2c29232..70a252a 100644 --- a/sip/ads.sip +++ b/sip/ads.sip @@ -3,6 +3,9 @@ %DefaultSupertype sip.simplewrapper %Include ads_globals.sip +%Include AutoHideDockContainer.sip +%Include AutoHideSideBar.sip +%Include AutoHideTab.sip %Include DockWidget.sip %Include DockAreaTabBar.sip %Include DockAreaTitleBar_p.sip @@ -20,6 +23,8 @@ %Include FloatingDockContainer.sip %Include FloatingDragPreview.sip %Include IconProvider.sip +%Include PushButton.sip +%Include ResizeHandle.sip %If (WS_X11) %Include linux/FloatingWidgetTitleBar.sip %End diff --git a/sip/ads_globals.sip b/sip/ads_globals.sip index 91df1c7..62eb674 100644 --- a/sip/ads_globals.sip +++ b/sip/ads_globals.sip @@ -50,7 +50,6 @@ namespace ads TopDockWidgetArea, BottomDockWidgetArea, CenterDockWidgetArea, - InvalidDockWidgetArea, OuterDockAreas, AllDockAreas @@ -62,7 +61,8 @@ namespace ads { TitleBarButtonTabsMenu, TitleBarButtonUndock, - TitleBarButtonClose + TitleBarButtonClose, + TitleBarButtonAutoHide }; enum eDragState @@ -76,10 +76,10 @@ namespace ads enum eIcon { TabCloseIcon, + AutoHideIcon, DockAreaMenuIcon, DockAreaUndockIcon, DockAreaCloseIcon, - IconCount, }; @@ -89,6 +89,15 @@ namespace ads BitwiseOr }; + enum SideBarLocation + { + SideBarTop, + SideBarLeft, + SideBarRight, + SideBarBottom, + SideBarNone + }; + namespace internal { void replaceSplitterWidget(QSplitter* Splitter, QWidget* From, QWidget* To); @@ -131,6 +140,7 @@ namespace ads }; void repolishStyle(QWidget* w, ads::internal::eRepolishChildOptions Options = ads::internal::RepolishIgnoreChildren); + QRect globalGeometry(QWidget* w); }; };