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/View_p.h"
23#include "core/Group_p.h"
41 ~VBoxLayout()
override;
45 if (m_groupWidget->inDtor())
48 m_groupWidget->d->layoutInvalidated.emit();
51 Group *
const m_groupWidget;
54VBoxLayout::~VBoxLayout() =
default;
57 :
View<
QWidget>(controller, Core::ViewType::Frame, parent)
58 , GroupViewInterface(controller)
64 m_group->
dptr()->numDockWidgetsChanged.connect([
this] {
68 m_group->
dptr()->isInMainWindowChanged.connect([
this] {
76 auto vlayout =
new VBoxLayout(
this);
77 vlayout->setContentsMargins(0, 0, 0, 0);
78 vlayout->setSpacing(0);
104 const qreal penWidth = 1;
105 const qreal halfPenWidth = penWidth / 2;
116 p.
drawRect(rectf.
adjusted(halfPenWidth, penWidth, -halfPenWidth, -halfPenWidth));
119 rectf.
adjusted(halfPenWidth, halfPenWidth, -halfPenWidth, -halfPenWidth), 2, 2);
139 auto tabBar = qobject_cast<QTabBar *>(asQWidget(
m_group->
tabBar()));
140 rect.setHeight(tabBar->height());
142 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