46 Q_PROPERTY(QQmlListProperty<QObject> actions READ actionsProperty NOTIFY actionsChanged FINAL)
47 Q_PROPERTY(QList<QObject *> hiddenActions READ hiddenActions NOTIFY hiddenActionsChanged FINAL)
48 Q_PROPERTY(QQmlComponent *fullDelegate READ fullDelegate WRITE setFullDelegate NOTIFY fullDelegateChanged FINAL)
49 Q_PROPERTY(QQmlComponent *iconDelegate READ iconDelegate WRITE setIconDelegate NOTIFY iconDelegateChanged FINAL)
50 Q_PROPERTY(QQmlComponent *separatorDelegate READ separatorDelegate WRITE setSeparatorDelegate NOTIFY separatorDelegateChanged FINAL)
51 Q_PROPERTY(QQmlComponent *moreButton READ moreButton WRITE setMoreButton NOTIFY moreButtonChanged FINAL)
52 Q_PROPERTY(qreal spacing READ spacing WRITE setSpacing NOTIFY spacingChanged FINAL)
53 Q_PROPERTY(Qt::Alignment alignment READ alignment WRITE setAlignment NOTIFY alignmentChanged FINAL)
54 Q_PROPERTY(qreal visibleWidth READ visibleWidth NOTIFY visibleWidthChanged FINAL)
55 Q_PROPERTY(qreal minimumWidth READ minimumWidth NOTIFY minimumWidthChanged FINAL)
56 Q_PROPERTY(Qt::LayoutDirection layoutDirection READ layoutDirection WRITE setLayoutDirection NOTIFY layoutDirectionChanged FINAL)
57 Q_PROPERTY(HeightMode heightMode READ heightMode WRITE setHeightMode NOTIFY heightModeChanged FINAL)
58 Q_PROPERTY(qint32 maxShowActionNum READ maxShowActionNum WRITE setMaxShowActionNum NOTIFY maxShowActionNumChanged FINAL)
61 using ActionsProperty = QQmlListProperty<QObject>;
73 enum DisplayHint : uint {
78 HideChildIndicator = 8,
80 Q_DECLARE_FLAGS(DisplayHints, DisplayHint)
83 static bool isDisplayHintSet(DisplayHints values, DisplayHint hint);
88 ActionsProperty actionsProperty()
const;
89 void addAction(QObject *action);
90 void removeAction(QObject *action);
92 Q_SIGNAL
void actionsChanged();
94 QList<QObject *> hiddenActions()
const;
95 Q_SIGNAL
void hiddenActionsChanged();
97 QQmlComponent *fullDelegate()
const;
98 void setFullDelegate(QQmlComponent *newFullDelegate);
99 Q_SIGNAL
void fullDelegateChanged();
101 QQmlComponent *iconDelegate()
const;
102 void setIconDelegate(QQmlComponent *newIconDelegate);
103 Q_SIGNAL
void iconDelegateChanged();
105 QQmlComponent *separatorDelegate()
const;
106 void setSeparatorDelegate(QQmlComponent *newSeparatorDelegate);
107 Q_SIGNAL
void separatorDelegateChanged();
109 QQmlComponent *moreButton()
const;
110 void setMoreButton(QQmlComponent *newMoreButton);
111 Q_SIGNAL
void moreButtonChanged();
113 qreal spacing()
const;
114 void setSpacing(qreal newSpacing);
115 Q_SIGNAL
void spacingChanged();
117 Qt::Alignment alignment()
const;
118 void setAlignment(Qt::Alignment newAlignment);
119 Q_SIGNAL
void alignmentChanged();
121 qreal visibleWidth()
const;
122 Q_SIGNAL
void visibleWidthChanged();
124 qreal minimumWidth()
const;
125 Q_SIGNAL
void minimumWidthChanged();
127 Qt::LayoutDirection layoutDirection()
const;
128 void setLayoutDirection(Qt::LayoutDirection &newLayoutDirection);
129 Q_SIGNAL
void layoutDirectionChanged();
131 HeightMode heightMode()
const;
132 void setHeightMode(HeightMode newHeightMode);
133 Q_SIGNAL
void heightModeChanged();
135 qint32 maxShowActionNum()
const;
136 void setMaxShowActionNum(qint32 maxShowActionNum);
137 Q_SIGNAL
void maxShowActionNumChanged();
139 Q_SLOT
void relayout();
147 void componentComplete()
override;
148 void geometryChange(
const QRectF &newGeometry,
const QRectF &oldGeometry)
override;
149 void itemChange(QQuickItem::ItemChange change,
const QQuickItem::ItemChangeData &data)
override;
150 void updatePolish()
override;
153 friend class ToolBarLayoutPrivate;
154 const std::unique_ptr<ToolBarLayoutPrivate> d;