![]() |
KDDockWidgets API Documentation 2.0
|
Indirection helper to instantiate dock widgets from QML. More...
#include <DockWidgetInstantiator.h>
Signals | |
void | actualTitleBarChanged () |
void | closed () |
void | dockWidgetChanged () |
void | guestViewChanged (QQuickItem *) |
void | iconChanged () |
void | isFloatingChanged (bool) |
void | isFocusedChanged (bool) |
void | isOpenChanged (bool) |
void | isOverlayedChanged (bool) |
void | optionsChanged (KDDockWidgets::DockWidgetOptions) |
void | removedFromSideBar () |
void | sourceChanged () |
void | titleChanged (const QString &title) |
void | uniqueNameChanged () |
void | windowActiveAboutToChange (bool activated) |
Public Member Functions | |
QObject * | actualTitleBar () const |
Q_INVOKABLE void | addDockWidgetAsTab (QQuickItem *other, KDDockWidgets::InitialVisibilityOption={}) |
Q_INVOKABLE void | addDockWidgetToContainingWindow (QQuickItem *other, KDDockWidgets::Location location, QQuickItem *relativeTo=nullptr, QSize initialSize={}, KDDockWidgets::InitialVisibilityOption={}) |
Q_INVOKABLE bool | close () |
KDDockWidgets::Core::DockWidget * | controller () const |
Q_INVOKABLE void | deleteDockWidget () |
KDDockWidgets::QtQuick::DockWidget * | dockWidget () const |
Q_INVOKABLE void | forceClose () |
bool | isFloating () const |
bool | isFocused () const |
bool | isOpen () const |
Q_INVOKABLE void | moveToSideBar () |
Q_INVOKABLE void | open () |
Q_INVOKABLE void | raise () |
Q_INVOKABLE void | setAsCurrentTab () |
void | setFloating (bool) |
void | setSource (const QString &) |
void | setTitle (const QString &title) |
void | setUniqueName (const QString &) |
Q_INVOKABLE void | show () |
QString | source () const |
QString | title () const |
QString | uniqueName () const |
Protected Member Functions | |
void | classBegin () override |
void | componentComplete () override |
Properties | |
QObject * | actualTitleBar |
KDDockWidgets::QtQuick::DockWidget * | dockWidget |
bool | isFloating |
bool | isFocused |
bool | isOpen |
QString | source |
QString | title |
QString | uniqueName |
Indirection helper to instantiate dock widgets from QML.
"DockWidget {}" in QML won't create a KDDockWidget::DockWidget directly, but instead an DockWidgetInstantiator. DockWidgetInstantiator will then create the DockWidget instance only when the QML parsing ends (and all properties are set)
This allows to pass the correct uniqueName to DockWidget's ctor.
Definition at line 35 of file DockWidgetInstantiator.h.
QObject * DockWidgetInstantiator::actualTitleBar | ( | ) | const |
Definition at line 58 of file DockWidgetInstantiator.cpp.
References dockWidget.
|
signal |
Referenced by componentComplete().
void DockWidgetInstantiator::addDockWidgetAsTab | ( | QQuickItem * | other, |
KDDockWidgets::InitialVisibilityOption | option = {} |
||
) |
Definition at line 101 of file DockWidgetInstantiator.cpp.
References KDDockWidgets::Core::DockWidget::addDockWidgetAsTab(), and KDDockWidgets::QtQuick::Platform::dockWidgetForItem().
void DockWidgetInstantiator::addDockWidgetToContainingWindow | ( | QQuickItem * | other, |
KDDockWidgets::Location | location, | ||
QQuickItem * | relativeTo = nullptr , |
||
QSize | initialSize = {} , |
||
KDDockWidgets::InitialVisibilityOption | option = {} |
||
) |
Definition at line 110 of file DockWidgetInstantiator.cpp.
References KDDockWidgets::Core::DockWidget::addDockWidgetToContainingWindow(), and KDDockWidgets::QtQuick::Platform::dockWidgetForItem().
|
overrideprotected |
Definition at line 175 of file DockWidgetInstantiator.cpp.
Q_INVOKABLE bool DockWidgetInstantiator::close | ( | ) |
Definition at line 137 of file DockWidgetInstantiator.cpp.
References KDDockWidgets::Core::Controller::close().
|
signal |
Referenced by componentComplete().
|
overrideprotected |
Definition at line 180 of file DockWidgetInstantiator.cpp.
References actualTitleBarChanged(), KDDockWidgets::Core::View::asDockWidgetController(), KDDockWidgets::QtQuick::asQQuickItem(), closed(), KDDockWidgets::QtQuick::ViewFactory::createDockWidget(), KDDockWidgets::Core::DockWidget::d, dockWidget, dockWidgetChanged(), KDDockWidgets::Core::DockWidget::guestView(), guestViewChanged(), iconChanged(), QString::isEmpty(), isFloatingChanged(), isFocusedChanged(), isOpenChanged(), isOverlayedChanged(), optionsChanged(), removedFromSideBar(), KDDockWidgets::DockRegistry::self(), KDDockWidgets::QtQuick::ViewFactory::self(), KDDockWidgets::Core::DockWidget::setFloating(), KDDockWidgets::Core::DockWidget::setTitle(), QString::size(), title, titleChanged(), and windowActiveAboutToChange().
KDDockWidgets::Core::DockWidget * DockWidgetInstantiator::controller | ( | ) | const |
Definition at line 53 of file DockWidgetInstantiator.cpp.
void DockWidgetInstantiator::deleteDockWidget | ( | ) |
Deletes the dock widget
Deleting involves deleting the controller (Core::DockWidget), the view (View::DockWidget) and this instantiator itself as well.
It's more usual to just hide dock widgets though.
Definition at line 169 of file DockWidgetInstantiator.cpp.
QtQuick::DockWidget * DockWidgetInstantiator::dockWidget | ( | ) | const |
Definition at line 44 of file DockWidgetInstantiator.cpp.
References KDDockWidgets::Core::Controller::view().
|
signal |
Referenced by componentComplete().
void DockWidgetInstantiator::forceClose | ( | ) |
Definition at line 131 of file DockWidgetInstantiator.cpp.
References KDDockWidgets::Core::DockWidget::forceClose().
|
signal |
Referenced by componentComplete().
|
signal |
Referenced by componentComplete().
bool DockWidgetInstantiator::isFloating | ( | ) | const |
Definition at line 84 of file DockWidgetInstantiator.cpp.
References KDDockWidgets::Core::DockWidget::isFloating().
|
signal |
Referenced by componentComplete().
bool DockWidgetInstantiator::isFocused | ( | ) | const |
Definition at line 79 of file DockWidgetInstantiator.cpp.
References KDDockWidgets::Core::DockWidget::isFocused().
|
signal |
Referenced by componentComplete().
bool DockWidgetInstantiator::isOpen | ( | ) | const |
Definition at line 89 of file DockWidgetInstantiator.cpp.
References KDDockWidgets::Core::DockWidget::isOpen().
|
signal |
Referenced by componentComplete().
|
signal |
Referenced by componentComplete().
void DockWidgetInstantiator::moveToSideBar | ( | ) |
Definition at line 163 of file DockWidgetInstantiator.cpp.
References KDDockWidgets::Core::DockWidget::moveToSideBar().
void DockWidgetInstantiator::open | ( | ) |
Definition at line 145 of file DockWidgetInstantiator.cpp.
References KDDockWidgets::Core::DockWidget::open().
Referenced by show().
|
signal |
Referenced by componentComplete().
void DockWidgetInstantiator::raise | ( | ) |
Definition at line 157 of file DockWidgetInstantiator.cpp.
References KDDockWidgets::Core::DockWidget::raise().
|
signal |
Referenced by componentComplete().
void DockWidgetInstantiator::setAsCurrentTab | ( | ) |
Definition at line 125 of file DockWidgetInstantiator.cpp.
References KDDockWidgets::Core::DockWidget::setAsCurrentTab().
void DockWidgetInstantiator::setFloating | ( | bool | is | ) |
Definition at line 94 of file DockWidgetInstantiator.cpp.
References KDDockWidgets::Core::DockWidget::setFloating().
void DockWidgetInstantiator::setSource | ( | const QString & | source | ) |
Definition at line 38 of file DockWidgetInstantiator.cpp.
References source, and sourceChanged().
void DockWidgetInstantiator::setTitle | ( | const QString & | title | ) |
Definition at line 72 of file DockWidgetInstantiator.cpp.
References KDDockWidgets::Core::DockWidget::setTitle(), and title.
void DockWidgetInstantiator::setUniqueName | ( | const QString & | name | ) |
Definition at line 27 of file DockWidgetInstantiator.cpp.
References uniqueNameChanged().
void DockWidgetInstantiator::show | ( | ) |
Definition at line 151 of file DockWidgetInstantiator.cpp.
References open().
QString DockWidgetInstantiator::source | ( | ) | const |
Definition at line 33 of file DockWidgetInstantiator.cpp.
|
signal |
Referenced by setSource().
QString DockWidgetInstantiator::title | ( | ) | const |
Definition at line 67 of file DockWidgetInstantiator.cpp.
References KDDockWidgets::Core::DockWidget::title().
|
signal |
Referenced by componentComplete().
QString DockWidgetInstantiator::uniqueName | ( | ) | const |
Definition at line 22 of file DockWidgetInstantiator.cpp.
|
signal |
Referenced by setUniqueName().
|
signal |
Referenced by componentComplete().
|
read |
Definition at line 42 of file DockWidgetInstantiator.h.
|
read |
Definition at line 40 of file DockWidgetInstantiator.h.
Referenced by actualTitleBar(), and componentComplete().
|
readwrite |
Definition at line 45 of file DockWidgetInstantiator.h.
|
read |
Definition at line 44 of file DockWidgetInstantiator.h.
|
read |
Definition at line 46 of file DockWidgetInstantiator.h.
|
readwrite |
Definition at line 39 of file DockWidgetInstantiator.h.
Referenced by setSource().
|
readwrite |
Definition at line 43 of file DockWidgetInstantiator.h.
Referenced by componentComplete(), and setTitle().
|
readwrite |
Definition at line 38 of file DockWidgetInstantiator.h.