18#include "WindowBeingDragged_p.h"
19#include "DockWidget_p.h"
23#include "ObjectGuard_p.h"
34 & (
Config::Flag_HideTitleBarWhenTabsVisible |
Config::Flag_AlwaysShowTabs))
35 , d(new Private(group, options, this))
39 d->m_tabBar =
new TabBar(
this);
58 return svi->isPositionDraggable(p);
78 KDDW_ERROR(
"Refusing to add already existing widget");
82 ObjectGuard<Group> oldFrame = dock->
d->group();
85 d->m_tabBar->setCurrentIndex(index);
87 if (oldFrame && oldFrame->beingDeletedLater()) {
105 return d->m_tabBar->indexOfDockWidget(dw) != -1;
118 if (
auto fw =
view()->rootView()->asFloatingWindowController()) {
119 if (fw->hasSingleGroup()) {
122 return std::make_unique<WindowBeingDragged>(fw,
this);
126 Rect r = d->m_group->view()->geometry();
131 r.moveTopLeft(globalPoint);
133 floatingWindow->view()->show();
135 return std::make_unique<WindowBeingDragged>(floatingWindow,
this);
140 if (
auto fw =
view()->rootView()->asFloatingWindowController()) {
142 return fw->hasSingleGroup();
150 if (d->m_group->hasSingleDockWidget()) {
151 const auto dockWidgets = d->m_group->dockWidgets();
152 return dockWidgets.first();
160 return d->m_group && d->m_group->isMDI();
169 ||
tabBar()->dockWidgetAt(localPos))
179 if (!fw->hasSingleGroup()) {
193 if (
is == d->m_tabBarAutoHide)
196 d->m_tabBarAutoHide =
is;
197 d->tabBarAutoHideChanged.emit(
is);
202 return d->m_tabBarAutoHide;
212 return d->m_tabBar->numDockWidgets();
222 if (d->m_buttonsToHideIfDisabled != types) {
223 d->m_buttonsToHideIfDisabled = types;
224 d->buttonsToHideIfDisabledChanged.emit();
230 return d->m_buttonsToHideIfDisabled &
type;
Application-wide config to tune certain behaviours of the framework.