KDDockWidgets API Documentation 2.0
|
A wrapper to workaround the limitation that QtQuick can't pass arguments through MainWindow's ctor So instead, user instantiates a MainWindowWrapper in QML and calls init. More...
#include <MainWindowInstantiator.h>
Signals | |
void | optionsChanged () |
void | uniqueNameChanged () |
Public Member Functions | |
MainWindowInstantiator () | |
ctor, called by QML engine | |
Q_INVOKABLE void | addDockWidget (QQuickItem *dockWidget, KDDockWidgets::Location location, QQuickItem *relativeTo=nullptr, QSize initialSize={}, KDDockWidgets::InitialVisibilityOption={}) |
See KDDockWidgets::Core::MainWindow::addDockWidget() | |
Q_INVOKABLE void | addDockWidgetAsTab (QQuickItem *dockWidget) |
See KDDockWidgets::Core::MainWindow::addDockWidgetAsTab() | |
QVector< QString > | affinities () const |
Q_INVOKABLE void | clearSideBarOverlay (bool deleteFrame=true) |
Q_INVOKABLE bool | closeDockWidgets (bool force=false) |
bool | isMDI () const |
Q_INVOKABLE void | layoutEqually () |
Q_INVOKABLE void | layoutParentContainerEqually (QQuickItem *dockWidget) |
Q_INVOKABLE void | moveToSideBar (QQuickItem *) |
Q_INVOKABLE void | moveToSideBar (QQuickItem *, KDDockWidgets::SideBarLocation) |
KDDockWidgets::MainWindowOptions | options () const |
Q_INVOKABLE void | overlayOnSideBar (QQuickItem *) |
Q_INVOKABLE void | restoreFromSideBar (QQuickItem *) |
void | setOptions (KDDockWidgets::MainWindowOptions) |
void | setUniqueName (const QString &) |
Q_INVOKABLE bool | sideBarIsVisible (KDDockWidgets::SideBarLocation) const |
Q_INVOKABLE void | toggleOverlayOnSideBar (QQuickItem *) |
QString | uniqueName () const |
Protected Member Functions | |
void | classBegin () override |
void | componentComplete () override |
Properties | |
QVector< QString > | affinities |
bool | isMDI |
KDDockWidgets::MainWindowOptions | options |
QString | uniqueName |
A wrapper to workaround the limitation that QtQuick can't pass arguments through MainWindow's ctor So instead, user instantiates a MainWindowWrapper in QML and calls init.
Definition at line 30 of file MainWindowInstantiator.h.
MainWindowInstantiator::MainWindowInstantiator | ( | ) |
ctor, called by QML engine
Definition at line 26 of file MainWindowInstantiator.cpp.
void MainWindowInstantiator::addDockWidget | ( | QQuickItem * | dockWidget, |
KDDockWidgets::Location | location, | ||
QQuickItem * | relativeTo = nullptr , |
||
QSize | initialSize = {} , |
||
KDDockWidgets::InitialVisibilityOption | option = {} |
||
) |
See KDDockWidgets::Core::MainWindow::addDockWidget()
Definition at line 66 of file MainWindowInstantiator.cpp.
References KDDockWidgets::Core::MainWindow::addDockWidget(), and KDDockWidgets::QtQuick::Platform::dockWidgetForItem().
void MainWindowInstantiator::addDockWidgetAsTab | ( | QQuickItem * | dockWidget | ) |
See KDDockWidgets::Core::MainWindow::addDockWidgetAsTab()
Definition at line 86 of file MainWindowInstantiator.cpp.
References KDDockWidgets::Core::MainWindow::addDockWidgetAsTab(), and KDDockWidgets::QtQuick::Platform::dockWidgetForItem().
Definition at line 56 of file MainWindowInstantiator.cpp.
References KDDockWidgets::Core::MainWindow::affinities().
|
overrideprotected |
Definition at line 176 of file MainWindowInstantiator.cpp.
void MainWindowInstantiator::clearSideBarOverlay | ( | bool | deleteFrame = true | ) |
Definition at line 155 of file MainWindowInstantiator.cpp.
References KDDockWidgets::Core::MainWindow::clearSideBarOverlay().
bool MainWindowInstantiator::closeDockWidgets | ( | bool | force = false | ) |
Definition at line 171 of file MainWindowInstantiator.cpp.
References KDDockWidgets::Core::MainWindow::closeDockWidgets().
|
overrideprotected |
Definition at line 181 of file MainWindowInstantiator.cpp.
References KDDockWidgets::Core::View::asMainWindowController(), QString::isEmpty(), KDDockWidgets::MainWindowOption_MDI, and KDDockWidgets::DockRegistry::self().
bool MainWindowInstantiator::isMDI | ( | ) | const |
Definition at line 61 of file MainWindowInstantiator.cpp.
References KDDockWidgets::Core::MainWindow::isMDI().
void MainWindowInstantiator::layoutEqually | ( | ) |
Definition at line 95 of file MainWindowInstantiator.cpp.
References KDDockWidgets::Core::MainWindow::layoutEqually().
void MainWindowInstantiator::layoutParentContainerEqually | ( | QQuickItem * | dockWidget | ) |
Definition at line 101 of file MainWindowInstantiator.cpp.
References KDDockWidgets::QtQuick::Platform::dockWidgetForItem(), and KDDockWidgets::Core::MainWindow::layoutParentContainerEqually().
void MainWindowInstantiator::moveToSideBar | ( | QQuickItem * | dockWidget | ) |
Definition at line 110 of file MainWindowInstantiator.cpp.
References KDDockWidgets::QtQuick::Platform::dockWidgetForItem(), and KDDockWidgets::Core::MainWindow::moveToSideBar().
void MainWindowInstantiator::moveToSideBar | ( | QQuickItem * | dockWidget, |
KDDockWidgets::SideBarLocation | loc | ||
) |
Definition at line 119 of file MainWindowInstantiator.cpp.
References KDDockWidgets::QtQuick::Platform::dockWidgetForItem(), and KDDockWidgets::Core::MainWindow::moveToSideBar().
MainWindowOptions MainWindowInstantiator::options | ( | ) | const |
Definition at line 43 of file MainWindowInstantiator.cpp.
|
signal |
Referenced by setOptions().
void MainWindowInstantiator::overlayOnSideBar | ( | QQuickItem * | dockWidget | ) |
Definition at line 137 of file MainWindowInstantiator.cpp.
References KDDockWidgets::QtQuick::Platform::dockWidgetForItem(), and KDDockWidgets::Core::MainWindow::overlayOnSideBar().
void MainWindowInstantiator::restoreFromSideBar | ( | QQuickItem * | dockWidget | ) |
Definition at line 128 of file MainWindowInstantiator.cpp.
References KDDockWidgets::QtQuick::Platform::dockWidgetForItem(), and KDDockWidgets::Core::MainWindow::restoreFromSideBar().
void MainWindowInstantiator::setOptions | ( | KDDockWidgets::MainWindowOptions | ) |
Definition at line 48 of file MainWindowInstantiator.cpp.
References options, and optionsChanged().
void MainWindowInstantiator::setUniqueName | ( | const QString & | name | ) |
Definition at line 35 of file MainWindowInstantiator.cpp.
References uniqueNameChanged().
bool MainWindowInstantiator::sideBarIsVisible | ( | KDDockWidgets::SideBarLocation | loc | ) | const |
Definition at line 166 of file MainWindowInstantiator.cpp.
References KDDockWidgets::Core::MainWindow::sideBarIsVisible().
void MainWindowInstantiator::toggleOverlayOnSideBar | ( | QQuickItem * | dockWidget | ) |
Definition at line 146 of file MainWindowInstantiator.cpp.
References KDDockWidgets::QtQuick::Platform::dockWidgetForItem(), and KDDockWidgets::Core::MainWindow::toggleOverlayOnSideBar().
QString MainWindowInstantiator::uniqueName | ( | ) | const |
Definition at line 30 of file MainWindowInstantiator.cpp.
|
signal |
Referenced by setUniqueName().
Definition at line 37 of file MainWindowInstantiator.h.
|
read |
Definition at line 36 of file MainWindowInstantiator.h.
|
readwrite |
Definition at line 34 of file MainWindowInstantiator.h.
Referenced by setOptions().
|
readwrite |
Definition at line 33 of file MainWindowInstantiator.h.