From f9927cef2963269926ba76edc9ef434001eb0c6f Mon Sep 17 00:00:00 2001 From: Hugo Slepicka Date: Wed, 18 Dec 2019 15:17:28 -0800 Subject: [PATCH] FIX: SIP Binding changes to reflect changes from 2.7.0 to master. --- sip/DockAreaTabBar.sip | 3 ++- sip/DockManager.sip | 2 ++ sip/DockWidget.sip | 2 ++ sip/FloatingDockContainer.sip | 5 +++-- sip/FloatingDragPreview.sip | 38 +++++++++++++++++++++++++++++++++++ sip/FloatingOverlay.sip | 30 --------------------------- sip/ads.sip | 2 +- 7 files changed, 48 insertions(+), 34 deletions(-) create mode 100644 sip/FloatingDragPreview.sip delete mode 100644 sip/FloatingOverlay.sip diff --git a/sip/DockAreaTabBar.sip b/sip/DockAreaTabBar.sip index a069f66..2e648cb 100644 --- a/sip/DockAreaTabBar.sip +++ b/sip/DockAreaTabBar.sip @@ -20,7 +20,8 @@ protected: void startFloating(const QPoint& Offset); ads::IFloatingWidget* makeAreaFloating(const QPoint& Offset, ads::eDragState DragState); - + ads::eDragState dragState() const; + public: CDockAreaTabBar(ads::CDockAreaWidget* parent /TransferThis/); virtual ~CDockAreaTabBar(); diff --git a/sip/DockManager.sip b/sip/DockManager.sip index ab2a03c..968cb6d 100644 --- a/sip/DockManager.sip +++ b/sip/DockManager.sip @@ -207,6 +207,8 @@ signals: void openingPerspective(const QString& PerspectiveName); void perspectiveOpened(const QString& PerspectiveName); void dockAreaCreated(ads::CDockAreaWidget* DockArea); + void dockWidgetAboutToBeRemoved(ads::CDockWidget* DockWidget); + void dockWidgetRemoved(ads::CDockWidget* DockWidget); }; }; diff --git a/sip/DockWidget.sip b/sip/DockWidget.sip index e2f6d34..f12f25c 100644 --- a/sip/DockWidget.sip +++ b/sip/DockWidget.sip @@ -28,6 +28,7 @@ public: DockWidgetClosable, DockWidgetMovable, DockWidgetFloatable, + DockWidgetDeleteOnClose, AllDockWidgetFeatures, NoDockWidgetFeatures }; @@ -89,6 +90,7 @@ public: public slots: void toggleView(bool Open = true); void setFloating(); + void deleteDockWidget(); signals: void viewToggled(bool Open); diff --git a/sip/FloatingDockContainer.sip b/sip/FloatingDockContainer.sip index 6f73b76..9b40e97 100644 --- a/sip/FloatingDockContainer.sip +++ b/sip/FloatingDockContainer.sip @@ -16,6 +16,7 @@ public: ads::eDragState DragState, QWidget* MouseEventHandler) = 0; virtual void moveFloating() = 0; + virtual void finishDragging() = 0; }; @@ -27,11 +28,11 @@ class CFloatingDockContainer : QWidget, ads::IFloatingWidget %End protected: - void startFloating(const QPoint& DragStartMousePos, const QSize& Size, + virtual void startFloating(const QPoint& DragStartMousePos, const QSize& Size, ads::eDragState DragState, QWidget* MouseEventHandler); void startDragging(const QPoint& DragStartMousePos, const QSize& Size, QWidget* MouseEventHandler); - void finishDragging(); + virtual void finishDragging(); void initFloatingGeometry(const QPoint& DragStartMousePos, const QSize& Size); void moveFloating(); bool restoreState(ads::CDockingStateReader& Stream, bool Testing); diff --git a/sip/FloatingDragPreview.sip b/sip/FloatingDragPreview.sip new file mode 100644 index 0000000..992ead8 --- /dev/null +++ b/sip/FloatingDragPreview.sip @@ -0,0 +1,38 @@ +%Import QtWidgets/QtWidgetsmod.sip + +%If (Qt_5_0_0 -) + +namespace ads +{ + +class CFloatingDragPreview : QWidget, ads::IFloatingWidget +{ + + %TypeHeaderCode + #include + %End + + +public: + CFloatingDragPreview(ads::CDockWidget* Content /TransferThis/ ); + CFloatingDragPreview(ads::CDockAreaWidget* Content /TransferThis/ ); + + virtual ~CFloatingDragPreview(); + + virtual bool eventFilter(QObject* watched, QEvent* event); + + virtual void startFloating(const QPoint& DragStartMousePos, const QSize& Size, + ads::eDragState DragState, QWidget* MouseEventHandler); + + virtual void moveFloating(); + + virtual void finishDragging(); + +signals: + void draggingCanceled(); + +}; + +}; + +%End \ No newline at end of file diff --git a/sip/FloatingOverlay.sip b/sip/FloatingOverlay.sip deleted file mode 100644 index 9aa799c..0000000 --- a/sip/FloatingOverlay.sip +++ /dev/null @@ -1,30 +0,0 @@ -%Import QtWidgets/QtWidgetsmod.sip - -%If (Qt_5_0_0 -) - -namespace ads -{ - -class CFloatingOverlay : QWidget, ads::IFloatingWidget -{ - - %TypeHeaderCode - #include - %End - - -public: - CFloatingOverlay(ads::CDockWidget* Content /TransferThis/ ); - CFloatingOverlay(ads::CDockAreaWidget* Content /TransferThis/ ); - - virtual ~CFloatingOverlay(); - - virtual void startFloating(const QPoint& DragStartMousePos, const QSize& Size, - ads::eDragState DragState, QWidget* MouseEventHandler); - - virtual void moveFloating(); -}; - -}; - -%End \ No newline at end of file diff --git a/sip/ads.sip b/sip/ads.sip index 31b8aa2..6e07ef8 100644 --- a/sip/ads.sip +++ b/sip/ads.sip @@ -16,7 +16,7 @@ %Include DockWidgetTab.sip %Include ElidingLabel.sip %Include FloatingDockContainer.sip -%Include FloatingOverlay.sip +%Include FloatingDragPreview.sip %Include IconProvider.sip %If (Linux) %Include linux/FloatingWidgetTitleBar.sip