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(QQmlComponent* moreButton READ moreButton WRITE setMoreButton NOTIFY
55 moreButtonChanged FINAL)
56 Q_PROPERTY(qreal spacing READ spacing WRITE setSpacing NOTIFY spacingChanged FINAL)
58 Qt::Alignment alignment READ alignment WRITE setAlignment NOTIFY alignmentChanged FINAL)
59 Q_PROPERTY(qreal visibleWidth READ visibleWidth NOTIFY visibleWidthChanged FINAL)
60 Q_PROPERTY(qreal minimumWidth READ minimumWidth NOTIFY minimumWidthChanged FINAL)
61 Q_PROPERTY(Qt::LayoutDirection layoutDirection READ layoutDirection WRITE setLayoutDirection
62 NOTIFY layoutDirectionChanged FINAL)
64 HeightMode heightMode READ heightMode WRITE setHeightMode NOTIFY heightModeChanged FINAL)
65 Q_PROPERTY(qint32 maxShowActionNum READ maxShowActionNum WRITE setMaxShowActionNum NOTIFY
66 maxShowActionNumChanged FINAL)
69 using ActionsProperty = QQmlListProperty<Action>;
82 enum DisplayHint : uint
88 HideChildIndicator = 8,
90 Q_DECLARE_FLAGS(DisplayHints, DisplayHint)
93 static bool isDisplayHintSet(DisplayHints values, DisplayHint hint);
98 ActionsProperty actionsProperty()
const;
99 void addAction(Action* action);
100 void removeAction(Action* action);
102 Q_SIGNAL
void actionsChanged();
104 QList<Action*> hiddenActions()
const;
105 Q_SIGNAL
void hiddenActionsChanged();
107 QQmlComponent* fullDelegate()
const;
108 void setFullDelegate(QQmlComponent* newFullDelegate);
109 Q_SIGNAL
void fullDelegateChanged();
111 QQmlComponent* iconDelegate()
const;
112 void setIconDelegate(QQmlComponent* newIconDelegate);
113 Q_SIGNAL
void iconDelegateChanged();
115 QQmlComponent* separatorDelegate()
const;
116 void setSeparatorDelegate(QQmlComponent* newSeparatorDelegate);
117 Q_SIGNAL
void separatorDelegateChanged();
119 QQmlComponent* moreButton()
const;
120 void setMoreButton(QQmlComponent* newMoreButton);
121 Q_SIGNAL
void moreButtonChanged();
123 qreal spacing()
const;
124 void setSpacing(qreal newSpacing);
125 Q_SIGNAL
void spacingChanged();
127 Qt::Alignment alignment()
const;
128 void setAlignment(Qt::Alignment newAlignment);
129 Q_SIGNAL
void alignmentChanged();
131 qreal visibleWidth()
const;
132 Q_SIGNAL
void visibleWidthChanged();
134 qreal minimumWidth()
const;
135 Q_SIGNAL
void minimumWidthChanged();
137 Qt::LayoutDirection layoutDirection()
const;
138 void setLayoutDirection(Qt::LayoutDirection& newLayoutDirection);
139 Q_SIGNAL
void layoutDirectionChanged();
141 HeightMode heightMode()
const;
142 void setHeightMode(HeightMode newHeightMode);
143 Q_SIGNAL
void heightModeChanged();
145 qint32 maxShowActionNum()
const;
146 void setMaxShowActionNum(qint32 maxShowActionNum);
147 Q_SIGNAL
void maxShowActionNumChanged();
149 Q_SLOT
void relayout();
156 void componentComplete()
override;
157 void geometryChange(
const QRectF& newGeometry,
const QRectF& oldGeometry)
override;
158 void itemChange(QQuickItem::ItemChange change,
const QQuickItem::ItemChangeData& data)
override;
159 void updatePolish()
override;
162 friend class ToolBarLayoutPrivate;
163 const std::unique_ptr<ToolBarLayoutPrivate> d;