Qt-Advanced-Docking-System/sip/DockContainerWidget.sip

79 lines
3.3 KiB
Plaintext
Raw Normal View History

2019-10-09 20:15:53 +08:00
%Import QtWidgets/QtWidgetsmod.sip
%If (Qt_5_0_0 -)
namespace ads
{
/**
* Container that manages a number of dock areas with single dock widgets
* or tabyfied dock widgets in each area.
* Each window that support docking has a DockContainerWidget. That means
* the main application window and all floating windows contain a
* DockContainerWidget.
2019-10-09 20:15:53 +08:00
*/
class CDockContainerWidget : QFrame
{
%TypeHeaderCode
#include <DockContainerWidget.h>
%End
protected:
virtual bool event(QEvent *e);
2024-04-04 05:49:08 +08:00
ads::CDockSplitter* rootSplitter() const;
2023-08-03 02:23:49 +08:00
ads::CAutoHideDockContainer* createAndSetupAutoHideContainer(ads::SideBarLocation area, ads::CDockWidget* DockWidget /Transfer/, int TabIndex = -1);
2019-10-09 20:15:53 +08:00
void createRootSplitter();
void dropFloatingWidget(ads::CFloatingDockContainer* FloatingWidget, const QPoint& TargetPos);
2023-08-03 02:23:49 +08:00
void dropWidget(QWidget* Widget, DockWidgetArea DropArea, CDockAreaWidget* TargetAreaWidget, int TabIndex = -1);
2019-10-09 20:15:53 +08:00
void addDockArea(ads::CDockAreaWidget* DockAreaWidget /Transfer/, ads::DockWidgetArea area = ads::CenterDockWidgetArea);
void removeDockArea(ads::CDockAreaWidget* area /TransferBack/);
2024-04-04 05:49:08 +08:00
/*QList<QPointer<ads::CDockAreaWidget>> removeAllDockAreas();*/
2019-10-09 20:15:53 +08:00
void saveState(QXmlStreamWriter& Stream) const;
2019-12-19 06:21:34 +08:00
bool restoreState(CDockingStateReader& Stream, bool Testing);
2019-10-09 20:15:53 +08:00
ads::CDockAreaWidget* lastAddedDockAreaWidget(ads::DockWidgetArea area) const;
ads::CDockWidget* topLevelDockWidget() const;
ads::CDockAreaWidget* topLevelDockArea() const;
QList<ads::CDockWidget*> dockWidgets() const;
void updateSplitterHandles(QSplitter* splitter);
void registerAutoHideWidget(ads::CAutoHideDockContainer* AutoHideWidget /Transfer/);
void removeAutoHideWidget(ads::CAutoHideDockContainer* AutoHideWidget /TransferBack/);
void handleAutoHideWidgetEvent(QEvent* e, QWidget* w);
2019-10-09 20:15:53 +08:00
public:
CDockContainerWidget(ads::CDockManager* DockManager /TransferThis/, QWidget* parent /TransferThis/ = 0);
virtual ~CDockContainerWidget();
ads::CDockAreaWidget* addDockWidget(ads::DockWidgetArea area, ads::CDockWidget* Dockwidget /Transfer/,
ads::CDockAreaWidget* DockAreaWidget /Transfer/ = 0,
int Index = -1);
2019-10-09 20:15:53 +08:00
void removeDockWidget(ads::CDockWidget* Dockwidget) /TransferBack/;
virtual unsigned int zOrderIndex() const;
bool isInFrontOf(ads::CDockContainerWidget* Other) const;
ads::CDockAreaWidget* dockAreaAt(const QPoint& GlobalPos) const;
ads::CDockAreaWidget* dockArea(int Index) const;
QList<ads::CDockAreaWidget*> openedDockAreas() const;
QList<ads::CDockWidget*> openedDockWidgets() const;
bool hasTopLevelDockWidget() const;
2019-10-09 20:15:53 +08:00
int dockAreaCount() const;
int visibleDockAreaCount() const;
bool isFloating() const;
void dumpLayout();
ads::CDockWidget::DockWidgetFeatures features() const;
ads::CFloatingDockContainer* floatingWidget() const;
void closeOtherAreas(ads::CDockAreaWidget* KeepOpenArea);
2023-08-03 02:23:49 +08:00
ads::CAutoHideSideBar* autoHideSideBar(SideBarLocation area) const;
QList<ads::CAutoHideDockContainer*> autoHideWidgets() const;
QRect contentRect() const;
QRect contentRectGlobal() const;
ads::CDockManager* dockManager() const;
2019-10-09 20:15:53 +08:00
signals:
void dockAreasAdded();
void autoHideWidgetCreated(ads::CAutoHideDockContainer* AutoHideWidget);
2019-10-09 20:15:53 +08:00
void dockAreasRemoved();
void dockAreaViewToggled(ads::CDockAreaWidget* DockArea, bool Open);
};
};
2019-10-09 20:15:53 +08:00
%End