mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-11-15 13:15:43 +08:00
Merge branch 'master' of https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System
This commit is contained in:
commit
767933d0cb
@ -24,9 +24,10 @@ public:
|
|||||||
CAutoHideDockContainer(ads::CDockWidget* DockWidget /Transfer/, ads::SideBarLocation area,
|
CAutoHideDockContainer(ads::CDockWidget* DockWidget /Transfer/, ads::SideBarLocation area,
|
||||||
ads::CDockContainerWidget* parent /TransferThis/);
|
ads::CDockContainerWidget* parent /TransferThis/);
|
||||||
virtual ~CAutoHideDockContainer();
|
virtual ~CAutoHideDockContainer();
|
||||||
ads::CAutoHideSideBar* sideBar() const;
|
ads::CAutoHideSideBar* autoHideSideBar() const;
|
||||||
ads::CAutoHideTab* autoHideTab() const;
|
ads::CAutoHideTab* autoHideTab() const;
|
||||||
ads::CDockWidget* dockWidget() const;
|
ads::CDockWidget* dockWidget() const;
|
||||||
|
int tabIndex() const;
|
||||||
void addDockWidget(ads::CDockWidget* DockWidget /Transfer/);
|
void addDockWidget(ads::CDockWidget* DockWidget /Transfer/);
|
||||||
ads::SideBarLocation sideBarLocation() const;
|
ads::SideBarLocation sideBarLocation() const;
|
||||||
void setSideBarLocation(ads::SideBarLocation SideBarLocation);
|
void setSideBarLocation(ads::SideBarLocation SideBarLocation);
|
||||||
@ -38,7 +39,9 @@ public:
|
|||||||
void collapseView(bool Enable);
|
void collapseView(bool Enable);
|
||||||
void toggleCollapseState();
|
void toggleCollapseState();
|
||||||
void setSize(int Size);
|
void setSize(int Size);
|
||||||
|
void resetToInitialDockWidgetSize();
|
||||||
|
Qt::Orientation orientation() const;
|
||||||
|
void moveToNewSideBarLocation(ads::SideBarLocation);
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -24,10 +24,13 @@ public:
|
|||||||
void removeTab(ads::CAutoHideTab* SideTab) /TransferBack/;
|
void removeTab(ads::CAutoHideTab* SideTab) /TransferBack/;
|
||||||
ads::CAutoHideDockContainer* insertDockWidget(int Index, ads::CDockWidget* DockWidget /Transfer/);
|
ads::CAutoHideDockContainer* insertDockWidget(int Index, ads::CDockWidget* DockWidget /Transfer/);
|
||||||
void removeAutoHideWidget(ads::CAutoHideDockContainer* AutoHideWidget) /TransferBack/;
|
void removeAutoHideWidget(ads::CAutoHideDockContainer* AutoHideWidget) /TransferBack/;
|
||||||
void addAutoHideWidget(ads::CAutoHideDockContainer* AutoHideWidget);
|
void addAutoHideWidget(ads::CAutoHideDockContainer* AutoHideWidget, int Index);
|
||||||
Qt::Orientation orientation() const;
|
Qt::Orientation orientation() const;
|
||||||
ads::CAutoHideTab* tabAt(int index) const;
|
ads::CAutoHideTab* tab(int index) const;
|
||||||
int tabCount() const;
|
int tabAt(const QPoint& Pos) const;
|
||||||
|
int tabInsertIndexAt(const QPoint& Pos) const;
|
||||||
|
int indexOfTab(const CAutoHideTab& Tab) const;
|
||||||
|
int count() const;
|
||||||
int visibleTabCount() const;
|
int visibleTabCount() const;
|
||||||
bool hasVisibleTabs() const;
|
bool hasVisibleTabs() const;
|
||||||
ads::SideBarLocation sideBarLocation() const;
|
ads::SideBarLocation sideBarLocation() const;
|
||||||
|
@ -16,6 +16,10 @@ protected:
|
|||||||
void setSideBar(ads::CAutoHideSideBar *SideTabBar);
|
void setSideBar(ads::CAutoHideSideBar *SideTabBar);
|
||||||
void removeFromSideBar();
|
void removeFromSideBar();
|
||||||
virtual bool event(QEvent* event);
|
virtual bool event(QEvent* event);
|
||||||
|
virtual void contextMenuEvent(QContextMenuEvent* ev);
|
||||||
|
virtual void mousePressEvent(QMouseEvent* ev);
|
||||||
|
virtual void mouseReleaseEvent(QMouseEvent* ev);
|
||||||
|
virtual void mouseMoveEvent(QMouseEvent* ev);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CAutoHideTab(QWidget* parent /TransferThis/ = 0);
|
CAutoHideTab(QWidget* parent /TransferThis/ = 0);
|
||||||
@ -29,6 +33,10 @@ public:
|
|||||||
void setDockWidget(ads::CDockWidget* DockWidget);
|
void setDockWidget(ads::CDockWidget* DockWidget);
|
||||||
bool iconOnly() const;
|
bool iconOnly() const;
|
||||||
ads::CAutoHideSideBar* sideBar() const;
|
ads::CAutoHideSideBar* sideBar() const;
|
||||||
|
int tabIndex() const;
|
||||||
|
void setDockWidgetFloating();
|
||||||
|
void unpinDockWidget();
|
||||||
|
void requestCloseDockWidget();
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -23,6 +23,8 @@ public:
|
|||||||
int currentIndex() const;
|
int currentIndex() const;
|
||||||
ads::CDockWidgetTab* currentTab() const;
|
ads::CDockWidgetTab* currentTab() const;
|
||||||
ads::CDockWidgetTab* tab(int Index) const;
|
ads::CDockWidgetTab* tab(int Index) const;
|
||||||
|
int tabAt(const QPoint& Pos) const;
|
||||||
|
int tabInsertIndexAt(const QPoint& Pos) const;
|
||||||
virtual bool eventFilter(QObject *watched, QEvent *event);
|
virtual bool eventFilter(QObject *watched, QEvent *event);
|
||||||
bool isTabOpen(int Index) const;
|
bool isTabOpen(int Index) const;
|
||||||
virtual QSize minimumSizeHint() const;
|
virtual QSize minimumSizeHint() const;
|
||||||
|
@ -5,6 +5,22 @@
|
|||||||
namespace ads
|
namespace ads
|
||||||
{
|
{
|
||||||
|
|
||||||
|
class CTitleBarButton : QToolButton
|
||||||
|
{
|
||||||
|
%TypeHeaderCode
|
||||||
|
#include <DockAreaTitleBar.h>
|
||||||
|
%End
|
||||||
|
|
||||||
|
public:
|
||||||
|
CTitleBarButton(bool visible = true, QWidget* parent /TransferThis/ = Q_NULLPTR );
|
||||||
|
virtual void setVisible(bool);
|
||||||
|
void setShowInTitleBar(bool);
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
bool event(QEvent *ev);
|
||||||
|
};
|
||||||
|
|
||||||
class CDockAreaTitleBar : QFrame
|
class CDockAreaTitleBar : QFrame
|
||||||
{
|
{
|
||||||
%TypeHeaderCode
|
%TypeHeaderCode
|
||||||
@ -26,13 +42,14 @@ public:
|
|||||||
CDockAreaTitleBar(ads::CDockAreaWidget* parent /TransferThis/);
|
CDockAreaTitleBar(ads::CDockAreaWidget* parent /TransferThis/);
|
||||||
virtual ~CDockAreaTitleBar();
|
virtual ~CDockAreaTitleBar();
|
||||||
ads::CDockAreaTabBar* tabBar() const;
|
ads::CDockAreaTabBar* tabBar() const;
|
||||||
QAbstractButton* button(ads::TitleBarButton which) const;
|
ads::CTitleBarButton* button(ads::TitleBarButton which) const;
|
||||||
ads::CElidingLabel* autoHideTitleLabel() 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;
|
QString titleBarButtonToolTip(ads::TitleBarButton Button) const;
|
||||||
|
void setAreaFloating();
|
||||||
|
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
@ -5,21 +5,6 @@
|
|||||||
namespace ads
|
namespace ads
|
||||||
{
|
{
|
||||||
|
|
||||||
class CTitleBarButton : QToolButton
|
|
||||||
{
|
|
||||||
%TypeHeaderCode
|
|
||||||
#include <DockAreaTitleBar_p.h>
|
|
||||||
%End
|
|
||||||
|
|
||||||
protected:
|
|
||||||
bool event(QEvent *ev);
|
|
||||||
|
|
||||||
public:
|
|
||||||
CTitleBarButton(bool visible = true, QWidget* parent /TransferThis/ = Q_NULLPTR );
|
|
||||||
virtual void setVisible(bool visible);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
class CSpacerWidget : QWidget
|
class CSpacerWidget : QWidget
|
||||||
{
|
{
|
||||||
%TypeHeaderCode
|
%TypeHeaderCode
|
||||||
|
@ -40,6 +40,9 @@ public:
|
|||||||
virtual ~CDockAreaWidget();
|
virtual ~CDockAreaWidget();
|
||||||
ads::CDockManager* dockManager() const;
|
ads::CDockManager* dockManager() const;
|
||||||
ads::CDockContainerWidget* dockContainer() const;
|
ads::CDockContainerWidget* dockContainer() const;
|
||||||
|
ads::CAutoHideDockContainer* autoHideDockContainer() const;
|
||||||
|
bool isAutoHide() const;
|
||||||
|
void setAutoHideDockContainer(CAutoHideDockContainer*);
|
||||||
virtual QSize minimumSizeHint() const;
|
virtual QSize minimumSizeHint() const;
|
||||||
QRect titleBarGeometry() const;
|
QRect titleBarGeometry() const;
|
||||||
QRect contentAreaGeometry() const;
|
QRect contentAreaGeometry() const;
|
||||||
@ -74,7 +77,10 @@ public:
|
|||||||
public slots:
|
public slots:
|
||||||
void setCurrentIndex(int index);
|
void setCurrentIndex(int index);
|
||||||
void closeArea();
|
void closeArea();
|
||||||
|
void setAutoHide(bool Enable, SideBarLocation Location = ads::SideBarNone, int TabIndex = -1);
|
||||||
|
void toggleAutoHide(SideBarLocation Location = ads::SideBarNone);
|
||||||
void closeOtherAreas();
|
void closeOtherAreas();
|
||||||
|
void setFloating();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void tabBarClicked(int index);
|
void tabBarClicked(int index);
|
||||||
|
@ -21,10 +21,10 @@ 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/);
|
ads::CAutoHideDockContainer* createAndSetupAutoHideContainer(ads::SideBarLocation area, ads::CDockWidget* DockWidget /Transfer/, int TabIndex = -1);
|
||||||
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, int TabIndex = -1);
|
||||||
void addDockArea(ads::CDockAreaWidget* DockAreaWidget /Transfer/, ads::DockWidgetArea area = ads::CenterDockWidgetArea);
|
void addDockArea(ads::CDockAreaWidget* DockAreaWidget /Transfer/, ads::DockWidgetArea area = ads::CenterDockWidgetArea);
|
||||||
void removeDockArea(ads::CDockAreaWidget* area /TransferBack/);
|
void removeDockArea(ads::CDockAreaWidget* area /TransferBack/);
|
||||||
void saveState(QXmlStreamWriter& Stream) const;
|
void saveState(QXmlStreamWriter& Stream) const;
|
||||||
@ -59,7 +59,7 @@ public:
|
|||||||
ads::CDockWidget::DockWidgetFeatures features() const;
|
ads::CDockWidget::DockWidgetFeatures features() const;
|
||||||
ads::CFloatingDockContainer* floatingWidget() const;
|
ads::CFloatingDockContainer* floatingWidget() const;
|
||||||
void closeOtherAreas(ads::CDockAreaWidget* KeepOpenArea);
|
void closeOtherAreas(ads::CDockAreaWidget* KeepOpenArea);
|
||||||
ads::CAutoHideSideBar* sideTabBar(SideBarLocation area) const;
|
ads::CAutoHideSideBar* autoHideSideBar(SideBarLocation area) const;
|
||||||
QList<ads::CAutoHideDockContainer*> autoHideWidgets() const;
|
QList<ads::CAutoHideDockContainer*> autoHideWidgets() const;
|
||||||
QRect contentRect() const;
|
QRect contentRect() const;
|
||||||
QRect contentRectGlobal() const;
|
QRect contentRectGlobal() const;
|
||||||
|
@ -187,8 +187,8 @@ public:
|
|||||||
AutoHideButtonCheckable,
|
AutoHideButtonCheckable,
|
||||||
AutoHideSideBarsIconOnly,
|
AutoHideSideBarsIconOnly,
|
||||||
AutoHideShowOnMouseOver,
|
AutoHideShowOnMouseOver,
|
||||||
DefaultAutoHideConfig,
|
|
||||||
AutoHideCloseButtonCollapsesDock,
|
AutoHideCloseButtonCollapsesDock,
|
||||||
|
DefaultAutoHideConfig,
|
||||||
};
|
};
|
||||||
typedef QFlags<ads::CDockManager::eAutoHideFlag> AutoHideFlags;
|
typedef QFlags<ads::CDockManager::eAutoHideFlag> AutoHideFlags;
|
||||||
|
|
||||||
|
@ -22,8 +22,10 @@ public:
|
|||||||
CDockOverlay(QWidget* parent /TransferThis/, eMode Mode = ads::CDockOverlay::ModeDockAreaOverlay);
|
CDockOverlay(QWidget* parent /TransferThis/, eMode Mode = ads::CDockOverlay::ModeDockAreaOverlay);
|
||||||
virtual ~CDockOverlay();
|
virtual ~CDockOverlay();
|
||||||
void setAllowedAreas(ads::DockWidgetAreas areas);
|
void setAllowedAreas(ads::DockWidgetAreas areas);
|
||||||
|
void setAllowedArea(ads::DockWidgetArea area, bool Enable);
|
||||||
ads::DockWidgetAreas allowedAreas() const;
|
ads::DockWidgetAreas allowedAreas() const;
|
||||||
ads::DockWidgetArea dropAreaUnderCursor() const;
|
ads::DockWidgetArea dropAreaUnderCursor() const;
|
||||||
|
int tabIndexUnderCursor() const;
|
||||||
ads::DockWidgetArea visibleDropAreaUnderCursor() const;
|
ads::DockWidgetArea visibleDropAreaUnderCursor() const;
|
||||||
ads::DockWidgetArea showOverlay(QWidget* target);
|
ads::DockWidgetArea showOverlay(QWidget* target);
|
||||||
void hideOverlay();
|
void hideOverlay();
|
||||||
|
@ -90,6 +90,7 @@ public:
|
|||||||
void setSideTabWidget(ads::CAutoHideTab* SideTab /Transfer/) const;
|
void setSideTabWidget(ads::CAutoHideTab* SideTab /Transfer/) const;
|
||||||
bool isAutoHide() const;
|
bool isAutoHide() const;
|
||||||
ads::CAutoHideDockContainer* autoHideDockContainer() const;
|
ads::CAutoHideDockContainer* autoHideDockContainer() const;
|
||||||
|
ads::SideBarLocation autoHideLocation() const;
|
||||||
bool isFloating() const;
|
bool isFloating() const;
|
||||||
bool isInFloatingContainer() const;
|
bool isInFloatingContainer() const;
|
||||||
bool isClosed() const;
|
bool isClosed() const;
|
||||||
@ -125,9 +126,10 @@ public slots:
|
|||||||
void setFloating();
|
void setFloating();
|
||||||
void deleteDockWidget();
|
void deleteDockWidget();
|
||||||
void closeDockWidget();
|
void closeDockWidget();
|
||||||
|
void requestCloseDockWidget();
|
||||||
void showFullScreen();
|
void showFullScreen();
|
||||||
void showNormal();
|
void showNormal();
|
||||||
void setAutoHide(bool Enable, ads::SideBarLocation Location = ads::SideBarNone);
|
void setAutoHide(bool Enable, ads::SideBarLocation Location = ads::SideBarNone, int TabIndex = -1);
|
||||||
void toggleAutoHide(ads::SideBarLocation Location = ads::SideBarNone);
|
void toggleAutoHide(ads::SideBarLocation Location = ads::SideBarNone);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
@ -37,7 +37,6 @@ public:
|
|||||||
void updateStyle();
|
void updateStyle();
|
||||||
QSize iconSize() const;
|
QSize iconSize() const;
|
||||||
void setIconSize(const QSize& Size);
|
void setIconSize(const QSize& Size);
|
||||||
bool mousePressed() const;
|
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
virtual void setVisible(bool visible);
|
virtual void setVisible(bool visible);
|
||||||
|
@ -29,7 +29,7 @@ public: // implements IFloatingWidget
|
|||||||
ads::eDragState DragState, QWidget* MouseEventHandler);
|
ads::eDragState DragState, QWidget* MouseEventHandler);
|
||||||
virtual void moveFloating();
|
virtual void moveFloating();
|
||||||
virtual void finishDragging();
|
virtual void finishDragging();
|
||||||
void cleanupAutoHideContainerWidget();
|
void cleanupAutoHideContainerWidget(ads::DockWidgetArea ContainerDropArea);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void draggingCanceled();
|
void draggingCanceled();
|
||||||
|
@ -50,13 +50,24 @@ namespace ads
|
|||||||
TopDockWidgetArea,
|
TopDockWidgetArea,
|
||||||
BottomDockWidgetArea,
|
BottomDockWidgetArea,
|
||||||
CenterDockWidgetArea,
|
CenterDockWidgetArea,
|
||||||
|
LeftAutoHideArea,
|
||||||
|
RightAutoHideArea,
|
||||||
|
TopAutoHideArea,
|
||||||
|
BottomAutoHideArea,
|
||||||
InvalidDockWidgetArea,
|
InvalidDockWidgetArea,
|
||||||
OuterDockAreas,
|
OuterDockAreas,
|
||||||
|
AutoHideDockAreas,
|
||||||
AllDockAreas
|
AllDockAreas
|
||||||
};
|
};
|
||||||
typedef QFlags<ads::DockWidgetArea> DockWidgetAreas;
|
typedef QFlags<ads::DockWidgetArea> DockWidgetAreas;
|
||||||
|
|
||||||
|
|
||||||
|
enum eTabIndex
|
||||||
|
{
|
||||||
|
TabDefaultInsertIndex,
|
||||||
|
TabInvalidIndex
|
||||||
|
};
|
||||||
|
|
||||||
enum TitleBarButton
|
enum TitleBarButton
|
||||||
{
|
{
|
||||||
TitleBarButtonTabsMenu,
|
TitleBarButtonTabsMenu,
|
||||||
@ -115,6 +126,9 @@ namespace ads
|
|||||||
int insertOffset() const;
|
int insertOffset() const;
|
||||||
};
|
};
|
||||||
ads::internal::CDockInsertParam dockAreaInsertParameters(ads::DockWidgetArea Area);
|
ads::internal::CDockInsertParam dockAreaInsertParameters(ads::DockWidgetArea Area);
|
||||||
|
ads::SideBarLocation toSideBarLocation(ads::DockWidgetArea Area);
|
||||||
|
bool isHorizontalSideBarLocation(ads::SideBarLocation Location);
|
||||||
|
bool isSideBarArea(ads::DockWidgetArea Area);
|
||||||
|
|
||||||
SIP_PYOBJECT findParent(SIP_PYTYPE type, const QWidget *w) const /TypeHint="QObject"/;
|
SIP_PYOBJECT findParent(SIP_PYTYPE type, const QWidget *w) const /TypeHint="QObject"/;
|
||||||
%MethodCode
|
%MethodCode
|
||||||
|
Loading…
Reference in New Issue
Block a user