12 #include "MainWindowQuick_p.h"
13 #include "../LayoutWidget_p.h"
19 MainWindowQuick::MainWindowQuick(
const QString &uniqueName, MainWindowOptions options,
23 QWidgetAdapter::makeItemFillParent(
this);
26 QWidgetAdapter::makeItemFillParent(lw);
30 connect(lw, &LayoutWidget::geometryUpdated,
this, &MainWindowQuick::geometryUpdated);
32 connect(lw, &LayoutWidget::geometryUpdated,
this,
33 &MainWindowQuick::onMultiSplitterGeometryUpdated);
36 MainWindowQuick::~MainWindowQuick()
39 if (
QWindow *window = windowHandle()) {
46 QSize MainWindowQuick::minimumSize()
const
48 return layoutWidget()->layoutMinimumSize();
51 QSize MainWindowQuick::maximumSize()
const
53 return layoutWidget()->layoutMaximumSizeHint();
61 QMargins MainWindowQuick::centerWidgetMargins()
const
63 qDebug() << Q_FUNC_INFO <<
"SideBar hasn't been implemented yet";
67 void MainWindowQuick::onMultiSplitterGeometryUpdated()
69 const QSize minSz = minimumSize();
70 const bool mainWindowIsTooSmall = minSz.
expandedTo(size()) != size();
71 if (mainWindowIsTooSmall) {
75 windowHandle()->resize(minSz);