Image Component Library (ICL)
|
Handle class for combo components. More...
#include <ComboHandle.h>
Public Member Functions | |
ComboHandle () | |
create an empty handle | |
ComboHandle (QComboBox *cb, GUIWidget *w) | |
create a new ComboHandle wrapping a given QComboBox | |
ICLQt_API void | add (const std::string &item) |
add an item | |
ICLQt_API void | remove (const std::string &item) |
remove an item | |
ICLQt_API void | remove (int idx) |
remove item at given index | |
ICLQt_API void | clear () |
void remove all items | |
ICLQt_API std::string | getItem (int idx) const |
returns the item at given index | |
ICLQt_API int | getIndex (const std::string &item) const |
returns the index of a given item | |
ICLQt_API int | getSelectedIndex () const |
returns the currently selected index | |
ICLQt_API std::string | getSelectedItem () const |
returns the currently selected item | |
ICLQt_API int | getItemCount () const |
returns the count of elements | |
ICLQt_API void | setSelectedIndex (int idx) |
sets the current index | |
ICLQt_API void | setSelectedItem (const std::string &item) |
sets the current item | |
operator int () const | |
convenience operator wrapping getSelectedIndex | |
operator std::string () const | |
convenience operator wrapping getSelectedItem | |
Private Member Functions | |
QComboBox * | cbx () |
utility function (internally used) | |
const QComboBox * | cbx () const |
utility function (internally used) |
Handle class for combo components.
icl::qt::ComboHandle::ComboHandle | ( | ) | [inline] |
create an empty handle
icl::qt::ComboHandle::ComboHandle | ( | QComboBox * | cb, |
GUIWidget * | w | ||
) | [inline] |
create a new ComboHandle wrapping a given QComboBox
ICLQt_API void icl::qt::ComboHandle::add | ( | const std::string & | item | ) |
add an item
QComboBox* icl::qt::ComboHandle::cbx | ( | ) | [inline, private] |
utility function (internally used)
const QComboBox* icl::qt::ComboHandle::cbx | ( | ) | const [inline, private] |
utility function (internally used)
ICLQt_API void icl::qt::ComboHandle::clear | ( | ) |
void remove all items
ICLQt_API int icl::qt::ComboHandle::getIndex | ( | const std::string & | item | ) | const |
returns the index of a given item
ICLQt_API std::string icl::qt::ComboHandle::getItem | ( | int | idx | ) | const |
returns the item at given index
ICLQt_API int icl::qt::ComboHandle::getItemCount | ( | ) | const |
returns the count of elements
ICLQt_API int icl::qt::ComboHandle::getSelectedIndex | ( | ) | const |
returns the currently selected index
ICLQt_API std::string icl::qt::ComboHandle::getSelectedItem | ( | ) | const |
returns the currently selected item
icl::qt::ComboHandle::operator int | ( | ) | const [inline] |
convenience operator wrapping getSelectedIndex
icl::qt::ComboHandle::operator std::string | ( | ) | const [inline] |
convenience operator wrapping getSelectedItem
ICLQt_API void icl::qt::ComboHandle::remove | ( | const std::string & | item | ) |
remove an item
ICLQt_API void icl::qt::ComboHandle::remove | ( | int | idx | ) |
remove item at given index
ICLQt_API void icl::qt::ComboHandle::setSelectedIndex | ( | int | idx | ) |
sets the current index
ICLQt_API void icl::qt::ComboHandle::setSelectedItem | ( | const std::string & | item | ) |
sets the current item