46 Q_PROPERTY(QQmlListProperty<Action> actions READ actionsProperty NOTIFY actionsChanged FINAL)
47 Q_PROPERTY(QList<Action*> hiddenActions READ hiddenActions NOTIFY hiddenActionsChanged FINAL)
48 Q_PROPERTY(QQmlComponent* fullDelegate READ fullDelegate WRITE setFullDelegate NOTIFY
49 fullDelegateChanged FINAL)
50 Q_PROPERTY(QQmlComponent* iconDelegate READ iconDelegate WRITE setIconDelegate NOTIFY
51 iconDelegateChanged FINAL)
52 Q_PROPERTY(QQmlComponent* separatorDelegate READ separatorDelegate WRITE setSeparatorDelegate
53 NOTIFY separatorDelegateChanged FINAL)
54 Q_PROPERTY(QQuickItem* moreButtonItem READ moreButtonItem NOTIFY moreButtonItemChanged FINAL)
55 Q_PROPERTY(QQmlComponent* moreButton READ moreButton WRITE setMoreButton NOTIFY
56 moreButtonChanged FINAL)
57 Q_PROPERTY(qreal spacing READ spacing WRITE setSpacing NOTIFY spacingChanged FINAL)
59 Qt::Alignment alignment READ alignment WRITE setAlignment NOTIFY alignmentChanged FINAL)
60 Q_PROPERTY(qreal visibleWidth READ visibleWidth NOTIFY visibleWidthChanged FINAL)
61 Q_PROPERTY(qreal minimumWidth READ minimumWidth NOTIFY minimumWidthChanged FINAL)
62 Q_PROPERTY(Qt::LayoutDirection layoutDirection READ layoutDirection WRITE setLayoutDirection
63 NOTIFY layoutDirectionChanged FINAL)
65 HeightMode heightMode READ heightMode WRITE setHeightMode NOTIFY heightModeChanged FINAL)
66 Q_PROPERTY(qint32 maxShowActionNum READ maxShowActionNum WRITE setMaxShowActionNum NOTIFY
67 maxShowActionNumChanged FINAL)
70 using ActionsProperty = QQmlListProperty<Action>;
83 enum DisplayHint : uint
89 HideChildIndicator = 8,
91 Q_DECLARE_FLAGS(DisplayHints, DisplayHint)
94 static bool isDisplayHintSet(DisplayHints values, DisplayHint hint);
99 ActionsProperty actionsProperty()
const;
100 void addAction(Action* action);
101 void removeAction(Action* action);
103 Q_SIGNAL
void actionsChanged();
105 QList<Action*> hiddenActions()
const;
106 Q_SIGNAL
void hiddenActionsChanged();
108 QQmlComponent* fullDelegate()
const;
109 void setFullDelegate(QQmlComponent* newFullDelegate);
110 Q_SIGNAL
void fullDelegateChanged();
112 QQmlComponent* iconDelegate()
const;
113 void setIconDelegate(QQmlComponent* newIconDelegate);
114 Q_SIGNAL
void iconDelegateChanged();
116 QQmlComponent* separatorDelegate()
const;
117 void setSeparatorDelegate(QQmlComponent* newSeparatorDelegate);
118 Q_SIGNAL
void separatorDelegateChanged();
120 QQuickItem* moreButtonItem()
const;
121 Q_SIGNAL
void moreButtonItemChanged();
122 QQmlComponent* moreButton()
const;
123 void setMoreButton(QQmlComponent* newMoreButton);
124 Q_SIGNAL
void moreButtonChanged();
126 qreal spacing()
const;
127 void setSpacing(qreal newSpacing);
128 Q_SIGNAL
void spacingChanged();
130 Qt::Alignment alignment()
const;
131 void setAlignment(Qt::Alignment newAlignment);
132 Q_SIGNAL
void alignmentChanged();
134 qreal visibleWidth()
const;
135 Q_SIGNAL
void visibleWidthChanged();
137 qreal minimumWidth()
const;
138 Q_SIGNAL
void minimumWidthChanged();
140 Qt::LayoutDirection layoutDirection()
const;
141 void setLayoutDirection(Qt::LayoutDirection& newLayoutDirection);
142 Q_SIGNAL
void layoutDirectionChanged();
144 HeightMode heightMode()
const;
145 void setHeightMode(HeightMode newHeightMode);
146 Q_SIGNAL
void heightModeChanged();
148 qint32 maxShowActionNum()
const;
149 void setMaxShowActionNum(qint32 maxShowActionNum);
150 Q_SIGNAL
void maxShowActionNumChanged();
152 Q_SLOT
void relayout();
159 void componentComplete()
override;
160 void geometryChange(
const QRectF& newGeometry,
const QRectF& oldGeometry)
override;
161 void itemChange(QQuickItem::ItemChange change,
const QQuickItem::ItemChangeData& data)
override;
162 void updatePolish()
override;
165 friend class ToolBarLayoutPrivate;
166 const std::unique_ptr<ToolBarLayoutPrivate> d;