RosAna
A rosette analyzer and synthesizer tool
 All Classes Namespaces Functions Variables Properties
Public Member Functions | List of all members
VariableEditDelegate Class Reference

Handles display of model data for VariableAdjustWidget. More...

Public Member Functions

QWidgetcreateEditor (QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const Q_DECL_OVERRIDE
 Creates the editor based on index. More...
 
void setEditorData (QWidget *editor, const QModelIndex &index) const Q_DECL_OVERRIDE
 Sets editor data from model. Triggered when the model is changed. More...
 
void setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const Q_DECL_OVERRIDE
 Sets model data from editor. Triggered when an editor is changed. More...
 
void updateEditorGeometry (QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const Q_DECL_OVERRIDE
 Handles editor styling. More...
 

Detailed Description

Handles display of model data for VariableAdjustWidget.

This class is heavily based on the example SpinBoxDelegate provided by the Qt framework.

Member Function Documentation

QWidget * VariableEditDelegate::createEditor ( QWidget parent,
const QStyleOptionViewItem option,
const QModelIndex index 
) const
virtual

Creates the editor based on index.

Parameters
parentThe parent widget.
indexThe index of the current element.
optionEditor option (unused).
Returns
the apropriate editor.

Reimplemented from QStyledItemDelegate.

void VariableEditDelegate::setEditorData ( QWidget editor,
const QModelIndex index 
) const
virtual

Sets editor data from model. Triggered when the model is changed.

Parameters
editorThe editor to provide with data.
indexThe index of the data.

Reimplemented from QStyledItemDelegate.

void VariableEditDelegate::setModelData ( QWidget editor,
QAbstractItemModel model,
const QModelIndex index 
) const
virtual

Sets model data from editor. Triggered when an editor is changed.

Parameters
editorThe editor source.
modelThe model to edit.
indexThe index to edit.

Reimplemented from QStyledItemDelegate.

void VariableEditDelegate::updateEditorGeometry ( QWidget editor,
const QStyleOptionViewItem option,
const QModelIndex index 
) const
virtual

Handles editor styling.

Parameters
editorThe editor to style.
optionStyling option.
indexThe data index (unused).

Reimplemented from QStyledItemDelegate.


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