itom  4.1.0
QVariantDelegate Class Reference

#include <QVariantDelegate.h>

Inheritance diagram for QVariantDelegate:

Public Member Functions

 QVariantDelegate (QObject *parent=0)
 
virtual ~QVariantDelegate ()
 Destructor.
 
QWidget * createEditor (QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
 
virtual void setEditorData (QWidget *editor, const QModelIndex &index) const
 
virtual void setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
 
virtual void updateEditorGeometry (QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const
 QItemDelegate implementation.
 
QSize sizeHint (const QStyleOptionViewItem &option, const QModelIndex &index) const
 
 QVariantDelegate (QObject *parent=0)
 
virtual ~QVariantDelegate ()
 Destructor.
 
QWidget * createEditor (QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
 
virtual void setEditorData (QWidget *editor, const QModelIndex &index) const
 
virtual void setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
 
virtual void updateEditorGeometry (QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const
 QItemDelegate implementation.
 

Private Member Functions

void parseEditorHints (QWidget *editor, const QString &editorHints) const
 
void parseEditorHints (QWidget *editor, const QString &editorHints) const
 

Private Attributes

QSignalMapper * m_finishedMapper
 

Detailed Description

This class is used to create the editor widgets for datatypes encapsulated in QVariant variables

Constructor & Destructor Documentation

QVariantDelegate::QVariantDelegate ( QObject *  parent = 0)

Constructor

Parameters
parentoptional parent object
QVariantDelegate::QVariantDelegate ( QObject *  parent = 0)

Constructor

Parameters
parentoptional parent object

Member Function Documentation

QWidget* QVariantDelegate::createEditor ( QWidget *  parent,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const

Creates an editor widget as child of a given widget for a specific QModelIndex

Parameters
parentthe parent widget for the editor
optionsome style options that the editor should use
indexthe index of the item the editor will be created for
Returns
QWidget the editor widget
QWidget * QVariantDelegate::createEditor ( QWidget *  parent,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const

Creates an editor widget as child of a given widget for a specific QModelIndex

Parameters
parentthe parent widget for the editor
optionsome style options that the editor should use
indexthe index of the item the editor will be created for
Returns
QWidget the editor widget
virtual void QVariantDelegate::setEditorData ( QWidget *  editor,
const QModelIndex &  index 
) const
virtual

Tries to set the editor data based on the value stored at a specific QModelIndex

Parameters
editorthe editor widget
indexthe model index of the value that should be used in the editor
void QVariantDelegate::setEditorData ( QWidget *  editor,
const QModelIndex &  index 
) const
virtual

Tries to set the editor data based on the value stored at a specific QModelIndex

Parameters
editorthe editor widget
indexthe model index of the value that should be used in the editor
virtual void QVariantDelegate::setModelData ( QWidget *  editor,
QAbstractItemModel *  model,
const QModelIndex &  index 
) const
virtual

Sets the data of a specific QModelIndex to tha value of the editor widget

Parameters
editorthe editor widget that contains the new value
modelthe model that contains the index
indexthe index within the model whose data value should be set to the data value of the editor
void QVariantDelegate::setModelData ( QWidget *  editor,
QAbstractItemModel *  model,
const QModelIndex &  index 
) const
virtual

Sets the data of a specific QModelIndex to tha value of the editor widget

Parameters
editorthe editor widget that contains the new value
modelthe model that contains the index
indexthe index within the model whose data value should be set to the data value of the editor

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