20 Q_PROPERTY( Qt::Orientation orientation READ orientation
21 WRITE setOrientation NOTIFY orientationChanged )
23 Q_PROPERTY( QVector< QskLabelData > options READ options
24 WRITE setOptions NOTIFY optionsChanged )
26 Q_PROPERTY(
int count READ count )
28 Q_PROPERTY(
int selectedIndex READ selectedIndex
29 WRITE setSelectedIndex NOTIFY selectedIndexChanged USER
true )
31 Q_PROPERTY(
int currentIndex READ currentIndex
32 WRITE setCurrentIndex NOTIFY currentIndexChanged )
34 Q_PROPERTY( QString currentText READ currentText )
39 QSK_SUBCONTROLS( Panel, Splash, Segment, Separator, Cursor, Text, Icon )
40 QSK_STATES( Selected, Pressed )
47 void setOrientation( Qt::Orientation );
48 Qt::Orientation orientation()
const;
53 int addOption(
const QUrl&,
const QString& );
56 void setOptions(
const QVector< QskLabelData >& );
57 void setOptions(
const QStringList& );
59 QVector< QskLabelData > options()
const;
64 int selectedIndex()
const;
65 int currentIndex()
const;
67 QString currentText()
const;
71 void setSegmentEnabled(
int,
bool );
72 bool isSegmentEnabled(
int )
const;
74 int indexAtPosition(
const QPointF& )
const;
80 void setSelectedIndex(
int index );
81 void setCurrentIndex(
int index );
84 void selectedIndexChanged(
int );
85 void currentIndexChanged(
int );
86 void optionsChanged();
87 void orientationChanged();
90 void mousePressEvent( QMouseEvent* )
override;
91 void mouseReleaseEvent( QMouseEvent* )
override;
94 void keyPressEvent( QKeyEvent* )
override;
95 void keyReleaseEvent( QKeyEvent* )
override;
98 void hoverMoveEvent( QHoverEvent* )
override;
101 void focusInEvent( QFocusEvent* )
override;
102 void focusOutEvent( QFocusEvent* )
override;
105 int nextIndex(
int index,
bool forward )
const;
108 std::unique_ptr< PrivateData > m_data;