21 #ifndef __ctkComboBox_h
22 #define __ctkComboBox_h
29 #include "ctkWidgetsExport.h"
30 class ctkComboBoxPrivate;
47 Q_PROPERTY(QString defaultText READ defaultText WRITE setDefaultText)
48 Q_PROPERTY(QIcon defaultIcon READ defaultIcon WRITE setDefaultIcon)
49 Q_PROPERTY(
bool forceDefault READ isDefaultForced WRITE forceDefault)
50 Q_PROPERTY(Qt::TextElideMode elideMode READ elideMode WRITE setElideMode)
54 Q_PROPERTY(
ScrollEffect scrollWheelEffect READ scrollWheelEffect WRITE setScrollWheelEffect)
56 Q_PROPERTY(QString currentUserDataAsString READ currentUserDataAsString WRITE setCurrentUserDataAsString)
94 ScrollWithNoVScrollBar
122 QScopedPointer<ctkComboBoxPrivate>
d_ptr;
ctkComboBox is an advanced QComboBox. It adds multiple features:
QIcon defaultIcon() const
bool isDefaultForced() const
QScopedPointer< ctkComboBoxPrivate > d_ptr
void forceDefault(bool forceDefault)
void setScrollWheelEffect(ScrollEffect scroll)
Qt::TextElideMode elideMode() const
virtual void wheelEvent(QWheelEvent *event)
QString currentUserDataAsString() const
Get current item's user data as string.
void setCurrentUserDataAsString(QString userData)
Set current item based on user data.
void setDefaultText(const QString &)
Empty by default (same behavior as QComboBox)
ScrollEffect scrollWheelEffect() const
ScrollEffect
\tbd turn into flags ?
@ AlwaysScroll
Scrolling is always possible with the mouse wheel.
@ NeverScroll
Scrolling is not possible with the mouse wheel.
virtual QSize minimumSizeHint() const
Reimplemented for internal reasons.
QString defaultText() const
virtual void paintEvent(QPaintEvent *event)
Reimplemented for internal reasons.
void setElideMode(const Qt::TextElideMode &newMode)
virtual void changeEvent(QEvent *event)
void setDefaultIcon(const QIcon &)
Empty by default (same behavior as QComboBox)
ctkComboBox(QWidget *parent=0)
Constructor, build a ctkComboBox that behaves like QComboBox.
virtual QSize sizeHint() const
Reimplemented for internal reasons.