16#include "kddockwidgets/core/Layout.h"
17#include "kddockwidgets/core/Group.h"
18#include "kddockwidgets/core/Stack.h"
19#include "kddockwidgets/core/TabBar.h"
20#include "kddockwidgets/core/TitleBar.h"
22#include "core/layouting/Item_p.h"
23#include "core/View_p.h"
24#include "core/Group_p.h"
43 ~VBoxLayout()
override;
47 if (m_groupWidget->inDtor())
51 if (
auto item = m_groupWidget->group()->layoutItem()) {
52 if (
auto root = item->root()) {
53 if (root->inSetSize() || root->isDeserializing()) {
57 if (!m_groupWidget->inDtor())
58 m_groupWidget->d->layoutInvalidated.emit();
62 m_groupWidget->d->layoutInvalidated.emit();
68 Group *
const m_groupWidget;
71VBoxLayout::~VBoxLayout() =
default;
75 , GroupViewInterface(controller)
81 m_group->
dptr()->numDockWidgetsChanged.connect([
this] {
85 m_group->
dptr()->isInMainWindowChanged.connect([
this] {
93 auto vlayout =
new VBoxLayout(
this);
94 vlayout->setContentsMargins(0, 0, 0, 0);
95 vlayout->setSpacing(0);
121 const qreal penWidth = 1;
122 const qreal halfPenWidth = penWidth / 2;
133 p.
drawRect(rectf.
adjusted(halfPenWidth, penWidth, -halfPenWidth, -halfPenWidth));
136 rectf.
adjusted(halfPenWidth, halfPenWidth, -halfPenWidth, -halfPenWidth), 2, 2);
156 auto tabBar = qobject_cast<QTabBar *>(asQWidget(
m_group->
tabBar()));
157 rect.setHeight(tabBar->height());
159 rect.moveTopLeft(
QPoint(tabBar->width(), tabBar->y()));
Application-wide config to tune certain behaviours of the framework.
virtual void invalidate() override
QObject * parent() const const
void drawRect(const QRectF &rectangle)
void drawRoundedRect(const QRectF &rect, qreal xRadius, qreal yRadius, Qt::SizeMode mode)
void setPen(const QColor &color)
void setRenderHint(QPainter::RenderHint hint, bool on)
void setJoinStyle(Qt::PenJoinStyle style)
void setWidthF(qreal width)
QRectF adjusted(qreal dx1, qreal dy1, qreal dx2, qreal dy2) const const