Public Types | Public Slots | Signals | Public Member Functions | Protected Slots | Protected Member Functions | Properties

ctkAddRemoveComboBox Class Reference

#include <Libs/Widgets/ctkAddRemoveComboBox.h>

List of all members.

Public Types

typedef QWidget Superclass
 Superclass typedef.

Public Slots

void setCurrentIndex (int index)

Signals

void activated (int index)
void currentIndexChanged (int index)
void itemAboutToBeRemoved (int index)
void itemAdded (int index)
void itemRemoved (int index)

Public Member Functions

bool addEnabled () const
void addItem (const QString &text, const QVariant &userDataVariable=QVariant())
void addItem (const QIcon &icon, const QString &text, const QVariant &userDataVariable=QVariant())
void addItems (const QStringList &texts)
void clear ()
bool comboBoxEnabled () const
int count () const
 ctkAddRemoveComboBox (QWidget *parent=0)
 Constructors.
QVariant currentData (int role=Qt::UserRole) const
int currentIndex () const
QString currentText () const
bool editEnabled () const
bool empty () const
QString emptyText () const
int findData (const QVariant &data, int role=Qt::UserRole, Qt::MatchFlags flags=Qt::MatchExactly|Qt::MatchCaseSensitive) const
int findText (const QString &text, Qt::MatchFlags flags=Qt::MatchExactly|Qt::MatchCaseSensitive) const
void insertItem (int index, const QString &text, const QVariant &userDataVariable=QVariant())
void insertItem (int index, const QIcon &icon, const QString &text, const QVariant &userDataVariable=QVariant())
void insertItems (int index, const QStringList &texts)
QVariant itemData (int index, int role=Qt::UserRole) const
QString itemText (int index) const
virtual void printAdditionalInfo ()
void removeCurrentItem ()
bool removeEnabled () const
void removeItem (int index)
void setAddEnabled (bool enable)
void setComboBoxEnabled (bool enable)
void setEditEnabled (bool enable)
void setEmptyText (const QString &text)
void setItemData (int index, const QVariant &data, int role=Qt::UserRole)
void setItemText (int index, const QString &text)
void setRemoveEnabled (bool enable)
virtual ~ctkAddRemoveComboBox ()

Protected Slots

virtual void onAdd ()
virtual void onEdit ()
virtual void onRemove ()

Protected Member Functions

QAbstractItemModel * model () const
int modelColumn () const
QModelIndex rootModelIndex () const
void setComboBox (QComboBox *comboBox)
void setRootModelIndex (const QModelIndex &root)

Properties

bool addEnabled
bool editEnabled
QString emptyText
bool removeEnabled

Detailed Description

Definition at line 37 of file ctkAddRemoveComboBox.h.


Member Typedef Documentation

Superclass typedef.

Definition at line 47 of file ctkAddRemoveComboBox.h.


Constructor & Destructor Documentation

ctkAddRemoveComboBox::ctkAddRemoveComboBox ( QWidget *  parent = 0  )  [explicit]

Constructors.

Definition at line 124 of file ctkAddRemoveComboBox.cpp.

virtual ctkAddRemoveComboBox::~ctkAddRemoveComboBox (  )  [inline, virtual]

Definition at line 51 of file ctkAddRemoveComboBox.h.


Member Function Documentation

void ctkAddRemoveComboBox::activated ( int  index  )  [signal]
bool ctkAddRemoveComboBox::addEnabled (  )  const
void ctkAddRemoveComboBox::addItem ( const QString &  text,
const QVariant &  userDataVariable = QVariant() 
) [inline]

Definition at line 79 of file ctkAddRemoveComboBox.h.

void ctkAddRemoveComboBox::addItem ( const QIcon &  icon,
const QString &  text,
const QVariant &  userDataVariable = QVariant() 
) [inline]

Definition at line 81 of file ctkAddRemoveComboBox.h.

void ctkAddRemoveComboBox::addItems ( const QStringList &  texts  )  [inline]

Definition at line 83 of file ctkAddRemoveComboBox.h.

void ctkAddRemoveComboBox::clear (  ) 

Remove all the items

Definition at line 505 of file ctkAddRemoveComboBox.cpp.

bool ctkAddRemoveComboBox::comboBoxEnabled (  )  const

Definition at line 304 of file ctkAddRemoveComboBox.cpp.

int ctkAddRemoveComboBox::count (  )  const

Return the number of item

Definition at line 377 of file ctkAddRemoveComboBox.cpp.

QVariant ctkAddRemoveComboBox::currentData ( int  role = Qt::UserRole  )  const [inline]

Definition at line 113 of file ctkAddRemoveComboBox.h.

int ctkAddRemoveComboBox::currentIndex (  )  const

Return the current item

Definition at line 485 of file ctkAddRemoveComboBox.cpp.

void ctkAddRemoveComboBox::currentIndexChanged ( int  index  )  [signal]
QString ctkAddRemoveComboBox::currentText (  )  const [inline]

Definition at line 111 of file ctkAddRemoveComboBox.h.

bool ctkAddRemoveComboBox::editEnabled (  )  const
bool ctkAddRemoveComboBox::empty (  )  const
QString ctkAddRemoveComboBox::emptyText (  )  const
int ctkAddRemoveComboBox::findData ( const QVariant &  data,
int  role = Qt::UserRole,
Qt::MatchFlags  flags = Qt::MatchExactly | Qt::MatchCaseSensitive 
) const

Definition at line 425 of file ctkAddRemoveComboBox.cpp.

int ctkAddRemoveComboBox::findText ( const QString &  text,
Qt::MatchFlags  flags = Qt::MatchExactly | Qt::MatchCaseSensitive 
) const

Returns the index of the item containing the given text; otherwise returns -1. The flags specify how the items in the combobox are searched.

Definition at line 412 of file ctkAddRemoveComboBox.cpp.

void ctkAddRemoveComboBox::insertItem ( int  index,
const QIcon &  icon,
const QString &  text,
const QVariant &  userDataVariable = QVariant() 
)

Definition at line 400 of file ctkAddRemoveComboBox.cpp.

void ctkAddRemoveComboBox::insertItem ( int  index,
const QString &  text,
const QVariant &  userDataVariable = QVariant() 
)

Definition at line 393 of file ctkAddRemoveComboBox.cpp.

void ctkAddRemoveComboBox::insertItems ( int  index,
const QStringList &  texts 
)

Definition at line 406 of file ctkAddRemoveComboBox.cpp.

void ctkAddRemoveComboBox::itemAboutToBeRemoved ( int  index  )  [signal]
void ctkAddRemoveComboBox::itemAdded ( int  index  )  [signal]

This signal is sent after the method 'addItem' has been called programmatically

QVariant ctkAddRemoveComboBox::itemData ( int  index,
int  role = Qt::UserRole 
) const

Definition at line 449 of file ctkAddRemoveComboBox.cpp.

void ctkAddRemoveComboBox::itemRemoved ( int  index  )  [signal]
QString ctkAddRemoveComboBox::itemText ( int  index  )  const

Definition at line 437 of file ctkAddRemoveComboBox.cpp.

QAbstractItemModel * ctkAddRemoveComboBox::model (  )  const [protected]

Definition at line 535 of file ctkAddRemoveComboBox.cpp.

int ctkAddRemoveComboBox::modelColumn (  )  const [protected]

Definition at line 529 of file ctkAddRemoveComboBox.cpp.

void ctkAddRemoveComboBox::onAdd (  )  [protected, virtual, slot]

Definition at line 362 of file ctkAddRemoveComboBox.cpp.

void ctkAddRemoveComboBox::onEdit (  )  [protected, virtual, slot]

Definition at line 372 of file ctkAddRemoveComboBox.cpp.

void ctkAddRemoveComboBox::onRemove (  )  [protected, virtual, slot]

Definition at line 367 of file ctkAddRemoveComboBox.cpp.

void ctkAddRemoveComboBox::printAdditionalInfo (  )  [virtual]

Definition at line 142 of file ctkAddRemoveComboBox.cpp.

void ctkAddRemoveComboBox::removeCurrentItem (  )  [inline]

Definition at line 119 of file ctkAddRemoveComboBox.h.

bool ctkAddRemoveComboBox::removeEnabled (  )  const
void ctkAddRemoveComboBox::removeItem ( int  index  ) 

Remove the item currently selected. See signal 'itemRemoved'

Definition at line 493 of file ctkAddRemoveComboBox.cpp.

QModelIndex ctkAddRemoveComboBox::rootModelIndex (  )  const [protected]

Definition at line 517 of file ctkAddRemoveComboBox.cpp.

void ctkAddRemoveComboBox::setAddEnabled ( bool  enable  ) 

Enable/Disable the add button.

Definition at line 311 of file ctkAddRemoveComboBox.cpp.

void ctkAddRemoveComboBox::setComboBox ( QComboBox *  comboBox  )  [protected]

Definition at line 156 of file ctkAddRemoveComboBox.cpp.

void ctkAddRemoveComboBox::setComboBoxEnabled ( bool  enable  ) 

Enable/Disable the add button.

Definition at line 298 of file ctkAddRemoveComboBox.cpp.

void ctkAddRemoveComboBox::setCurrentIndex ( int  index  )  [slot]

Select the current index

Definition at line 387 of file ctkAddRemoveComboBox.cpp.

void ctkAddRemoveComboBox::setEditEnabled ( bool  enable  ) 

Enable/Disable the edit button.

Definition at line 344 of file ctkAddRemoveComboBox.cpp.

void ctkAddRemoveComboBox::setEmptyText ( const QString &  text  ) 

Set text that should be displayed in the comboBox when it is empty

Definition at line 182 of file ctkAddRemoveComboBox.cpp.

void ctkAddRemoveComboBox::setItemData ( int  index,
const QVariant &  data,
int  role = Qt::UserRole 
)

Definition at line 473 of file ctkAddRemoveComboBox.cpp.

void ctkAddRemoveComboBox::setItemText ( int  index,
const QString &  text 
)

Definition at line 461 of file ctkAddRemoveComboBox.cpp.

void ctkAddRemoveComboBox::setRemoveEnabled ( bool  enable  ) 

Enable/Disable the add button.

Definition at line 326 of file ctkAddRemoveComboBox.cpp.

void ctkAddRemoveComboBox::setRootModelIndex ( const QModelIndex &  root  )  [protected]

Definition at line 523 of file ctkAddRemoveComboBox.cpp.


Property Documentation

bool ctkAddRemoveComboBox::addEnabled [read, write]

Definition at line 41 of file ctkAddRemoveComboBox.h.

bool ctkAddRemoveComboBox::editEnabled [read, write]

Definition at line 43 of file ctkAddRemoveComboBox.h.

QString ctkAddRemoveComboBox::emptyText [read, write]

Definition at line 40 of file ctkAddRemoveComboBox.h.

bool ctkAddRemoveComboBox::removeEnabled [read, write]

Definition at line 42 of file ctkAddRemoveComboBox.h.


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