Image Component Library (ICL)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Member Functions
icl::qt::ComboHandle Class Reference

Handle class for combo components. More...

#include <ComboHandle.h>

Inheritance diagram for icl::qt::ComboHandle:
icl::qt::GUIHandle< QComboBox > icl::qt::GUIHandleBase

List of all members.

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)

Detailed Description

Handle class for combo components.


Constructor & Destructor Documentation

create an empty handle

icl::qt::ComboHandle::ComboHandle ( QComboBox *  cb,
GUIWidget w 
) [inline]

create a new ComboHandle wrapping a given QComboBox


Member Function Documentation

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)

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

returns the count of elements

returns the currently selected index

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

remove item at given index

sets the current index

ICLQt_API void icl::qt::ComboHandle::setSelectedItem ( const std::string &  item)

sets the current item


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines