itom
4.1.0
|
ComboBox is an advanced QComboBox. It adds multiple features: More...
#include <comboBox.h>
Public Types | |
enum | ScrollEffect { NeverScroll, AlwaysScroll, ScrollWithFocus, ScrollWithNoVScrollBar } |
turn into flags ? More... | |
Public Slots | |
void | setCurrentUserDataAsString (QString userData) |
Set current item based on user data. | |
Public Member Functions | |
ComboBox (QWidget *parent=0) | |
Constructor, build a ComboBox that behaves like QComboBox. | |
void | setDefaultText (const QString &) |
Empty by default (same behavior as QComboBox) | |
QString | defaultText () const |
void | setDefaultIcon (const QIcon &) |
Empty by default (same behavior as QComboBox) | |
QIcon | defaultIcon () const |
void | forceDefault (bool forceDefault) |
bool | isDefaultForced () const |
void | setElideMode (const Qt::TextElideMode &newMode) |
Qt::TextElideMode | elideMode () const |
Q_ENUM (ScrollEffect) | |
ScrollEffect | scrollWheelEffect () const |
void | setScrollWheelEffect (ScrollEffect scroll) |
virtual QSize | minimumSizeHint () const |
Reimplemented for internal reasons. | |
virtual QSize | sizeHint () const |
Reimplemented for internal reasons. More... | |
QString | currentUserDataAsString () const |
Get current item's user data as string. | |
Protected Member Functions | |
virtual void | paintEvent (QPaintEvent *event) |
Reimplemented for internal reasons. | |
virtual void | changeEvent (QEvent *event) |
virtual void | wheelEvent (QWheelEvent *event) |
Protected Attributes | |
QScopedPointer< ComboBoxPrivate > | d_ptr |
Properties | |
QString | defaultText |
QIcon | defaultIcon |
bool | forceDefault |
Qt::TextElideMode | elideMode |
ScrollEffect | scrollWheelEffect |
QString | currentUserDataAsString |
Current item's user data as string (Qt::UserRole role) | |
Private Member Functions | |
Q_DECLARE_PRIVATE (ComboBox) | |
Q_DISABLE_COPY (ComboBox) | |
ComboBox is an advanced QComboBox. It adds multiple features:
turn into flags ?
void ComboBox::forceDefault | ( | bool | forceDefault | ) |
Force the display of the text/icon at all time (not only when the current index is invalid). False by default.
ScrollEffect ComboBox::scrollWheelEffect | ( | ) | const |
Return the scrollWheelEffect property value.
void ComboBox::setElideMode | ( | const Qt::TextElideMode & | newMode | ) |
setElideMode can elide the text displayed on the combobox. Qt::ElideNone by default (same behavior as QComboBox)
void ComboBox::setScrollWheelEffect | ( | ComboBox::ScrollEffect | scroll | ) |
Set the scrollWheelEffect property value.
|
virtual |
Reimplemented for internal reasons.
This implementation caches the size hint to avoid resizing when the contents change dynamically. To invalidate the cached value change the sizeAdjustPolicy.
|
readwrite |
This property controls the behavior of the mouse scroll wheel. ScrollOn by default. /sa scrollWheelEffect, setScrollWheelEffect