[KLF Application][KLF Tools][KLF Backend][KLF Home]
KLatexFormula Project

KLFEnumComboBox Class Reference

a combo box proposing a list of (integer) enumeration values. More...

#include <klfguiutil.h>

Inheritance diagram for KLFEnumComboBox:

Inheritance graph
[legend]
Collaboration diagram for KLFEnumComboBox:

Collaboration graph
[legend]

List of all members.

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


Detailed Description

a combo box proposing a list of (integer) enumeration values.

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:
We say "enumeration values" because that is this widget's main purpose, however of course this is just a widget that more conveniently connects a title displayed to the user with an integer, and allows the user to select the former while the program code manipulates the latter.

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.


Constructor & Destructor Documentation

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.


Member Function Documentation

int KLFEnumComboBox::selectedValue (  )  const

QString KLFEnumComboBox::enumText ( int  enumValue  )  const

Definition at line 310 of file klfguiutil.cpp.

References QList::contains(), and KLF_FUNC_NAME.

void KLFEnumComboBox::selectedValueChanged ( int  enumValue  )  [signal]

void KLFEnumComboBox::setSelectedValue ( int  val  )  [slot]

Definition at line 319 of file klfguiutil.cpp.

References QMap::contains(), and KLF_FUNC_NAME.

void KLFEnumComboBox::setEnumValues ( const QList< int > &  enumValues,
const QStringList &  enumTitles 
) [slot]


Property Documentation

int KLFEnumComboBox::selectedValue [read, write]

Definition at line 343 of file klfguiutil.h.


The documentation for this class was generated from the following files:

Generated by doxygen 1.5.6