5#ifndef QTOOLBARLAYOUT_P_H
6#define QTOOLBARLAYOUT_P_H
19#include <QtWidgets/private/qtwidgetsglobal_p.h>
20#include <QtWidgets/qlayout.h>
21#include <private/qlayoutengine_p.h>
29class QToolBarExtension;
47 QToolBarLayout(QWidget *parent =
nullptr);
50 void addItem(QLayoutItem *item) override;
51 QLayoutItem *itemAt(
int index)
const override;
52 QLayoutItem *takeAt(
int index) override;
53 int count()
const override;
55 bool isEmpty()
const override;
56 void invalidate() override;
57 Qt::Orientations expandingDirections()
const override;
59 void setGeometry(
const QRect &r) override;
60 QSize minimumSize()
const override;
61 QSize sizeHint()
const override;
63 void insertAction(
int index, QAction *action);
64 int indexOf(
const QAction *action)
const;
65 using QLayout::indexOf;
67 bool layoutActions(
const QSize &size);
68 QSize expandedSize(
const QSize &size)
const;
69 bool expanded, animating;
71 void setUsePopupMenu(
bool set);
72 void checkUsePopupMenu();
75 void updateMarginAndSpacing();
76 bool hasExpandFlag()
const;
78 void updateMacBorderMetrics();
80 void setExpanded(
bool b);
83 QList<QToolBarItem*> items;
85 bool dirty, expanding, empty, expandFlag;
86 QList<QLayoutStruct> geomArray;
88 QToolBarExtension *extension;
90 void updateGeomArray()
const;
91 QToolBarItem *createItem(QAction *action);
QT_REQUIRE_CONFIG(animation)
QMainWindowLayout * qt_mainwindow_layout(const QMainWindow *window)