FactDev  0.1
Gui::Widgets::Delegates::ComboBoxDelegate Class Referenceabstract

The ComboBoxDelegate class. More...

#include <comboboxdelegate.h>

Inheritance diagram for Gui::Widgets::Delegates::ComboBoxDelegate:
Gui::Widgets::Delegates::ProjectComboDelegate Gui::Widgets::Delegates::UnitComboDelegate

Public Member Functions

 ComboBoxDelegate (QObject *parent=0)
 ComboBoxDelegate::ComboBoxDelegate Construct a ComboBoxDelegate. More...
 
virtual QWidget * createEditor (QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const =0
 ComboBoxDelegate::createEditor Return a ComboBox specified by index item defined by the parent widget and style option which are used to control how the editor widgets appears. More...
 
void paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const =0
 ComboBoxDelegate::paint Renders the delegate using the given painter and style option for the item specified by index More...
 
void setEditorData (QWidget *editor, const QModelIndex &index) const
 ComboBoxDelegate::setEditorData Sets the data to be displayed and edited by the editor from the data model item specified by the model index More...
 
void setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
 ComboBoxDelegate::setModelData Gets data from the editor widget and stores it in the specified model at the item index More...
 
void updateEditorGeometry (QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const
 ComboBoxDelegate::updateEditorGeometry Update the editor for the item specified by index according to the style option given. More...
 

Detailed Description

The ComboBoxDelegate class.

Author
Antoine de Roquemaurel

Constructor & Destructor Documentation

Gui::Widgets::Delegates::ComboBoxDelegate::ComboBoxDelegate ( QObject *  parent = 0)

ComboBoxDelegate::ComboBoxDelegate Construct a ComboBoxDelegate.

Parameters
parentObject parent

Member Function Documentation

virtual QWidget* Gui::Widgets::Delegates::ComboBoxDelegate::createEditor ( QWidget *  parent,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const
pure virtual

ComboBoxDelegate::createEditor Return a ComboBox specified by index item defined by the parent widget and style option which are used to control how the editor widgets appears.

Parameters
parentWidget parent
optionOption style
indexIndex for editing
Returns
ComboBox

Implemented in Gui::Widgets::Delegates::UnitComboDelegate, and Gui::Widgets::Delegates::ProjectComboDelegate.

void Gui::Widgets::Delegates::ComboBoxDelegate::paint ( QPainter *  painter,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const
pure virtual

ComboBoxDelegate::paint Renders the delegate using the given painter and style option for the item specified by index

Parameters
parentWidget parent
optionOption style
indexIndex for editing

Implemented in Gui::Widgets::Delegates::UnitComboDelegate, and Gui::Widgets::Delegates::ProjectComboDelegate.

void Gui::Widgets::Delegates::ComboBoxDelegate::setEditorData ( QWidget *  editor,
const QModelIndex &  index 
) const

ComboBoxDelegate::setEditorData Sets the data to be displayed and edited by the editor from the data model item specified by the model index

Parameters
editorData edited
indexIndex of the model to edit
void Gui::Widgets::Delegates::ComboBoxDelegate::setModelData ( QWidget *  editor,
QAbstractItemModel *  model,
const QModelIndex &  index 
) const

ComboBoxDelegate::setModelData Gets data from the editor widget and stores it in the specified model at the item index

Parameters
editorEditor Widget
modelModel to store data
indexItem index
void Gui::Widgets::Delegates::ComboBoxDelegate::updateEditorGeometry ( QWidget *  editor,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const

ComboBoxDelegate::updateEditorGeometry Update the editor for the item specified by index according to the style option given.

Parameters
editorEditor widget to update
optionStyle option
indexItem index

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