This delegate provides a combobox editor for selecting roles in the VREngage Manager interface. It handles the creation, population, and manipulation of the combobox editor for role selection cells in the manager's table view.
#include <roleItemDelegate.h>
|
| | DtRoleItemDelegate (QObject *parent=0) |
| |
| virtual | ~DtRoleItemDelegate () override |
| |
| virtual QWidget * | createEditor (QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override |
| |
| virtual void | destroyEditor (QWidget *editor, const QModelIndex &index) const override |
| |
| virtual void | setEditorData (QWidget *editor, const QModelIndex &index) const override |
| |
| virtual void | setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override |
| |
◆ DtRoleItemDelegate()
| makVre::DtRoleItemDelegate::DtRoleItemDelegate |
( |
QObject * | parent = 0 | ) |
|
Constructor.
- Parameters
-
Initializes a new role item delegate with the specified parent.
◆ ~DtRoleItemDelegate()
| virtual makVre::DtRoleItemDelegate::~DtRoleItemDelegate |
( |
| ) |
|
|
overridevirtual |
Destructor.
Cleans up resources used by the role item delegate.
◆ createEditor()
| virtual QWidget * makVre::DtRoleItemDelegate::createEditor |
( |
QWidget * | parent, |
|
|
const QStyleOptionViewItem & | option, |
|
|
const QModelIndex & | index ) const |
|
overridevirtual |
Creates a combobox editor for role selection.
- Parameters
-
| parent | The parent widget |
| option | The style options to use when drawing the editor |
| index | The model index of the item being edited |
- Returns
- A combobox widget configured for role selection
Creates and configures a combobox editor for selecting roles.
◆ destroyEditor()
| virtual void makVre::DtRoleItemDelegate::destroyEditor |
( |
QWidget * | editor, |
|
|
const QModelIndex & | index ) const |
|
overridevirtual |
Destroys the editor when editing is finished.
- Parameters
-
| editor | The editor widget to destroy |
| index | The model index of the item that was being edited |
Handles cleanup of the editor widget when editing is complete.
◆ setEditorData()
| virtual void makVre::DtRoleItemDelegate::setEditorData |
( |
QWidget * | editor, |
|
|
const QModelIndex & | index ) const |
|
overridevirtual |
Sets the editor data based on the model index.
- Parameters
-
| editor | The editor widget to update |
| index | The model index containing the data to edit |
Populates the editor with data from the model.
◆ setModelData()
| virtual void makVre::DtRoleItemDelegate::setModelData |
( |
QWidget * | editor, |
|
|
QAbstractItemModel * | model, |
|
|
const QModelIndex & | index ) const |
|
overridevirtual |
Updates the model with data from the editor.
- Parameters
-
| editor | The editor widget containing the updated data |
| model | The model to update |
| index | The model index to update |
Transfers the data from the editor back to the model when editing is complete.
◆ onActivated
| virtual void makVre::DtRoleItemDelegate::onActivated |
( |
int | index | ) |
|
|
protectedvirtualslot |
Handles combobox activation.
- Parameters
-
| index | The index of the activated item |
Called when an item in the combobox is activated/selected.
◆ myEditor
| QComboBox* makVre::DtRoleItemDelegate::myEditor |
|
mutableprotected |
The combobox editor widget.
Maintains a reference to the currently active combobox editor. Declared mutable to allow modification in const methods.
The documentation for this class was generated from the following file: