Qt-Advanced-Docking-System/sip/DockWidget.sip
Hugo Slepicka 8cc9cc25ad
Fixed and updated Python integration (#127)
* FIX: Add Q_OS_MACOS flag to moc compiler.

* (Python) Demo and example from @n-elie.

* FIX: Addressing some sip files that were inconsistent with the header files.

* (Python) Addressing comments by @n-elie and switching to use WS_X11 for platform checks.

* (Python) Wrap definition of tFloatingWidgetBase to avoid 'Already Defined' error and fix include path for sip/linux/FloatingWidgetTitleBar.sip.

* Remove simple.py

* Fix case sensitive ui file loading in Linux

* Add windows case in get_moc_args

* Remove conda recipe

Co-authored-by: n-elie <40382614+n-elie@users.noreply.github.com>
2020-02-25 07:22:51 +01:00

115 lines
3.1 KiB
Plaintext

%Import QtWidgets/QtWidgetsmod.sip
%If (Qt_5_0_0 -)
namespace ads
{
class CDockWidget : QFrame
{
%TypeHeaderCode
#include <DockWidget.h>
%End
protected:
void setDockManager(ads::CDockManager* DockManager /Transfer/ );
void setDockArea(ads::CDockAreaWidget* DockArea /Transfer/ );
void setToggleViewActionChecked(bool Checked);
void saveState(QXmlStreamWriter& Stream) const;
void flagAsUnassigned();
static void emitTopLevelEventForWidget(ads::CDockWidget* TopLevelDockWidget, bool Floating);
void emitTopLevelChanged(bool Floating);
void setClosedState(bool Closed);
void toggleViewInternal(bool Open);
bool closeDockWidgetInternal(bool ForceClose = false);
public:
enum DockWidgetFeature
{
DockWidgetClosable,
DockWidgetMovable,
DockWidgetFloatable,
DockWidgetDeleteOnClose,
CustomCloseHandling,
DefaultDockWidgetFeatures,
AllDockWidgetFeatures,
NoDockWidgetFeatures
};
typedef QFlags<ads::CDockWidget::DockWidgetFeature> DockWidgetFeatures;
enum eState
{
StateHidden,
StateDocked,
StateFloating
};
enum eInsertMode
{
AutoScrollArea,
ForceScrollArea,
ForceNoScrollArea
};
enum eToggleViewActionMode
{
ActionModeToggle,
ActionModeShow
};
CDockWidget(const QString &title, QWidget* parent /TransferThis/ = 0);
virtual ~CDockWidget();
virtual QSize minimumSizeHint() const;
void setWidget(QWidget* widget /Transfer/, ads::CDockWidget::eInsertMode InsertMode = AutoScrollArea);
QWidget* takeWidget() /TransferBack/;
QWidget* widget() const;
ads::CDockWidgetTab* tabWidget() const;
void setFeatures(ads::CDockWidget::DockWidgetFeatures features);
void setFeature(ads::CDockWidget::DockWidgetFeature flag, bool on);
ads::CDockWidget::DockWidgetFeatures features() const;
ads::CDockManager* dockManager() const;
ads::CDockContainerWidget* dockContainer() const;
ads::CDockAreaWidget* dockAreaWidget() const;
bool isFloating() const;
bool isInFloatingContainer() const;
bool isClosed() const;
QAction* toggleViewAction() const;
void setToggleViewActionMode(ads::CDockWidget::eToggleViewActionMode Mode);
void setIcon(const QIcon& Icon);
QIcon icon() const;
QToolBar* toolBar() const;
QToolBar* createDefaultToolBar();
void setToolBar(QToolBar* ToolBar /Transfer/ );
void setToolBarStyle(Qt::ToolButtonStyle Style, ads::CDockWidget::eState State);
Qt::ToolButtonStyle toolBarStyle(ads::CDockWidget::eState State) const;
void setToolBarIconSize(const QSize& IconSize, ads::CDockWidget::eState State);
QSize toolBarIconSize(eState State) const;
void setTitleBarActions(QList<QAction*> actions);
virtual QList<QAction*> titleBarActions() const;
void setTabToolTip(const QString &text);
public:
virtual bool event(QEvent *e);
public slots:
void toggleView(bool Open = true);
void setFloating();
void deleteDockWidget();
void closeDockWidget();
signals:
void viewToggled(bool Open);
void closed();
void titleChanged(const QString& Title);
void topLevelChanged(bool topLevel);
void closeRequested();
void visibilityChanged(bool visible);
void featuresChanged(ads::CDockWidget::DockWidgetFeatures features);
};
};
%End