|
KDDockWidgets API Documentation
1.6
|
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
76 Option_NotClosable = 1,
77 Option_NotDockable = 2,
78 Option_DeleteOnClose = 4,
79 Option_MDINestable = 8
83 Q_DECLARE_FLAGS(Options, Option)
91 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();
271 int tabIndex()
const;
276 int currentTabIndex()
const;
286 void setIcon(
const QIcon &icon, IconPlaces places = IconPlace::All);
295 QIcon icon(IconPlace place = IconPlace::TitleBar)
const;
301 Q_INVOKABLE
void forceClose();
309 TitleBar *titleBar()
const;
315 Q_INVOKABLE
bool isOpen()
const;
338 void setAffinityName(
const QString &name);
346 Q_INVOKABLE
void show();
355 Q_INVOKABLE
void raise();
367 bool isMainWindow()
const;
376 bool isInMainWindow()
const;
380 MainWindowBase *mainWindow()
const;
386 bool isFocused()
const;
397 Q_INVOKABLE
void moveToSideBar();
403 bool isOverlayed()
const;
413 bool isInSideBar()
const;
419 bool hasPreviousDockedLocation()
const;
423 QSize lastOverlayedSize()
const;
429 static DockWidgetBase *byName(
const QString &uniqueName);
432 bool skipsRestore()
const;
441 void setFloatingGeometry(
QRect geo);
447 void setUserType(
int userType);
448 int userType()
const;
452 void setMDIPosition(
QPoint pos);
454 void setMDISize(
QSize size);
461 bool isPersistentCentralDockWidget()
const;
464 #ifdef KDDOCKWIDGETS_QTWIDGETS
465 void parentChanged();
520 void onParentChanged();
521 void onShown(
bool spontaneous);
522 void onHidden(
bool spontaneous);
524 #ifndef PYTHON_BINDINGS // Pyside bug: https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-1327
526 bool onResize(
QSize newSize)
override;
529 #if defined(DOCKS_DEVELOPER_MODE)
535 friend class MultiSplitter;
536 friend class LayoutWidget;
537 friend class MDILayoutWidget;
538 friend class FloatingWindow;
540 friend class DropArea;
541 friend class ::TestDocks;
542 friend class StateDragging;
562 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...