A custom delegate for the detonation result field.
More...
Static Public Attributes |
| static const QMap< int, QString > | DetonationLabels |
| | A mapping of detonation results to labels for display.
|
Protected Member Functions |
| virtual QWidget * | createEditor (QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const |
| | Create the editor for this delegate.
|
| virtual void | setEditorData (QWidget *editor, const QModelIndex &index) const |
| | Set the data value in editor for the delegate.
|
| virtual void | setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const |
| | Transfer the data value from the editor to the model.
|
| virtual void | updateEditorGeometry (QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const |
| | Update the size and shape of the editor.
|
Detailed Description
A custom delegate for the detonation result field.
- Note
- Do not share instances of delegates between widgets.
Constructor & Destructor Documentation
| virtual makVrv::DtDetonationResultWidgetDelegate::~DtDetonationResultWidgetDelegate |
( |
| ) |
|
|
privatevirtual |
Member Function Documentation
| virtual QWidget* makVrv::DtDetonationResultWidgetDelegate::createEditor |
( |
QWidget * |
parent, |
|
|
const QStyleOptionViewItem & |
option, |
|
|
const QModelIndex & |
index |
|
) |
| const |
|
protectedvirtual |
Create the editor for this delegate.
Reimplemented from QItemDelegate::createEditor().
- Parameters
-
| [in] | parent | is the parent widget for this delegate. |
| [in] | option | is the display options (not used). |
| [in] | index | is the model index to the view (not used). |
- Returns
- The editor for editing the data (a QComboBox).
| virtual void makVrv::DtDetonationResultWidgetDelegate::setEditorData |
( |
QWidget * |
editor, |
|
|
const QModelIndex & |
index |
|
) |
| const |
|
protectedvirtual |
Set the data value in editor for the delegate.
Reimplemented from QItemDelegate::setEditorData().
- Parameters
-
| [in] | editor | is the widget for editing data (a QComboBox). |
| [in] | index | is the model index to the view. |
| virtual void makVrv::DtDetonationResultWidgetDelegate::setModelData |
( |
QWidget * |
editor, |
|
|
QAbstractItemModel * |
model, |
|
|
const QModelIndex & |
index |
|
) |
| const |
|
protectedvirtual |
Transfer the data value from the editor to the model.
Reimplemented from QItemDelegate::setModelData().
- Parameters
-
| [in] | editor | is the widget for editing data (a QComboBox). |
| [in] | model | is the model to receive the data. |
| [in] | index | is the model index to the view. |
| virtual void makVrv::DtDetonationResultWidgetDelegate::updateEditorGeometry |
( |
QWidget * |
editor, |
|
|
const QStyleOptionViewItem & |
option, |
|
|
const QModelIndex & |
index |
|
) |
| const |
|
protectedvirtual |
Update the size and shape of the editor.
Reimplemented from QItemDelegate::updateEditorGeometry().
- Parameters
-
| [in] | editor | is the widget for editing data (a QComboBox). |
| [in] | option | is the display options. |
| [in] | index | is the model index to the view (not used). |
Member Data Documentation
| const QMap<int, QString> makVrv::DtDetonationResultWidgetDelegate::DetonationLabels |
|
static |
A mapping of detonation results to labels for display.
The documentation for this class was generated from the following file: