|
KDDockWidgets API Documentation
1.5
|
Go to the documentation of this file.
15 #include "private/TitleBar_p.h"
16 #include "private/DockWidgetBase_p.h"
17 #include "private/quick/FrameQuick_p.h"
21 #include <QCloseEvent>
32 class DockWidgetQuick::Private
37 , m_visualItem(q->createItem(qmlengine,
38 Config::self().frameworkWidgetFactory()->dockwidgetFilename().toString()))
39 , m_qmlEngine(qmlengine)
41 Q_ASSERT(m_visualItem);
42 m_visualItem->setParent(q);
43 m_visualItem->setParentItem(q);
47 QQuickItem *
const m_visualItem;
48 QQmlEngine *
const m_qmlEngine;
52 LayoutSaverOptions layoutSaverOptions, QQmlEngine *engine)
54 , d(new Private(this, engine ? engine :
Config::self().qmlEngine()))
67 QQuickItem *guest = createItem(d->m_qmlEngine, qmlFilename);
76 widget->QWidgetAdapter::setParent(
this);
77 QWidgetAdapter::makeItemFillParent(
widget);
83 auto adapter =
new QWidgetAdapter(
this);
84 adapter->setIsWrapper();
90 guest->setParentItem(adapter);
91 guest->setParent(adapter);
92 QWidgetAdapter::makeItemFillParent(guest);
110 return DockWidgetBase::event(e);
115 if (QWidgetAdapter *guestWidget =
widget()) {
117 return guestWidget->minimumSize();
120 return DockWidgetBase::minimumSize();
125 if (QWidgetAdapter *guestWidget =
widget()) {
127 return guestWidget->maximumSize();
130 return DockWidgetBase::maximumSize();
136 return frame->actualTitleBar();
147 if (
auto frame = qobject_cast<FrameQuick *>(DockWidgetBase::d->
frame()))
148 return frame->visualItem();
155 if (
auto frame = qobject_cast<FrameQuick *>(DockWidgetBase::d->
frame())) {
156 frame->updateConstriants();
157 frame->updateGeometry();
163 return qobject_cast<FrameQuick *>(DockWidgetBase::d->
frame());
QVariant fromValue(const T &value)
bool spontaneous() const const
Application-wide config to tune certain behaviours of the framework.
QEvent::Type type() const const