|
KDDockWidgets API Documentation
1.5
|
Go to the documentation of this file.
19 #ifndef KD_DOCKWIDGET_BASE_H
20 #define KD_DOCKWIDGET_BASE_H
22 #include "docks_export.h"
56 #ifndef PYTHON_BINDINGS //Pyside bug: https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-1327
63 Q_PROPERTY(
bool isFocused READ isFocused NOTIFY isFocusedChanged)
64 Q_PROPERTY(
bool isFloating READ isFloating WRITE setFloating NOTIFY isFloatingChanged)
65 Q_PROPERTY(
QString uniqueName READ uniqueName CONSTANT)
66 Q_PROPERTY(
QString title READ title WRITE setTitle NOTIFY titleChanged)
67 Q_PROPERTY(
QObject *widget READ widget NOTIFY widgetChanged)
68 Q_PROPERTY(KDDockWidgets::DockWidgetBase::Options options READ options WRITE setOptions NOTIFY
77 Option_NotClosable = 1,
78 Option_NotDockable = 2,
79 Option_DeleteOnClose = 4
81 Q_DECLARE_FLAGS(Options, Option)
90 Q_DECLARE_FLAGS(LayoutSaverOptions, LayoutSaverOption)
97 All = ToggleAction | TitleBar | TabBar
100 Q_DECLARE_FLAGS(IconPlaces, IconPlace)
112 Options options = KDDockWidgets::DockWidgetBase::Options(),
113 LayoutSaverOptions layoutSaverOptions = KDDockWidgets::DockWidgetBase::LayoutSaverOptions());
170 bool isFloating()
const;
178 bool setFloating(
bool floats);
184 Q_INVOKABLE
QAction *toggleAction()
const;
190 Q_INVOKABLE
QAction *floatAction()
const;
210 void setTitle(
const QString &title);
222 QRect frameGeometry()
const;
228 Options options()
const;
232 KDDockWidgets::DockWidgetBase::LayoutSaverOptions layoutSaverOptions()
const;
241 void setOptions(Options);
251 bool isTabbed()
const;
259 bool isCurrentTab()
const;
264 Q_INVOKABLE
void setAsCurrentTab();
270 int tabIndex()
const;
280 void setIcon(
const QIcon &icon, IconPlaces places = IconPlace::All);
289 QIcon icon(IconPlace place = IconPlace::TitleBar)
const;
295 Q_INVOKABLE
void forceClose();
303 TitleBar *titleBar()
const;
309 Q_INVOKABLE
bool isOpen()
const;
332 void setAffinityName(
const QString &name);
340 Q_INVOKABLE
void show();
349 Q_INVOKABLE
void raise();
361 bool isMainWindow()
const;
370 bool isInMainWindow()
const;
374 MainWindowBase *mainWindow()
const;
380 bool isFocused()
const;
391 Q_INVOKABLE
void moveToSideBar();
397 bool isOverlayed()
const;
407 bool isInSideBar()
const;
413 bool hasPreviousDockedLocation()
const;
417 QSize lastOverlayedSize()
const;
423 static DockWidgetBase *byName(
const QString &uniqueName);
426 bool skipsRestore()
const;
435 void setFloatingGeometry(
QRect geo);
441 void setUserType(
int userType);
442 int userType()
const;
446 void setMDIPosition(
QPoint pos);
448 void setMDISize(
QSize size);
455 bool isPersistentCentralDockWidget()
const;
458 #ifdef KDDOCKWIDGETS_QTWIDGETS
459 void parentChanged();
514 void onParentChanged();
515 void onShown(
bool spontaneous);
516 void onHidden(
bool spontaneous);
518 #ifndef PYTHON_BINDINGS //Pyside bug: https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-1327
520 bool onResize(
QSize newSize)
override;
523 #if defined(DOCKS_DEVELOPER_MODE)
529 friend class MultiSplitter;
530 friend class LayoutWidget;
531 friend class MDILayoutWidget;
533 friend class DropArea;
534 friend class ::TestDocks;
535 friend class StateDragging;
555 Private *dptr() const;
Class to save and restore dockwidget layouts.
The MainWindow base-class. MainWindow and MainWindowBase are only split in two so we can share some c...