13#include "kddockwidgets/core/DockRegistry.h"
14#include "core/DockWidget_p.h"
35 return m_sourceFilename;
61 return dockView->actualTitleBarView();
81 return m_dockWidget && m_dockWidget->
isFocused();
86 return m_dockWidget && m_dockWidget->
isFloating();
91 return m_dockWidget && m_dockWidget->
isOpen();
103 if (!other || !m_dockWidget)
111 QQuickItem *relativeTo,
115 if (!other || !m_dockWidget)
140 return m_dockWidget->
close();
148 m_dockWidget->
open();
160 m_dockWidget->
raise();
183 qWarning() << Q_FUNC_INFO
184 <<
"Each DockWidget need an unique name. Set the uniqueName property.";
194 qWarning() << Q_FUNC_INFO <<
"Unexpected bug.";
197 const auto childItems = this->childItems();
198 if (m_sourceFilename.
isEmpty() && childItems.size() != 1) {
199 qWarning() << Q_FUNC_INFO <<
"Either 'source' property must be set or add exactly one child"
200 <<
"; source=" << m_sourceFilename <<
"; num children=" << childItems.
size();
209 m_dockWidget->
d->closed.connect([
this] { Q_EMIT
closed(); });
210 m_dockWidget->
d->iconChanged.connect([
this] { Q_EMIT
iconChanged(); });
212 m_dockWidget->
d->optionsChanged.connect([
this](KDDockWidgets::DockWidgetOptions opts) { Q_EMIT
optionsChanged(opts); });
215 m_dockWidget->
d->isFocusedChanged.connect([
this](
bool is) { Q_EMIT
isFocusedChanged(is); });
217 m_dockWidget->
d->isOverlayedChanged.connect([
this](
bool is) { Q_EMIT
isOverlayedChanged(is); });
218 m_dockWidget->
d->isFloatingChanged.connect([
this](
bool is) { Q_EMIT
isFloatingChanged(is); });
219 m_dockWidget->
d->isOpenChanged.connect([
this](
bool is) { Q_EMIT
isOpenChanged(is); });
225 if (m_sourceFilename.
isEmpty()) {
226 view->setGuestItem(childItems.constFirst());
228 view->setGuestItem(m_sourceFilename);
234 if (m_isFloating.has_value())
Application-wide config to tune certain behaviours of the framework.
bool isEmpty() const const