2019-10-09 20:15:53 +08:00
|
|
|
%Import QtWidgets/QtWidgetsmod.sip
|
|
|
|
|
|
|
|
%If (Qt_5_0_0 -)
|
|
|
|
|
|
|
|
namespace ads
|
|
|
|
{
|
2020-06-05 05:55:02 +08:00
|
|
|
|
2019-10-09 20:15:53 +08:00
|
|
|
class CDockAreaWidget : QFrame
|
|
|
|
{
|
|
|
|
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include <DockAreaWidget.h>
|
|
|
|
%End
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void insertDockWidget(int index, ads::CDockWidget* DockWidget /Transfer/, bool Activate = true);
|
|
|
|
void addDockWidget(ads::CDockWidget* DockWidget /Transfer/);
|
|
|
|
void removeDockWidget(ads::CDockWidget* DockWidget) /TransferBack/;
|
|
|
|
void toggleDockWidgetView(ads::CDockWidget* DockWidget, bool Open);
|
|
|
|
CDockWidget* nextOpenDockWidget(ads::CDockWidget* DockWidget) const;
|
|
|
|
int index(ads::CDockWidget* DockWidget);
|
|
|
|
void hideAreaWithNoVisibleContent();
|
|
|
|
void updateTitleBarVisibility();
|
|
|
|
void internalSetCurrentDockWidget(ads::CDockWidget* DockWidget /Transfer/);
|
|
|
|
void markTitleBarMenuOutdated();
|
2023-03-21 13:04:19 +08:00
|
|
|
void updateTitleBarButtonVisibility(bool IsTopLevel) const;
|
2019-10-09 20:15:53 +08:00
|
|
|
|
|
|
|
protected slots:
|
|
|
|
void toggleView(bool Open);
|
|
|
|
|
|
|
|
public:
|
2020-09-01 22:06:43 +08:00
|
|
|
enum eDockAreaFlag
|
|
|
|
{
|
|
|
|
HideSingleWidgetTitleBar,
|
|
|
|
DefaultFlags
|
|
|
|
};
|
|
|
|
typedef QFlags<ads::CDockAreaWidget::eDockAreaFlag> DockAreaFlags;
|
|
|
|
|
2019-10-09 20:15:53 +08:00
|
|
|
CDockAreaWidget(ads::CDockManager* DockManager /TransferThis/, ads::CDockContainerWidget* parent /TransferThis/);
|
|
|
|
virtual ~CDockAreaWidget();
|
|
|
|
ads::CDockManager* dockManager() const;
|
|
|
|
ads::CDockContainerWidget* dockContainer() const;
|
2023-08-03 02:23:49 +08:00
|
|
|
ads::CAutoHideDockContainer* autoHideDockContainer() const;
|
2024-04-04 05:49:08 +08:00
|
|
|
ads::CDockSplitter* parentSplitter() const;
|
2023-08-03 02:23:49 +08:00
|
|
|
bool isAutoHide() const;
|
|
|
|
void setAutoHideDockContainer(CAutoHideDockContainer*);
|
2020-06-05 05:55:02 +08:00
|
|
|
virtual QSize minimumSizeHint() const;
|
2019-10-09 20:15:53 +08:00
|
|
|
QRect titleBarGeometry() const;
|
|
|
|
QRect contentAreaGeometry() const;
|
|
|
|
int dockWidgetsCount() const;
|
|
|
|
QList<ads::CDockWidget*> dockWidgets() const;
|
|
|
|
int openDockWidgetsCount() const;
|
|
|
|
QList<ads::CDockWidget*> openedDockWidgets() const;
|
|
|
|
ads::CDockWidget* dockWidget(int Index) const;
|
|
|
|
int currentIndex() const;
|
|
|
|
int indexOfFirstOpenDockWidget() const;
|
|
|
|
ads::CDockWidget* currentDockWidget() const;
|
2020-02-22 05:47:09 +08:00
|
|
|
void setCurrentDockWidget(ads::CDockWidget* DockWidget);
|
2019-10-09 20:15:53 +08:00
|
|
|
void saveState(QXmlStreamWriter& Stream) const;
|
2023-03-21 13:04:19 +08:00
|
|
|
static bool restoreState(ads::CDockingStateReader& Stream, ads::CDockAreaWidget*& CreatedWidget,
|
|
|
|
bool Testing, ads::CDockContainerWidget* ParentContainer);
|
2020-02-22 05:47:09 +08:00
|
|
|
ads::CDockWidget::DockWidgetFeatures features(ads::eBitwiseOperator Mode = ads::BitwiseAnd) const;
|
2019-10-09 20:15:53 +08:00
|
|
|
QAbstractButton* titleBarButton(ads::TitleBarButton which) const;
|
|
|
|
virtual void setVisible(bool Visible);
|
|
|
|
|
2020-02-22 05:47:09 +08:00
|
|
|
void setAllowedAreas(DockWidgetAreas areas);
|
|
|
|
DockWidgetAreas allowedAreas() const;
|
|
|
|
CDockAreaTitleBar* titleBar() const;
|
2020-09-01 22:06:43 +08:00
|
|
|
|
|
|
|
DockAreaFlags dockAreaFlags() const;
|
|
|
|
void setDockAreaFlags(DockAreaFlags Flags);
|
|
|
|
void setDockAreaFlag(eDockAreaFlag Flag, bool On);
|
|
|
|
|
|
|
|
bool isCentralWidgetArea() const;
|
2023-03-21 13:04:19 +08:00
|
|
|
bool containsCentralWidget() const;
|
|
|
|
bool isTopLevelArea() const;
|
2020-02-22 05:47:09 +08:00
|
|
|
|
2019-10-09 20:15:53 +08:00
|
|
|
public slots:
|
|
|
|
void setCurrentIndex(int index);
|
|
|
|
void closeArea();
|
2023-08-03 02:23:49 +08:00
|
|
|
void setAutoHide(bool Enable, SideBarLocation Location = ads::SideBarNone, int TabIndex = -1);
|
|
|
|
void toggleAutoHide(SideBarLocation Location = ads::SideBarNone);
|
2019-10-09 20:15:53 +08:00
|
|
|
void closeOtherAreas();
|
2023-08-03 02:23:49 +08:00
|
|
|
void setFloating();
|
2019-10-09 20:15:53 +08:00
|
|
|
|
|
|
|
signals:
|
|
|
|
void tabBarClicked(int index);
|
|
|
|
void currentChanging(int index);
|
|
|
|
void currentChanged(int index);
|
|
|
|
void viewToggled(bool Open);
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
%End
|