COPASI API  4.16.103
Public Member Functions | List of all members
CQIndexComboDelegate Class Reference

#include <CQComboDelegate.h>

Inheritance diagram for CQIndexComboDelegate:
Inheritance graph
Collaboration diagram for CQIndexComboDelegate:
Collaboration graph

Public Member Functions

 CQIndexComboDelegate (const QStringList *pComboItems, QObject *parent=NULL)
virtual void setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
virtual ~CQIndexComboDelegate ()
- Public Member Functions inherited from CQComboDelegate
 CQComboDelegate (const QStringList *pComboItems, QObject *parent=NULL, bool commitOnSelect=true)
virtual QWidget * createEditor (QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
const QStringList * getItems (int row) const
bool isCommitOnSelect () const
void setCommitOnSelect (bool commitOnSelect)
virtual void setEditorData (QWidget *editor, const QModelIndex &index) const
void setItems (int row, const QStringList *pComboItems)
virtual void updateEditorGeometry (QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const
virtual ~CQComboDelegate ()

Additional Inherited Members

- Signals inherited from CQComboDelegate
void currentIndexChanged (int, int)
- Protected Slots inherited from CQComboDelegate
void slotCurrentIndexChanged (int index)
void slotEditorDeleted (QObject *pObject)

Detailed Description

Definition at line 64 of file CQComboDelegate.h.

Constructor & Destructor Documentation

CQIndexComboDelegate::CQIndexComboDelegate ( const QStringList *  pComboItems,
QObject *  parent = NULL 

Definition at line 139 of file CQComboDelegate.cpp.

140  : CQComboDelegate(pComboItems, parent)
141 {}
CQComboDelegate(const QStringList *pComboItems, QObject *parent=NULL, bool commitOnSelect=true)
CQIndexComboDelegate::~CQIndexComboDelegate ( )

Definition at line 143 of file CQComboDelegate.cpp.

144 {}

Member Function Documentation

void CQIndexComboDelegate::setModelData ( QWidget *  editor,
QAbstractItemModel *  model,
const QModelIndex &  index 
) const

Reimplemented from CQComboDelegate.

Definition at line 146 of file CQComboDelegate.cpp.

148 {
149  QComboBox *comboBox = static_cast<QComboBox*>(editor);
150  QVariant value(comboBox->currentIndex());
151  model->setData(index, value, Qt::EditRole);
152 }

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