2#include "qml_material/style/button_interaction_state.hpp"
3Q_MOC_INCLUDE(
"qml_material/control/selection_button.hpp")
7class QML_MATERIAL_API RailItemState :
public ButtonInteractionState {
9 QML_NAMED_ELEMENT(StateRailItem)
10 Q_PROPERTY(qml_material::SelectionButton* item READ item WRITE setItem NOTIFY itemChanged FINAL)
11 Q_PROPERTY(QColor collapsedLabelColor READ collapsedLabelColor NOTIFY collapsedLabelColorChanged
12 BINDABLE bindableCollapsedLabelColor FINAL)
13 Q_PROPERTY(QColor expandedLabelColor READ expandedLabelColor NOTIFY expandedLabelColorChanged
14 BINDABLE bindableExpandedLabelColor FINAL)
15 Q_PROPERTY(QColor selectedIndicatorColor READ selectedIndicatorColor NOTIFY
16 selectedIndicatorColorChanged BINDABLE bindableSelectedIndicatorColor FINAL)
18 explicit RailItemState(QObject* parent =
nullptr);
19 SelectionButton* item()
const;
20 void setItem(SelectionButton*);
21 QColor collapsedLabelColor()
const;
22 QColor expandedLabelColor()
const;
23 QBindable<QColor> bindableCollapsedLabelColor()
const;
24 QBindable<QColor> bindableExpandedLabelColor()
const;
25 QColor selectedIndicatorColor()
const;
26 QBindable<QColor> bindableSelectedIndicatorColor()
const;
27 Q_SIGNAL
void collapsedLabelColorChanged();
28 Q_SIGNAL
void expandedLabelColorChanged();
29 Q_SIGNAL
void selectedIndicatorColorChanged();
32 Q_OBJECT_BINDABLE_PROPERTY(RailItemState, QColor, m_collapsedLabelColor,
33 &RailItemState::collapsedLabelColorChanged)
34 Q_OBJECT_BINDABLE_PROPERTY(RailItemState, QColor, m_expandedLabelColor,
35 &RailItemState::expandedLabelColorChanged)
36 Q_OBJECT_BINDABLE_PROPERTY(RailItemState, QColor, m_selectedIndicatorColor,
37 &RailItemState::selectedIndicatorColorChanged)
38 BindingLifetime m_bindingLifetime { bindingSet().lifetime() };