Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qmainwindowlayout_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5#ifndef QMAINWINDOWLAYOUT_P_H
6#define QMAINWINDOWLAYOUT_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <QtWidgets/private/qtwidgetsglobal_p.h>
20#include "QtWidgets/private/qwidgetanimator_p.h"
21#include "qmainwindow.h"
22
23#include "QtWidgets/qlayout.h"
24#if QT_CONFIG(tabbar)
25#include "QtWidgets/qtabbar.h"
26#include "QtGui/qpainter.h"
27#include "QtGui/qevent.h"
28#endif
29#include "QtCore/qbasictimer.h"
30#include "QtCore/qlist.h"
31#include "QtCore/qset.h"
32#include "private/qlayoutengine_p.h"
33#include "private/qwidgetanimator_p.h"
34#if QT_CONFIG(dockwidget)
35#include "private/qdockwidget_p.h"
36
37#include "qdockarealayout_p.h"
38#include "qdockwidget.h"
39#else
40struct QDockWidgetPrivate {
41 enum class DragScope {
42 Group
43 };
44};
45#endif
46#if QT_CONFIG(toolbar)
47#include "qtoolbararealayout_p.h"
48#include "qtoolbar.h"
49#endif
50
51#include <QtCore/qloggingcategory.h>
52#include <QtCore/qpointer.h>
53
55
57
59
60class QToolBar;
61class QRubberBand;
62
63template <typename Layout> // Make use of the "Curiously recurring template pattern"
65{
66 Layout *layout() { return static_cast<Layout *>(this); }
67 const Layout *layout() const { return static_cast<const Layout *>(this); }
68 QWidget *window() { return layout()->parentWidget(); }
69
70public:
72
74
77
78#if QT_CONFIG(dockwidget)
79
80#if QT_CONFIG(cursor)
81 QCursor separatorCursor(const QList<int> &path);
82 void adjustCursor(const QPoint &pos);
85 bool hasOldCursor = false;
86 bool cursorAdjusted = false;
87#endif // QT_CONFIG(cursor)
88
92
93 bool startSeparatorMove(const QPoint &pos);
94 bool separatorMove(const QPoint &pos);
95 bool endSeparatorMove(const QPoint &pos);
96 bool windowEvent(QEvent *e);
97
98private:
99 QList<int> findSeparator(const QPoint &pos) const;
100
101#endif // QT_CONFIG(dockwidget)
102
103};
104
105#if QT_CONFIG(dockwidget)
106
107#if QT_CONFIG(cursor)
108template <typename Layout>
109QCursor QMainWindowLayoutSeparatorHelper<Layout>::separatorCursor(const QList<int> &path)
110{
111 const QDockAreaLayoutInfo *info = layout()->dockAreaLayoutInfo()->info(path);
112 Q_ASSERT(info != nullptr);
113 if (path.size() == 1) { // is this the "top-level" separator which separates a dock area
114 // from the central widget?
115 switch (path.first()) {
116 case QInternal::LeftDock:
117 case QInternal::RightDock:
118 return Qt::SplitHCursor;
119 case QInternal::TopDock:
120 case QInternal::BottomDock:
121 return Qt::SplitVCursor;
122 default:
123 break;
124 }
125 }
126
127 // no, it's a splitter inside a dock area, separating two dock widgets
128
129 return info->o == Qt::Horizontal ? Qt::SplitHCursor : Qt::SplitVCursor;
130}
131
132template <typename Layout>
133void QMainWindowLayoutSeparatorHelper<Layout>::adjustCursor(const QPoint &pos)
134{
135 QWidget *w = layout()->window();
136 hoverPos = pos;
137
138 if (pos == QPoint(0, 0)) {
139 if (!hoverSeparator.isEmpty())
140 w->update(layout()->dockAreaLayoutInfo()->separatorRect(hoverSeparator));
141 hoverSeparator.clear();
142
143 if (cursorAdjusted) {
144 cursorAdjusted = false;
145 if (hasOldCursor)
146 w->setCursor(oldCursor);
147 else
148 w->unsetCursor();
149 }
150 } else if (movingSeparator.isEmpty()) { // Don't change cursor when moving separator
151 QList<int> pathToSeparator = findSeparator(pos);
152
153 if (pathToSeparator != hoverSeparator) {
154 if (!hoverSeparator.isEmpty())
155 w->update(layout()->dockAreaLayoutInfo()->separatorRect(hoverSeparator));
156
157 hoverSeparator = pathToSeparator;
158
159 if (hoverSeparator.isEmpty()) {
160 if (cursorAdjusted) {
161 cursorAdjusted = false;
162 if (hasOldCursor)
163 w->setCursor(oldCursor);
164 else
165 w->unsetCursor();
166 }
167 } else {
168 w->update(layout()->dockAreaLayoutInfo()->separatorRect(hoverSeparator));
169 if (!cursorAdjusted) {
170 oldCursor = w->cursor();
171 hasOldCursor = w->testAttribute(Qt::WA_SetCursor);
172 }
173 adjustedCursor = separatorCursor(hoverSeparator);
174 w->setCursor(adjustedCursor);
175 cursorAdjusted = true;
176 }
177 }
178 }
179}
180#endif // QT_CONFIG(cursor)
181
182template <typename Layout>
183bool QMainWindowLayoutSeparatorHelper<Layout>::windowEvent(QEvent *event)
184{
185 QWidget *w = window();
186 switch (event->type()) {
187 case QEvent::Paint: {
188 QPainter p(w);
189 QRegion r = static_cast<QPaintEvent *>(event)->region();
190 layout()->dockAreaLayoutInfo()->paintSeparators(&p, w, r, hoverPos);
191 break;
192 }
193
194#if QT_CONFIG(cursor)
195 case QEvent::HoverMove: {
196 adjustCursor(static_cast<QHoverEvent *>(event)->position().toPoint());
197 break;
198 }
199
200 // We don't want QWidget to call update() on the entire QMainWindow
201 // on HoverEnter and HoverLeave, hence accept the event (return true).
202 case QEvent::HoverEnter:
203 return true;
204 case QEvent::HoverLeave:
205 adjustCursor(QPoint(0, 0));
206 return true;
207 case QEvent::ShortcutOverride: // when a menu pops up
208 adjustCursor(QPoint(0, 0));
209 break;
210#endif // QT_CONFIG(cursor)
211
212 case QEvent::MouseButtonPress: {
213 QMouseEvent *e = static_cast<QMouseEvent *>(event);
214 if (e->button() == Qt::LeftButton && startSeparatorMove(e->position().toPoint())) {
215 // The click was on a separator, eat this event
216 e->accept();
217 return true;
218 }
219 break;
220 }
221
222 case QEvent::MouseMove: {
223 QMouseEvent *e = static_cast<QMouseEvent *>(event);
224
225#if QT_CONFIG(cursor)
226 adjustCursor(e->position().toPoint());
227#endif
228 if (e->buttons() & Qt::LeftButton) {
229 if (separatorMove(e->position().toPoint())) {
230 // We're moving a separator, eat this event
231 e->accept();
232 return true;
233 }
234 }
235
236 break;
237 }
238
239 case QEvent::MouseButtonRelease: {
240 QMouseEvent *e = static_cast<QMouseEvent *>(event);
241 if (endSeparatorMove(e->position().toPoint())) {
242 // We've released a separator, eat this event
243 e->accept();
244 return true;
245 }
246 break;
247 }
248
249#if QT_CONFIG(cursor)
250 case QEvent::CursorChange:
251 // CursorChange events are triggered as mouse moves to new widgets even
252 // if the cursor doesn't actually change, so do not change oldCursor if
253 // the "changed" cursor has same shape as adjusted cursor.
254 if (cursorAdjusted && adjustedCursor.shape() != w->cursor().shape()) {
255 oldCursor = w->cursor();
256 hasOldCursor = w->testAttribute(Qt::WA_SetCursor);
257
258 // Ensure our adjusted cursor stays visible
259 w->setCursor(adjustedCursor);
260 }
261 break;
262#endif // QT_CONFIG(cursor)
263 case QEvent::Timer:
264 if (static_cast<QTimerEvent *>(event)->timerId() == separatorMoveTimer.timerId()) {
265 // let's move the separators
266 separatorMoveTimer.stop();
267 if (movingSeparator.isEmpty())
268 return true;
269 if (movingSeparatorOrigin == movingSeparatorPos)
270 return true;
271
272 // when moving the separator, we need to update the previous position
273 window()->update(layout()->dockAreaLayoutInfo()->separatorRegion());
274
275 layout()->layoutState = layout()->savedState;
276 layout()->dockAreaLayoutInfo()->separatorMove(movingSeparator, movingSeparatorOrigin,
277 movingSeparatorPos);
278 movingSeparatorPos = movingSeparatorOrigin;
279 return true;
280 }
281 break;
282 default:
283 break;
284 }
285 return false;
286}
287
288template <typename Layout>
289QList<int> QMainWindowLayoutSeparatorHelper<Layout>::findSeparator(const QPoint &pos) const
290{
291 Layout *layout = const_cast<Layout*>(this->layout());
292#if QT_CONFIG(toolbar)
293 QToolBarAreaLayout *toolBarAreaLayout = layout->toolBarAreaLayout();
294 if (toolBarAreaLayout && !toolBarAreaLayout->isEmpty()) {
295 // We might have a toolbar that is currently expanded, covering
296 // parts of the dock area, in which case we don't want the dock
297 // area layout to treat mouse events for the expanded toolbar as
298 // hitting a separator.
299 const QWidget *widget = layout->window();
300 QWidget *childWidget = widget->childAt(pos);
301 while (childWidget && childWidget != widget) {
302 if (auto *toolBar = qobject_cast<QToolBar*>(childWidget)) {
303 if (!toolBarAreaLayout->indexOf(toolBar).isEmpty())
304 return {};
305 }
306 childWidget = childWidget->parentWidget();
307 }
308 }
309#endif
310 return layout->dockAreaLayoutInfo()->findSeparator(pos);
311}
312
313template <typename Layout>
314bool QMainWindowLayoutSeparatorHelper<Layout>::startSeparatorMove(const QPoint &pos)
315{
316 movingSeparator = findSeparator(pos);
317
318 if (movingSeparator.isEmpty())
319 return false;
320
321 layout()->savedState = layout()->layoutState;
322 movingSeparatorPos = movingSeparatorOrigin = pos;
323
324 return true;
325}
326template <typename Layout>
327bool QMainWindowLayoutSeparatorHelper<Layout>::separatorMove(const QPoint &pos)
328{
329 if (movingSeparator.isEmpty())
330 return false;
331 movingSeparatorPos = pos;
332 separatorMoveTimer.start(0, window());
333 return true;
334}
335template <typename Layout>
336bool QMainWindowLayoutSeparatorHelper<Layout>::endSeparatorMove(const QPoint &)
337{
338 if (movingSeparator.isEmpty())
339 return false;
340 movingSeparator.clear();
341 layout()->savedState.clear();
342 return true;
343}
344
345class Q_AUTOTEST_EXPORT QDockWidgetGroupWindow : public QWidget
346{
347 Q_OBJECT
348public:
349 explicit QDockWidgetGroupWindow(QWidget *parent = nullptr, Qt::WindowFlags f = {})
350 : QWidget(parent, f)
351 {
352 }
353 QDockAreaLayoutInfo *layoutInfo() const;
354#if QT_CONFIG(tabbar)
355 const QDockAreaLayoutInfo *tabLayoutInfo() const;
356 QDockWidget *activeTabbedDockWidget() const;
357#endif
358 void destroyOrHideIfEmpty();
359 bool hasVisibleDockWidgets() const;
360 void adjustFlags();
361 bool hasNativeDecos() const;
362
363 bool hover(QLayoutItem *widgetItem, const QPoint &mousePos);
364 void updateCurrentGapRect();
365 void restore();
366 void apply();
367 void childEvent(QChildEvent *event) override;
368 void reparentToMainWindow(QDockWidget *dockWidget);
369 void destroyIfSingleItemLeft();
370 QList<QDockWidget *> dockWidgets() const { return findChildren<QDockWidget *>(); }
371
372 QRect currentGapRect;
373 QList<int> currentGapPos;
374
375signals:
376 void resized();
377
378protected:
379 bool event(QEvent *) override;
380 bool eventFilter(QObject *obj, QEvent *event) override;
381 void paintEvent(QPaintEvent*) override;
382
383private:
384 QSize m_removedFrameSize;
385};
386
387// This item will be used in the layout for the gap item. We cannot use QWidgetItem directly
388// because QWidgetItem functions return an empty size for widgets that are floating.
389class QDockWidgetGroupWindowItem : public QWidgetItem
390{
391public:
392 explicit QDockWidgetGroupWindowItem(QDockWidgetGroupWindow *parent) : QWidgetItem(parent) {}
393
394 // when the item contains a dock widget, obtain its size (to prevent infinite loop)
395 // ask the layout otherwise
396 QSize minimumSize() const override
397 {
398 if (auto dw = widget()->findChild<QDockWidget *>())
399 return dw->minimumSize();
400 return lay()->minimumSize();
401 }
402 QSize maximumSize() const override
403 {
404 auto dw = widget()->findChild<QDockWidget *>();
405 if (dw)
406 return dw->maximumSize();
407 return lay()->maximumSize();
408 }
409 QSize sizeHint() const override
410 {
411 auto dw = widget()->findChild<QDockWidget *>();
412 if (dw)
413 return dw->sizeHint();
414 return lay()->sizeHint();
415 }
416 QWidget* widget() const override { return wid; }
417
418private:
419 QLayout *lay() const { return const_cast<QDockWidgetGroupWindowItem *>(this)->widget()->layout(); }
420};
421#endif // QT_CONFIG(dockwidget)
422
423/* This data structure represents the state of all the tool-bars and dock-widgets. It's value based
424 so it can be easily copied into a temporary variable. All operations are performed without moving
425 any widgets. Only when we are sure we have the desired state, we call apply(), which moves the
426 widgets.
427*/
428
429class Q_AUTOTEST_EXPORT QMainWindowLayoutState
430{
431public:
432 enum class StateMarkers {
433 FloatingDockWidgetTab = 0xf9,
434 Tab = 0xfa,
435 Widget = 0xfb,
436 Sequence = 0xfc,
437 ToolBarEx = Sequence, // Extended toolbar marker (same value as Sequence for backward compatibility)
438 DockWidget = 0xfd,
439 ToolBar = 0xfe,
440 };
441
442 QRect rect;
443 QMainWindow *mainWindow;
444
445 QMainWindowLayoutState(QMainWindow *win);
446
447#if QT_CONFIG(toolbar)
448 QToolBarAreaLayout toolBarAreaLayout;
449#endif
450
451#if QT_CONFIG(dockwidget)
452 QDockAreaLayout dockAreaLayout;
453#else
454 QLayoutItem *centralWidgetItem;
455 QRect centralWidgetRect;
456#endif
457
458 void apply(QWidgetAnimator::AnimationRule rule);
459 void deleteAllLayoutItems();
460 void deleteCentralWidgetItem();
461
462 QSize sizeHint() const;
463 QSize minimumSize() const;
464 bool fits() const;
465 void fitLayout();
466
467 QLayoutItem *itemAt(int index, int *x) const;
468 QLayoutItem *takeAt(int index, int *x);
469 QList<int> indexOf(QWidget *widget) const;
470 QLayoutItem *item(const QList<int> &path);
471 QRect itemRect(const QList<int> &path) const;
472 QRect gapRect(const QList<int> &path) const; // ### get rid of this, use itemRect() instead
473
474 bool contains(QWidget *widget) const;
475
476 void setCentralWidget(QWidget *widget);
477 QWidget *centralWidget() const;
478
479 QList<int> gapIndex(QWidget *widget, const QPoint &pos) const;
480 bool insertGap(const QList<int> &path, QLayoutItem *item);
481 void remove(const QList<int> &path);
482 void remove(QLayoutItem *item);
483 void clear();
484 bool isValid() const;
485
486 QLayoutItem *plug(const QList<int> &path);
487 QLayoutItem *unplug(const QList<int> &path, QMainWindowLayoutState *savedState = nullptr);
488
489 void saveState(QDataStream &stream) const;
490 bool checkFormat(QDataStream &stream);
491 bool restoreState(QDataStream &stream, const QMainWindowLayoutState &oldState);
492 friend QDebug operator<<(QDebug debug, StateMarkers marker);
493 friend QDataStream &operator<<(QDataStream &stream, StateMarkers marker);
494 friend QDataStream &operator>>(QDataStream &stream, StateMarkers &marker);
495};
496
497class QMainWindowTabBar;
498class Q_AUTOTEST_EXPORT QMainWindowLayout
499 : public QLayout,
500 public QMainWindowLayoutSeparatorHelper<QMainWindowLayout>
501{
502 Q_OBJECT
503
504public:
505 QMainWindowLayoutState layoutState, savedState;
506 std::unique_ptr<QMainWindowLayoutState> restoredState;
507
508 QMainWindowLayout(QMainWindow *mainwindow, QLayout *parentLayout);
509 ~QMainWindowLayout();
510
511 QMainWindow::DockOptions dockOptions;
512 void setDockOptions(QMainWindow::DockOptions opts);
513
514 QLayoutItem *statusbar;
515
516 // status bar
517#if QT_CONFIG(statusbar)
518 QStatusBar *statusBar() const;
519 void setStatusBar(QStatusBar *sb);
520#endif
521
522 // central widget
523 QWidget *centralWidget() const;
524 void setCentralWidget(QWidget *cw);
525
526 // toolbars
527#if QT_CONFIG(toolbar)
528 void addToolBarBreak(Qt::ToolBarArea area);
529 void insertToolBarBreak(QToolBar *before);
530 void removeToolBarBreak(QToolBar *before);
531
532 void addToolBar(Qt::ToolBarArea area, QToolBar *toolbar, bool needAddChildWidget = true);
533 void insertToolBar(QToolBar *before, QToolBar *toolbar);
534 Qt::ToolBarArea toolBarArea(const QToolBar *toolbar) const;
535 bool toolBarBreak(QToolBar *toolBar) const;
536 void getStyleOptionInfo(QStyleOptionToolBar *option, QToolBar *toolBar) const;
537 void removeToolBar(QToolBar *toolbar);
538 void toggleToolBarsVisible();
539 void moveToolBar(QToolBar *toolbar, int pos);
540 QToolBarAreaLayout *toolBarAreaLayout() { return &layoutState.toolBarAreaLayout; }
541#endif
542
543 // dock widgets
544#if QT_CONFIG(dockwidget)
545 void setCorner(Qt::Corner corner, Qt::DockWidgetArea area);
546 Qt::DockWidgetArea corner(Qt::Corner corner) const;
547 enum DockWidgetAreaSize {Visible, Maximum};
548 QRect dockWidgetAreaRect(Qt::DockWidgetArea area, DockWidgetAreaSize size = Maximum) const;
549 void addDockWidget(Qt::DockWidgetArea area,
550 QDockWidget *dockwidget,
551 Qt::Orientation orientation);
552 void splitDockWidget(QDockWidget *after,
553 QDockWidget *dockwidget,
554 Qt::Orientation orientation);
555 Qt::DockWidgetArea dockWidgetArea(const QWidget* widget) const;
556 bool restoreDockWidget(QDockWidget *dockwidget);
557#if QT_CONFIG(tabbar)
558 void tabifyDockWidget(QDockWidget *first, QDockWidget *second);
559 void raise(QDockWidget *widget);
560 void setVerticalTabsEnabled(bool enabled);
561
562 QDockAreaLayoutInfo *dockInfo(QWidget *w);
563 bool _documentMode;
564 bool documentMode() const;
565 void setDocumentMode(bool enabled);
566
567 QTabBar *getTabBar();
568 void unuseTabBar(QTabBar *bar);
569 QSet<QTabBar*> usedTabBars;
570 bool verticalTabsEnabled;
571
572 QWidget *getSeparatorWidget();
573 QSet<QWidget*> usedSeparatorWidgets;
574 int sep; // separator extent
575
576#if QT_CONFIG(tabwidget)
577 QTabWidget::TabPosition tabPositions[QInternal::DockCount];
578 QTabWidget::TabShape _tabShape;
579
580 QTabWidget::TabShape tabShape() const;
581 void setTabShape(QTabWidget::TabShape tabShape);
582 QTabWidget::TabPosition tabPosition(Qt::DockWidgetArea area) const;
583 void setTabPosition(Qt::DockWidgetAreas areas, QTabWidget::TabPosition tabPosition);
584
585 QDockWidgetGroupWindow *createTabbedDockWindow();
586#endif // QT_CONFIG(tabwidget)
587#endif // QT_CONFIG(tabbar)
588
589 QDockAreaLayout *dockAreaLayoutInfo() { return &layoutState.dockAreaLayout; }
590 void keepSize(QDockWidget *w);
591#endif // QT_CONFIG(dockwidget)
592
593 // save/restore
594 enum VersionMarkers { // sentinel values used to validate state data
595 VersionMarker = 0xff
596 };
597 void saveState(QDataStream &stream) const;
598 bool restoreState(QDataStream &stream);
599 QBasicTimer discardRestoredStateTimer;
600
601 // QLayout interface
602 void addItem(QLayoutItem *item) override;
603 void setGeometry(const QRect &r) override;
604 QLayoutItem *itemAt(int index) const override;
605 QLayoutItem *takeAt(int index) override;
606 int count() const override;
607
608 QSize sizeHint() const override;
609 QSize minimumSize() const override;
610 mutable QSize szHint;
611 mutable QSize minSize;
612 void invalidate() override;
613
614 // animations
615 QWidgetAnimator widgetAnimator;
616 QList<int> currentGapPos;
617 QRect currentGapRect;
618 QWidget *pluggingWidget;
619#if QT_CONFIG(rubberband)
620 QPointer<QRubberBand> gapIndicator;
621#endif
622#if QT_CONFIG(dockwidget)
623 QPointer<QDockWidgetGroupWindow> currentHoveredFloat; // set when dragging over a floating dock widget
624 void setCurrentHoveredFloat(QDockWidgetGroupWindow *w);
625#if QT_CONFIG(tabbar)
626 bool isDockWidgetTabbed(const QDockWidget *dockWidget) const;
627 QList<QDockWidget *> tabifiedDockWidgets(const QDockWidget *dockWidget) const;
628 QMainWindowTabBar *findTabBar(const QDockWidget *dockWidget) const;
629#endif
630#endif
631 bool isInApplyState = false;
632
633 void hover(QLayoutItem *hoverTarget, const QPoint &mousePos);
634 bool plug(QLayoutItem *widgetItem);
635 QLayoutItem *unplug(QWidget *widget, QDockWidgetPrivate::DragScope scope);
636 void revert(QLayoutItem *widgetItem);
637 void applyState(QMainWindowLayoutState &newState, bool animate = true);
638 void applyRestoredState();
639 void restore(QInternal::SaveStateRule rule);
640 void animationFinished(QWidget *widget);
641
642#if QT_CONFIG(draganddrop)
643 static bool needsPlatformDrag();
644 Qt::DropAction performPlatformWidgetDrag(QLayoutItem *widgetItem, const QPoint &pressPosition);
645 QLayoutItem *draggingWidget = nullptr;
646#endif
647
648protected:
649 void timerEvent(QTimerEvent *e) override;
650
651private Q_SLOTS:
652 void updateGapIndicator();
653#if QT_CONFIG(dockwidget)
654#if QT_CONFIG(tabbar)
655 void tabChanged();
656 void tabMoved(int from, int to);
657 void tabifyWhileFloating(QDockWidget *first, QDockWidget *second);
658#endif
659#endif
660private:
661#if QT_CONFIG(tabbar)
662 void showTabBars();
663 void updateTabBarShapes();
664#endif
665 bool isInRestoreState = false;
666};
667
668#if QT_CONFIG(dockwidget) && !defined(QT_NO_DEBUG_STREAM)
669class QDebug;
670QDebug operator<<(QDebug debug, const QDockAreaLayout &layout);
671QDebug operator<<(QDebug debug, const QMainWindowLayout *layout);
672#endif
673
674QT_END_NAMESPACE
675
676#endif // QMAINWINDOWLAYOUT_P_H
The QDockWidget class provides a widget that can be docked inside a QMainWindow or floated as a top-l...
Definition qdockwidget.h:21
The QMainWindow class provides a main application window.
Definition qmainwindow.h:26
friend class QWidget
Definition qpainter.h:432
Combined button and popup list for selecting options.
QT_REQUIRE_CONFIG(animation)
static int grow(QLayoutStruct &ls, int delta)
static QRect dockedGeometry(QWidget *widget)
static Qt::DockWidgetArea toDockWidgetArea(QInternal::DockPosition pos)
static int realMinSize(const QDockAreaLayoutInfo &info)
static int qMax(int i1, int i2, int i3)
static int shrink(QLayoutStruct &ls, int delta)
Q_DECLARE_FLAGS(StateFlags, StateFlag)
static const int zero
static int separatorMoveHelper(QList< QLayoutStruct > &list, int index, int delta, int sep)
static QInternal::DockPosition dockPosHelper(const QRect &rect, const QPoint &_pos, Qt::Orientation o, bool nestingEnabled, QDockAreaLayoutInfo::TabMode tabMode)
static void paintSep(QPainter *p, QWidget *w, const QRect &r, Qt::Orientation o, bool mouse_over)
static int realMaxSize(const QDockAreaLayoutInfo &info)
QMainWindowLayout * qt_mainwindow_layout(const QMainWindow *window)
QT_REQUIRE_CONFIG(dockwidget)
QT_BEGIN_NAMESPACE Q_DECLARE_LOGGING_CATEGORY(lcQIORing)
QT_REQUIRE_CONFIG(mainwindow)