RioEngine  0.1
My first attempt to create a 3D WYSIWYG Game Engine
QVariantDelegate Class Reference

#include <qvariantdelegate.h>

Inheritance diagram for QVariantDelegate:

Signals

void beginPropertyEdit () const
 
void finishPropertyEdit () const
 

Public Member Functions

 QVariantDelegate (QObject *parent=0)
 
virtual ~QVariantDelegate ()
 Destructor. More...
 
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. More...
 

Detailed Description

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

Definition at line 33 of file qvariantdelegate.h.

Constructor & Destructor Documentation

QVariantDelegate::QVariantDelegate ( QObject *  parent = 0)

Constructor

Parameters
parentoptional parent object

Definition at line 34 of file qvariantdelegate.cpp.

QVariantDelegate::~QVariantDelegate ( )
virtual

Destructor.

Definition at line 46 of file qvariantdelegate.cpp.

Member Function Documentation

void QVariantDelegate::beginPropertyEdit ( ) const
signal
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

Definition at line 50 of file qvariantdelegate.cpp.

void QVariantDelegate::finishPropertyEdit ( ) const
signal
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

Definition at line 88 of file qvariantdelegate.cpp.

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

Definition at line 109 of file qvariantdelegate.cpp.

void QVariantDelegate::updateEditorGeometry ( QWidget *  editor,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const
virtual

QItemDelegate implementation.

Definition at line 133 of file qvariantdelegate.cpp.


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