VR-Forces 4.3 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Static Public Attributes | Protected Member Functions | Private Member Functions
makVrv::DtDetonationResultWidgetDelegate Class Reference

A custom delegate for the detonation result field. More...

Inheritance diagram for makVrv::DtDetonationResultWidgetDelegate:
Inheritance graph
[legend]

Static Public Attributes

static const QMap< int, QString > DetonationLabels
 A mapping of detonation results to labels for display.

Protected Member Functions

virtual QWidgetcreateEditor (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.

Private Member Functions

virtual ~DtDetonationResultWidgetDelegate ()
 Virtual DTOR.

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

Virtual DTOR.

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]parentis the parent widget for this delegate.
[in]optionis the display options (not used).
[in]indexis 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]editoris the widget for editing data (a QComboBox).
[in]indexis 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]editoris the widget for editing data (a QComboBox).
[in]modelis the model to receive the data.
[in]indexis 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]editoris the widget for editing data (a QComboBox).
[in]optionis the display options.
[in]indexis 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:

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)