mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-11-15 13:15:43 +08:00
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 <mweller@seemoo.tu-darmstadt.de>
This commit is contained in:
parent
d28ca1e7a1
commit
db16c5f1b5
@ -1,12 +1,12 @@
|
|||||||
# Specify the build system.
|
# Specify the build system.
|
||||||
[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"
|
build-backend = "sipbuild.api"
|
||||||
|
|
||||||
# Specify the PEP 566 metadata for the project.
|
# Specify the PEP 566 metadata for the project.
|
||||||
[tool.sip.metadata]
|
[tool.sip.metadata]
|
||||||
name = "PyQtAds"
|
name = "PyQtAds"
|
||||||
version = "3.8.2"
|
version = "4.0.2"
|
||||||
summary = "Python bindings for Qt Advanced Docking System"
|
summary = "Python bindings for Qt Advanced Docking System"
|
||||||
home-page = "https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System/"
|
home-page = "https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System/"
|
||||||
license = "LGPL v2.1"
|
license = "LGPL v2.1"
|
||||||
@ -21,8 +21,11 @@ tag-prefix = "QtAds"
|
|||||||
define-macros = ["ADS_SHARED_EXPORT"]
|
define-macros = ["ADS_SHARED_EXPORT"]
|
||||||
sip-file = "ads.sip"
|
sip-file = "ads.sip"
|
||||||
include-dirs = ["src"]
|
include-dirs = ["src"]
|
||||||
qmake-QT = ["widgets"]
|
qmake-QT = ["widgets", "gui-private; platform_system == 'Linux'"]
|
||||||
headers = [
|
headers = [
|
||||||
|
"src/AutoHideDockContainer.h",
|
||||||
|
"src/AutoHideSideBar.h",
|
||||||
|
"src/AutoHideTab.h",
|
||||||
"src/DockAreaTabBar.h",
|
"src/DockAreaTabBar.h",
|
||||||
"src/DockAreaTitleBar.h",
|
"src/DockAreaTitleBar.h",
|
||||||
"src/DockAreaTitleBar_p.h",
|
"src/DockAreaTitleBar_p.h",
|
||||||
@ -40,10 +43,15 @@ headers = [
|
|||||||
"src/FloatingDockContainer.h",
|
"src/FloatingDockContainer.h",
|
||||||
"src/FloatingDragPreview.h",
|
"src/FloatingDragPreview.h",
|
||||||
"src/IconProvider.h",
|
"src/IconProvider.h",
|
||||||
|
"src/PushButton.h",
|
||||||
|
"src/ResizeHandle.h",
|
||||||
"src/ads_globals.h",
|
"src/ads_globals.h",
|
||||||
# "src/linux/FloatingWidgetTitleBar.h",
|
"src/linux/FloatingWidgetTitleBar.h; platform_system == 'Linux'",
|
||||||
]
|
]
|
||||||
sources = [
|
sources = [
|
||||||
|
"src/AutoHideTab.cpp",
|
||||||
|
"src/AutoHideDockContainer.cpp",
|
||||||
|
"src/AutoHideSideBar.cpp",
|
||||||
"src/DockAreaTabBar.cpp",
|
"src/DockAreaTabBar.cpp",
|
||||||
"src/DockAreaTitleBar.cpp",
|
"src/DockAreaTitleBar.cpp",
|
||||||
"src/DockAreaWidget.cpp",
|
"src/DockAreaWidget.cpp",
|
||||||
@ -60,6 +68,8 @@ sources = [
|
|||||||
"src/FloatingDockContainer.cpp",
|
"src/FloatingDockContainer.cpp",
|
||||||
"src/FloatingDragPreview.cpp",
|
"src/FloatingDragPreview.cpp",
|
||||||
"src/IconProvider.cpp",
|
"src/IconProvider.cpp",
|
||||||
|
"src/PushButton.cpp",
|
||||||
|
"src/ResizeHandle.cpp",
|
||||||
"src/ads_globals.cpp",
|
"src/ads_globals.cpp",
|
||||||
# "src/linux/FloatingWidgetTitleBar.cpp",
|
"src/linux/FloatingWidgetTitleBar.h; platform_system == 'Linux'",
|
||||||
]
|
]
|
||||||
|
46
sip/AutoHideDockContainer.sip
Normal file
46
sip/AutoHideDockContainer.sip
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
%Import QtWidgets/QtWidgetsmod.sip
|
||||||
|
|
||||||
|
%If (Qt_5_0_0 -)
|
||||||
|
|
||||||
|
namespace ads
|
||||||
|
{
|
||||||
|
|
||||||
|
class CAutoHideDockContainer : QFrame
|
||||||
|
{
|
||||||
|
|
||||||
|
%TypeHeaderCode
|
||||||
|
#include <AutoHideDockContainer.h>
|
||||||
|
%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
|
41
sip/AutoHideSideBar.sip
Normal file
41
sip/AutoHideSideBar.sip
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
%Import QtWidgets/QtWidgetsmod.sip
|
||||||
|
|
||||||
|
%If (Qt_5_0_0 -)
|
||||||
|
|
||||||
|
namespace ads
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
class CAutoHideSideBar : QScrollArea
|
||||||
|
{
|
||||||
|
|
||||||
|
%TypeHeaderCode
|
||||||
|
#include <AutoHideSideBar.h>
|
||||||
|
%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
|
36
sip/AutoHideTab.sip
Normal file
36
sip/AutoHideTab.sip
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
%Import QtWidgets/QtWidgetsmod.sip
|
||||||
|
|
||||||
|
%If (Qt_5_0_0 -)
|
||||||
|
|
||||||
|
namespace ads
|
||||||
|
{
|
||||||
|
|
||||||
|
class CAutoHideTab : CPushButton
|
||||||
|
{
|
||||||
|
|
||||||
|
%TypeHeaderCode
|
||||||
|
#include <AutoHideTab.h>
|
||||||
|
%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
|
@ -27,10 +27,12 @@ public:
|
|||||||
virtual ~CDockAreaTitleBar();
|
virtual ~CDockAreaTitleBar();
|
||||||
ads::CDockAreaTabBar* tabBar() const;
|
ads::CDockAreaTabBar* tabBar() const;
|
||||||
QAbstractButton* button(ads::TitleBarButton which) const;
|
QAbstractButton* button(ads::TitleBarButton which) const;
|
||||||
|
ads::CElidingLabel* autoHideTitleLabel() 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;
|
||||||
|
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
@ -23,6 +23,7 @@ protected:
|
|||||||
void updateTitleBarVisibility();
|
void updateTitleBarVisibility();
|
||||||
void internalSetCurrentDockWidget(ads::CDockWidget* DockWidget /Transfer/);
|
void internalSetCurrentDockWidget(ads::CDockWidget* DockWidget /Transfer/);
|
||||||
void markTitleBarMenuOutdated();
|
void markTitleBarMenuOutdated();
|
||||||
|
void updateTitleBarButtonVisibility(bool IsTopLevel) const;
|
||||||
|
|
||||||
protected slots:
|
protected slots:
|
||||||
void toggleView(bool Open);
|
void toggleView(bool Open);
|
||||||
@ -52,6 +53,8 @@ public:
|
|||||||
ads::CDockWidget* currentDockWidget() const;
|
ads::CDockWidget* currentDockWidget() const;
|
||||||
void setCurrentDockWidget(ads::CDockWidget* DockWidget);
|
void setCurrentDockWidget(ads::CDockWidget* DockWidget);
|
||||||
void saveState(QXmlStreamWriter& Stream) const;
|
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;
|
ads::CDockWidget::DockWidgetFeatures features(ads::eBitwiseOperator Mode = ads::BitwiseAnd) const;
|
||||||
QAbstractButton* titleBarButton(ads::TitleBarButton which) const;
|
QAbstractButton* titleBarButton(ads::TitleBarButton which) const;
|
||||||
virtual void setVisible(bool Visible);
|
virtual void setVisible(bool Visible);
|
||||||
@ -65,6 +68,8 @@ public:
|
|||||||
void setDockAreaFlag(eDockAreaFlag Flag, bool On);
|
void setDockAreaFlag(eDockAreaFlag Flag, bool On);
|
||||||
|
|
||||||
bool isCentralWidgetArea() const;
|
bool isCentralWidgetArea() const;
|
||||||
|
bool containsCentralWidget() const;
|
||||||
|
bool isTopLevelArea() const;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void setCurrentIndex(int index);
|
void setCurrentIndex(int index);
|
||||||
|
@ -13,6 +13,7 @@ class CDockComponentsFactory
|
|||||||
public:
|
public:
|
||||||
virtual ~CDockComponentsFactory();
|
virtual ~CDockComponentsFactory();
|
||||||
virtual CDockWidgetTab* createDockWidgetTab(CDockWidget* DockWidget /Transfer/ ) const;
|
virtual CDockWidgetTab* createDockWidgetTab(CDockWidget* DockWidget /Transfer/ ) const;
|
||||||
|
virtual CAutoHideTab* createDockWidgetSideTab(CDockWidget* DockWidget /Transfer/) const;
|
||||||
virtual CDockAreaTabBar* createDockAreaTabBar(CDockAreaWidget* DockArea /Transfer/ ) const;
|
virtual CDockAreaTabBar* createDockAreaTabBar(CDockAreaWidget* DockArea /Transfer/ ) const;
|
||||||
virtual CDockAreaTitleBar* createDockAreaTitleBar(CDockAreaWidget* DockArea /Transfer/ ) const;
|
virtual CDockAreaTitleBar* createDockAreaTitleBar(CDockAreaWidget* DockArea /Transfer/ ) const;
|
||||||
static const CDockComponentsFactory* factory();
|
static const CDockComponentsFactory* factory();
|
||||||
|
@ -21,6 +21,7 @@ class CDockContainerWidget : QFrame
|
|||||||
protected:
|
protected:
|
||||||
virtual bool event(QEvent *e);
|
virtual bool event(QEvent *e);
|
||||||
QSplitter* rootSplitter() const;
|
QSplitter* rootSplitter() const;
|
||||||
|
ads::CAutoHideDockContainer* createAndSetupAutoHideContainer(ads::SideBarLocation area, ads::CDockWidget* DockWidget /Transfer/);
|
||||||
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);
|
void dropWidget(QWidget* Widget, DockWidgetArea DropArea, CDockAreaWidget* TargetAreaWidget);
|
||||||
@ -33,124 +34,44 @@ protected:
|
|||||||
ads::CDockAreaWidget* topLevelDockArea() const;
|
ads::CDockAreaWidget* topLevelDockArea() const;
|
||||||
QList<ads::CDockWidget*> dockWidgets() const;
|
QList<ads::CDockWidget*> dockWidgets() const;
|
||||||
void updateSplitterHandles(QSplitter* splitter);
|
void updateSplitterHandles(QSplitter* splitter);
|
||||||
|
void registerAutoHideWidget(ads::CAutoHideDockContainer* AutoHideWidget /Transfer/);
|
||||||
|
void removeAutoHideWidget(ads::CAutoHideDockContainer* AutoHideWidget /TransferBack/);
|
||||||
|
void handleAutoHideWidgetEvent(QEvent* e, QWidget* w);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/**
|
|
||||||
* Default Constructor
|
|
||||||
*/
|
|
||||||
CDockContainerWidget(ads::CDockManager* DockManager /TransferThis/, QWidget* parent /TransferThis/ = 0);
|
CDockContainerWidget(ads::CDockManager* DockManager /TransferThis/, QWidget* parent /TransferThis/ = 0);
|
||||||
|
|
||||||
/**
|
|
||||||
* Virtual Destructor
|
|
||||||
*/
|
|
||||||
virtual ~CDockContainerWidget();
|
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* addDockWidget(ads::DockWidgetArea area, ads::CDockWidget* Dockwidget /Transfer/,
|
||||||
ads::CDockAreaWidget* DockAreaWidget /Transfer/ = 0);
|
ads::CDockAreaWidget* DockAreaWidget /Transfer/ = 0,
|
||||||
|
int Index = -1);
|
||||||
/**
|
|
||||||
* Removes dockwidget
|
|
||||||
*/
|
|
||||||
void removeDockWidget(ads::CDockWidget* Dockwidget) /TransferBack/;
|
void removeDockWidget(ads::CDockWidget* Dockwidget) /TransferBack/;
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the current zOrderIndex
|
|
||||||
*/
|
|
||||||
virtual unsigned int zOrderIndex() const;
|
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;
|
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;
|
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;
|
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<ads::CDockAreaWidget*> openedDockAreas() const;
|
QList<ads::CDockAreaWidget*> openedDockAreas() const;
|
||||||
|
QList<ads::CDockWidget*> openedDockWidgets() const;
|
||||||
bool hasTopLevelDockWidget() const;
|
bool hasTopLevelDockWidget() const;
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the number of dock areas in this container
|
|
||||||
*/
|
|
||||||
int dockAreaCount() const;
|
int dockAreaCount() const;
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the number of visible dock areas
|
|
||||||
*/
|
|
||||||
int visibleDockAreaCount() const;
|
int visibleDockAreaCount() const;
|
||||||
|
|
||||||
/**
|
|
||||||
* This function returns true, if this container is in a floating widget
|
|
||||||
*/
|
|
||||||
bool isFloating() const;
|
bool isFloating() const;
|
||||||
|
|
||||||
/**
|
|
||||||
* Dumps the layout for debugging purposes
|
|
||||||
*/
|
|
||||||
void dumpLayout();
|
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;
|
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;
|
ads::CFloatingDockContainer* floatingWidget() const;
|
||||||
|
|
||||||
/**
|
|
||||||
* Call this function to close all dock areas except the KeepOpenArea
|
|
||||||
*/
|
|
||||||
void closeOtherAreas(ads::CDockAreaWidget* KeepOpenArea);
|
void closeOtherAreas(ads::CDockAreaWidget* KeepOpenArea);
|
||||||
|
ads::CAutoHideSideBar* sideTabBar(SideBarLocation area) const;
|
||||||
|
QList<ads::CAutoHideDockContainer*> autoHideWidgets() const;
|
||||||
|
QRect contentRect() const;
|
||||||
|
QRect contentRectGlobal() const;
|
||||||
|
ads::CDockManager* dockManager() const;
|
||||||
|
|
||||||
signals:
|
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();
|
void dockAreasAdded();
|
||||||
|
void autoHideWidgetCreated(ads::CAutoHideDockContainer* AutoHideWidget);
|
||||||
/**
|
|
||||||
* This signal is emitted if one or multiple dock areas has been removed
|
|
||||||
*/
|
|
||||||
void dockAreasRemoved();
|
void dockAreasRemoved();
|
||||||
|
|
||||||
/**
|
|
||||||
* This signal is emitted if a dock area is opened or closed via
|
|
||||||
* toggleView() function
|
|
||||||
*/
|
|
||||||
void dockAreaViewToggled(ads::CDockAreaWidget* DockArea, bool Open);
|
void dockAreaViewToggled(ads::CDockAreaWidget* DockArea, bool Open);
|
||||||
}; // class DockContainerWidget
|
|
||||||
};
|
};
|
||||||
// namespace ads
|
|
||||||
|
};
|
||||||
|
|
||||||
%End
|
%End
|
||||||
|
@ -22,6 +22,7 @@ public:
|
|||||||
void notifyFloatingWidgetDrop(ads::CFloatingDockContainer* FloatingWidget);
|
void notifyFloatingWidgetDrop(ads::CFloatingDockContainer* FloatingWidget);
|
||||||
ads::CDockWidget* focusedDockWidget() const;
|
ads::CDockWidget* focusedDockWidget() const;
|
||||||
void setDockWidgetTabFocused(ads::CDockWidgetTab* Tab);
|
void setDockWidgetTabFocused(ads::CDockWidgetTab* Tab);
|
||||||
|
void clearDockWidgetFocus(ads::CDockWidget* dockWidget);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void setDockWidgetFocused(ads::CDockWidget* focusedNow);
|
void setDockWidgetFocused(ads::CDockWidget* focusedNow);
|
||||||
|
@ -156,7 +156,6 @@ public:
|
|||||||
TabCloseButtonIsToolButton,
|
TabCloseButtonIsToolButton,
|
||||||
AllTabsHaveCloseButton,
|
AllTabsHaveCloseButton,
|
||||||
RetainTabSizeWhenCloseButtonHidden,
|
RetainTabSizeWhenCloseButtonHidden,
|
||||||
OpaqueUndocking,
|
|
||||||
DragPreviewIsDynamic,
|
DragPreviewIsDynamic,
|
||||||
DragPreviewShowsContentPixmap,
|
DragPreviewShowsContentPixmap,
|
||||||
DragPreviewHasWindowFrame,
|
DragPreviewHasWindowFrame,
|
||||||
@ -180,6 +179,17 @@ public:
|
|||||||
NonOpaqueWithWindowFrame,
|
NonOpaqueWithWindowFrame,
|
||||||
};
|
};
|
||||||
typedef QFlags<ads::CDockManager::eConfigFlag> ConfigFlags;
|
typedef QFlags<ads::CDockManager::eConfigFlag> ConfigFlags;
|
||||||
|
enum eAutoHideFlag
|
||||||
|
{
|
||||||
|
AutoHideFeatureEnabled,
|
||||||
|
DockAreaHasAutoHideButton,
|
||||||
|
AutoHideButtonTogglesArea,
|
||||||
|
AutoHideButtonCheckable,
|
||||||
|
AutoHideSideBarsIconOnly,
|
||||||
|
AutoHideShowOnMouseOver,
|
||||||
|
DefaultAutoHideConfig,
|
||||||
|
};
|
||||||
|
typedef QFlags<ads::CDockManager::eAutoHideFlag> AutoHideFlags;
|
||||||
|
|
||||||
CDockManager(QWidget* parent /TransferThis/ = 0);
|
CDockManager(QWidget* parent /TransferThis/ = 0);
|
||||||
virtual ~CDockManager();
|
virtual ~CDockManager();
|
||||||
@ -187,13 +197,24 @@ public:
|
|||||||
static void setConfigFlags(const ads::CDockManager::ConfigFlags Flags);
|
static void setConfigFlags(const ads::CDockManager::ConfigFlags Flags);
|
||||||
static void setConfigFlag(ads::CDockManager::eConfigFlag Flag, bool On = true);
|
static void setConfigFlag(ads::CDockManager::eConfigFlag Flag, bool On = true);
|
||||||
static bool testConfigFlag(eConfigFlag Flag);
|
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();
|
static ads::CIconProvider& iconProvider();
|
||||||
ads::CDockAreaWidget* addDockWidget(ads::DockWidgetArea area, ads::CDockWidget* Dockwidget /Transfer/,
|
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::CDockAreaWidget* addDockWidgetTab(ads::DockWidgetArea area,
|
||||||
ads::CDockWidget* Dockwidget /Transfer/);
|
ads::CDockWidget* Dockwidget /Transfer/);
|
||||||
ads::CDockAreaWidget* addDockWidgetTabToArea(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::CFloatingDockContainer* addDockWidgetFloating(ads::CDockWidget* DockWidget /Transfer/);
|
||||||
ads::CDockWidget* findDockWidget(const QString& ObjectName) const;
|
ads::CDockWidget* findDockWidget(const QString& ObjectName) const;
|
||||||
void removeDockWidget(ads::CDockWidget* Dockwidget) /TransferBack/;
|
void removeDockWidget(ads::CDockWidget* Dockwidget) /TransferBack/;
|
||||||
@ -220,6 +241,8 @@ public:
|
|||||||
ads::CDockWidget* focusedDockWidget() const;
|
ads::CDockWidget* focusedDockWidget() const;
|
||||||
QList<int> splitterSizes(ads::CDockAreaWidget *ContainedArea) const;
|
QList<int> splitterSizes(ads::CDockAreaWidget *ContainedArea) const;
|
||||||
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 QString floatingContainersTitle();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void openPerspective(const QString& PerspectiveName);
|
void openPerspective(const QString& PerspectiveName);
|
||||||
|
@ -35,6 +35,7 @@ public:
|
|||||||
DockWidgetForceCloseWithArea,
|
DockWidgetForceCloseWithArea,
|
||||||
NoTab,
|
NoTab,
|
||||||
DeleteContentOnClose,
|
DeleteContentOnClose,
|
||||||
|
DockWidgetPinnable,
|
||||||
DefaultDockWidgetFeatures,
|
DefaultDockWidgetFeatures,
|
||||||
AllDockWidgetFeatures,
|
AllDockWidgetFeatures,
|
||||||
DockWidgetAlwaysCloseAndDelete,
|
DockWidgetAlwaysCloseAndDelete,
|
||||||
@ -81,7 +82,12 @@ public:
|
|||||||
ads::CDockWidget::DockWidgetFeatures features() const;
|
ads::CDockWidget::DockWidgetFeatures features() const;
|
||||||
ads::CDockManager* dockManager() const;
|
ads::CDockManager* dockManager() const;
|
||||||
ads::CDockContainerWidget* dockContainer() const;
|
ads::CDockContainerWidget* dockContainer() const;
|
||||||
|
ads::CFloatingDockContainer* floatingDockContainer() const;
|
||||||
ads::CDockAreaWidget* dockAreaWidget() 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 isFloating() const;
|
||||||
bool isInFloatingContainer() const;
|
bool isInFloatingContainer() const;
|
||||||
bool isClosed() const;
|
bool isClosed() const;
|
||||||
@ -118,6 +124,8 @@ public slots:
|
|||||||
void closeDockWidget();
|
void closeDockWidget();
|
||||||
void showFullScreen();
|
void showFullScreen();
|
||||||
void showNormal();
|
void showNormal();
|
||||||
|
void setAutoHide(bool Enable, ads::SideBarLocation Location = ads::SideBarNone);
|
||||||
|
void toggleAutoHide(ads::SideBarLocation Location = ads::SideBarNone);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void viewToggled(bool Open);
|
void viewToggled(bool Open);
|
||||||
|
@ -64,6 +64,7 @@ protected:
|
|||||||
%If (WS_X11)
|
%If (WS_X11)
|
||||||
virtual void moveEvent(QMoveEvent *event);
|
virtual void moveEvent(QMoveEvent *event);
|
||||||
virtual void resizeEvent(QResizeEvent *event);
|
virtual void resizeEvent(QResizeEvent *event);
|
||||||
|
virtual bool event(QEvent *e);
|
||||||
%End
|
%End
|
||||||
|
|
||||||
%If (WS_WIN)
|
%If (WS_WIN)
|
||||||
|
@ -27,10 +27,9 @@ public:
|
|||||||
public: // implements IFloatingWidget
|
public: // implements IFloatingWidget
|
||||||
virtual void startFloating(const QPoint& DragStartMousePos, const QSize& Size,
|
virtual void startFloating(const QPoint& DragStartMousePos, const QSize& Size,
|
||||||
ads::eDragState DragState, QWidget* MouseEventHandler);
|
ads::eDragState DragState, QWidget* MouseEventHandler);
|
||||||
|
|
||||||
virtual void moveFloating();
|
virtual void moveFloating();
|
||||||
|
|
||||||
virtual void finishDragging();
|
virtual void finishDragging();
|
||||||
|
void cleanupAutoHideContainerWidget();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void draggingCanceled();
|
void draggingCanceled();
|
||||||
|
31
sip/PushButton.sip
Normal file
31
sip/PushButton.sip
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
%Import QtWidgets/QtWidgetsmod.sip
|
||||||
|
|
||||||
|
%If (Qt_5_0_0 -)
|
||||||
|
|
||||||
|
namespace ads
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
class CPushButton : QPushButton
|
||||||
|
{
|
||||||
|
%TypeHeaderCode
|
||||||
|
#include <PushButton.h>
|
||||||
|
%End
|
||||||
|
|
||||||
|
public:
|
||||||
|
enum Orientation {
|
||||||
|
Horizontal,
|
||||||
|
VerticalTopToBottom,
|
||||||
|
VerticalBottomToTop
|
||||||
|
};
|
||||||
|
virtual QSize sizeHint() const;
|
||||||
|
|
||||||
|
ads::CPushButton::Orientation buttonOrientation() const;
|
||||||
|
void setButtonOrientation(ads::CPushButton::Orientation orientation);
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
%End
|
||||||
|
|
36
sip/ResizeHandle.sip
Normal file
36
sip/ResizeHandle.sip
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
%Import QtWidgets/QtWidgetsmod.sip
|
||||||
|
|
||||||
|
%If (Qt_5_0_0 -)
|
||||||
|
|
||||||
|
namespace ads
|
||||||
|
{
|
||||||
|
|
||||||
|
class CResizeHandle : QFrame
|
||||||
|
{
|
||||||
|
|
||||||
|
%TypeHeaderCode
|
||||||
|
#include <ResizeHandle.h>
|
||||||
|
%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
|
@ -3,6 +3,9 @@
|
|||||||
%DefaultSupertype sip.simplewrapper
|
%DefaultSupertype sip.simplewrapper
|
||||||
|
|
||||||
%Include ads_globals.sip
|
%Include ads_globals.sip
|
||||||
|
%Include AutoHideDockContainer.sip
|
||||||
|
%Include AutoHideSideBar.sip
|
||||||
|
%Include AutoHideTab.sip
|
||||||
%Include DockWidget.sip
|
%Include DockWidget.sip
|
||||||
%Include DockAreaTabBar.sip
|
%Include DockAreaTabBar.sip
|
||||||
%Include DockAreaTitleBar_p.sip
|
%Include DockAreaTitleBar_p.sip
|
||||||
@ -20,6 +23,8 @@
|
|||||||
%Include FloatingDockContainer.sip
|
%Include FloatingDockContainer.sip
|
||||||
%Include FloatingDragPreview.sip
|
%Include FloatingDragPreview.sip
|
||||||
%Include IconProvider.sip
|
%Include IconProvider.sip
|
||||||
|
%Include PushButton.sip
|
||||||
|
%Include ResizeHandle.sip
|
||||||
%If (WS_X11)
|
%If (WS_X11)
|
||||||
%Include linux/FloatingWidgetTitleBar.sip
|
%Include linux/FloatingWidgetTitleBar.sip
|
||||||
%End
|
%End
|
||||||
|
@ -50,7 +50,6 @@ namespace ads
|
|||||||
TopDockWidgetArea,
|
TopDockWidgetArea,
|
||||||
BottomDockWidgetArea,
|
BottomDockWidgetArea,
|
||||||
CenterDockWidgetArea,
|
CenterDockWidgetArea,
|
||||||
|
|
||||||
InvalidDockWidgetArea,
|
InvalidDockWidgetArea,
|
||||||
OuterDockAreas,
|
OuterDockAreas,
|
||||||
AllDockAreas
|
AllDockAreas
|
||||||
@ -62,7 +61,8 @@ namespace ads
|
|||||||
{
|
{
|
||||||
TitleBarButtonTabsMenu,
|
TitleBarButtonTabsMenu,
|
||||||
TitleBarButtonUndock,
|
TitleBarButtonUndock,
|
||||||
TitleBarButtonClose
|
TitleBarButtonClose,
|
||||||
|
TitleBarButtonAutoHide
|
||||||
};
|
};
|
||||||
|
|
||||||
enum eDragState
|
enum eDragState
|
||||||
@ -76,10 +76,10 @@ namespace ads
|
|||||||
enum eIcon
|
enum eIcon
|
||||||
{
|
{
|
||||||
TabCloseIcon,
|
TabCloseIcon,
|
||||||
|
AutoHideIcon,
|
||||||
DockAreaMenuIcon,
|
DockAreaMenuIcon,
|
||||||
DockAreaUndockIcon,
|
DockAreaUndockIcon,
|
||||||
DockAreaCloseIcon,
|
DockAreaCloseIcon,
|
||||||
|
|
||||||
IconCount,
|
IconCount,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -89,6 +89,15 @@ namespace ads
|
|||||||
BitwiseOr
|
BitwiseOr
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum SideBarLocation
|
||||||
|
{
|
||||||
|
SideBarTop,
|
||||||
|
SideBarLeft,
|
||||||
|
SideBarRight,
|
||||||
|
SideBarBottom,
|
||||||
|
SideBarNone
|
||||||
|
};
|
||||||
|
|
||||||
namespace internal
|
namespace internal
|
||||||
{
|
{
|
||||||
void replaceSplitterWidget(QSplitter* Splitter, QWidget* From, QWidget* To);
|
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);
|
void repolishStyle(QWidget* w, ads::internal::eRepolishChildOptions Options = ads::internal::RepolishIgnoreChildren);
|
||||||
|
QRect globalGeometry(QWidget* w);
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user