14#include "kddockwidgets/core/DockWidget.h"
15#include "kddockwidgets/core/SideBar.h"
16#include "kddockwidgets/core/MainWindow.h"
21#include <QAbstractButton>
23#include <QStyleOptionToolButton>
36 if (m_sideBar->isVertical())
41 m_layout->setSpacing(1);
42 m_layout->setContentsMargins(0, 0, 0, 0);
43 m_layout->addStretch();
48 auto button = createButton(dw,
this);
49 button->setText(dw->
title());
51 connect(dw, &Core::DockWidget::isOverlayedChanged, button,
52 [button] { button->update(); });
57 const int count = m_layout->count();
58 m_layout->insertWidget(count - 1, button);
68 return m_sideBar->isVertical();
86 return m_sideBar->isVertical();
void connect(T &&future, QObjectSubclass *context, Callback func)
void setText(const QString &text)
void destroyed(QObject *obj)
qreal devicePixelRatioF() const const
void drawLine(const QLineF &line)
void drawPixmap(const QRectF &target, const QPixmap &pixmap, const QRectF &source)
void drawText(const QPointF &position, const QString &text)
void setPen(const QColor &color)
void fill(const QColor &color)
void setDevicePixelRatio(qreal scaleFactor)
QRect adjusted(int dx1, int dy1, int dx2, int dy2) const const
QRect transposed() const const
QSize transposed() const const