mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-12-26 08:01:32 +08:00
c90fb9413c
* (Python) WIP: attempt to update to 3.2.0 * (Python) MAINT: move demo.py to demo/ to avoid PyQtAds import issue * (Python) STY: remove trailing whitespace * (Python) Missing/incorrect /Transfer/ annotations * (Python) n-elie's fix for setup.py moc generation * (Python) FIX: Q_OS_LINUX is not defined by default with moc * (Python) FIX: split FloatingDockContainer.sip to be platform-specific %If (Platform) blocks around the class definition in FloatingDockContainer.sip did not seem to work. Co-authored-by: K Lauer <klauer@users.noreply.github.com>
68 lines
1.8 KiB
Plaintext
68 lines
1.8 KiB
Plaintext
// NOTE: this is the Linux version, with QDockWidget as the
|
|
// CFloatingDockContainer base class.
|
|
|
|
%Import QtWidgets/QtWidgetsmod.sip
|
|
|
|
%If (Qt_5_0_0 -)
|
|
|
|
namespace ads
|
|
{
|
|
|
|
class IFloatingWidget
|
|
{
|
|
%TypeHeaderCode
|
|
#include <FloatingDockContainer.h>
|
|
%End
|
|
|
|
public:
|
|
virtual void startFloating(const QPoint& DragStartMousePos, const QSize& Size,
|
|
ads::eDragState DragState, QWidget* MouseEventHandler) = 0;
|
|
|
|
virtual void moveFloating() = 0;
|
|
virtual void finishDragging() = 0;
|
|
};
|
|
|
|
|
|
class CFloatingDockContainer : QDockWidget, ads::IFloatingWidget
|
|
{
|
|
|
|
%TypeHeaderCode
|
|
#include <FloatingDockContainer.h>
|
|
%End
|
|
|
|
protected:
|
|
virtual void startFloating(const QPoint& DragStartMousePos, const QSize& Size,
|
|
ads::eDragState DragState, QWidget* MouseEventHandler);
|
|
void startDragging(const QPoint& DragStartMousePos, const QSize& Size,
|
|
QWidget* MouseEventHandler);
|
|
virtual void finishDragging();
|
|
void initFloatingGeometry(const QPoint& DragStartMousePos, const QSize& Size);
|
|
void moveFloating();
|
|
bool restoreState(ads::CDockingStateReader& Stream, bool Testing);
|
|
void updateWindowTitle();
|
|
|
|
|
|
protected:
|
|
virtual void changeEvent(QEvent *event);
|
|
virtual void moveEvent(QMoveEvent *event);
|
|
virtual bool event(QEvent *e);
|
|
virtual void closeEvent(QCloseEvent *event);
|
|
virtual void hideEvent(QHideEvent *event);
|
|
virtual void showEvent(QShowEvent *event);
|
|
|
|
public:
|
|
CFloatingDockContainer(ads::CDockManager* DockManager /TransferThis/);
|
|
CFloatingDockContainer(ads::CDockAreaWidget* DockArea /TransferThis/);
|
|
CFloatingDockContainer(ads::CDockWidget* DockWidget /TransferThis/);
|
|
virtual ~CFloatingDockContainer();
|
|
ads::CDockContainerWidget* dockContainer() const;
|
|
bool isClosable() const;
|
|
bool hasTopLevelDockWidget() const;
|
|
ads::CDockWidget* topLevelDockWidget() const;
|
|
QList<ads::CDockWidget*> dockWidgets() const;
|
|
};
|
|
|
|
};
|
|
|
|
%End
|