#include <klfguiutil.h>


Public Slots | |
| void | setSelectedValue (int val) |
| void | setEnumValues (const QList< int > &enumValues, const QStringList &enumTitles) |
Signals | |
| void | selectedValueChanged (int enumValue) |
Public Member Functions | |
| KLFEnumComboBox (QWidget *parent=0) | |
| KLFEnumComboBox (const QList< int > &enumValues, const QStringList &enumTitles, QWidget *parent=0) | |
| virtual | ~KLFEnumComboBox () |
| int | selectedValue () const |
| QString | enumText (int enumValue) const |
Properties | |
| int | selectedValue |
Utility class built over QComboBox that can be used to propose a list of enumeration values to user.
You can set the enumeration values in the constructor or with setEnumValues(), and retrieve the currently selected enum value with selectedValue().
Note also that this widget sets item data in the QComboBox with setItemData() using the default role number. If you want also to set item data, use another role number!
Definition at line 339 of file klfguiutil.h.
| KLFEnumComboBox::KLFEnumComboBox | ( | QWidget * | parent = 0 |
) |
Definition at line 263 of file klfguiutil.cpp.
References QComboBox::currentIndexChanged(), and setEnumValues().
| KLFEnumComboBox::KLFEnumComboBox | ( | const QList< int > & | enumValues, | |
| const QStringList & | enumTitles, | |||
| QWidget * | parent = 0 | |||
| ) |
Definition at line 270 of file klfguiutil.cpp.
References QComboBox::currentIndexChanged(), and setEnumValues().
| KLFEnumComboBox::~KLFEnumComboBox | ( | ) | [virtual] |
Definition at line 278 of file klfguiutil.cpp.
| int KLFEnumComboBox::selectedValue | ( | ) | const |
| QString KLFEnumComboBox::enumText | ( | int | enumValue | ) | const |
| void KLFEnumComboBox::selectedValueChanged | ( | int | enumValue | ) | [signal] |
| void KLFEnumComboBox::setSelectedValue | ( | int | val | ) | [slot] |
| void KLFEnumComboBox::setEnumValues | ( | const QList< int > & | enumValues, | |
| const QStringList & | enumTitles | |||
| ) | [slot] |
Definition at line 282 of file klfguiutil.cpp.
References QComboBox::clear(), QComboBox::insertItem(), KLF_DEBUG_BLOCK, KLF_FUNC_NAME, klfDbg, and QList::size().
Referenced by KLFEnumComboBox().
int KLFEnumComboBox::selectedValue [read, write] |
Definition at line 343 of file klfguiutil.h.