diff options
author | Norwegian Rock Cat <qt-info@nokia.com> | 2009-04-24 13:28:32 +0200 |
---|---|---|
committer | Norwegian Rock Cat <qt-info@nokia.com> | 2009-04-24 13:28:32 +0200 |
commit | ded95798869f7394f6b8a8a0a606988c14eaa357 (patch) | |
tree | decc3527e378a6abc9551fa5f220c515c6cfae77 /src |
Start my work on the qtsegmentcontrol
Diffstat (limited to 'src')
-rw-r--r-- | src/qtsegmentcontrol.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/src/qtsegmentcontrol.h b/src/qtsegmentcontrol.h new file mode 100644 index 0000000..60e4eb5 --- /dev/null +++ b/src/qtsegmentcontrol.h @@ -0,0 +1,48 @@ +/* + A whole bunch of stuff here. +*/ + +#include <QtGui/QWidget> + +class QtSegmentedControl +{ + Q_OBJECT +public: + enum SelectionBehavior { SelectOne, SelectAll, SelectNone } + + QtSegmentedControl(QWidget *parent = 0); + ~QtSegmentedControl(); + + int count() const; + void setCount(); + + bool isSegmentSelected(int index) const; + void setSegmentSelected(int index); + int selectedSegment() const; + + void setSegmentEnabled(int index, bool enable); + bool segmentEnabled(int index) const; + + void setSelectionBehavior(SelectionBehavior behavior); + SelectionBehavior selectionBehavior() const; + + void setSegmentText(const QString &text); + QString segmentText() const; + + void setSegmentIcon(const QIcon &icon); + QIcon segmentIcon() const; + + void setIconSize(const QSize &size); + QSize iconSize() const; + + void setMenu(QMenu *menu); + QMenu *menu() const; + + void setSegmentToolTip(int segment, const QString &tipText); + QString segmentToolTip(int segment) const; + + void setSegmentWhatsThis(int segment, const QString &whatsThisText); + QString segmentWhatsThis(int segment) const; + + virtual QSize segmentSizeHint(const QSize &size) const; +}; |