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

#include <qpropertymodel.h>

Inheritance diagram for QPropertyModel:

Public Member Functions

 QPropertyModel (QObject *parent=0)
 
virtual ~QPropertyModel ()
 Destructor. More...
 
QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const
 QAbstractItemModel implementation. More...
 
QModelIndex parent (const QModelIndex &index) const
 QAbstractItemModel implementation. More...
 
int rowCount (const QModelIndex &parent=QModelIndex()) const
 QAbstractItemModel implementation. More...
 
int columnCount (const QModelIndex &parent=QModelIndex()) const
 QAbstractItemModel implementation. More...
 
QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const
 QAbstractItemModel implementation. More...
 
bool setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
 QAbstractItemModel implementation. More...
 
Qt::ItemFlags flags (const QModelIndex &index) const
 QAbstractItemModel implementation. More...
 
QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
 QAbstractItemModel implementation. More...
 
QModelIndex buddy (const QModelIndex &index) const
 QAbstractItemModel implementation. More...
 
void addItem (QObject *propertyObject)
 
void updateItem (QObject *propertyObject, const QModelIndex &parent=QModelIndex())
 
void clear ()
 
void registerCustomPropertyCB (QPropertyEditorWidget::UserTypeCB callback)
 
void unregisterCustomPropertyCB (QPropertyEditorWidget::UserTypeCB callback)
 

Detailed Description

The QPropertyModel handles the user defined properties of QObjects

Definition at line 36 of file qpropertymodel.h.

Constructor & Destructor Documentation

QPropertyModel::QPropertyModel ( QObject *  parent = 0)

Constructor

Parameters
parentoptional parent object

Definition at line 47 of file qpropertymodel.cpp.

QPropertyModel::~QPropertyModel ( )
virtual

Destructor.

Definition at line 53 of file qpropertymodel.cpp.

Member Function Documentation

void QPropertyModel::addItem ( QObject *  propertyObject)

Adds the user properties of the given class to the QPropertyModel instance

Parameters
propertyObjectthe class inherited from QObject that contains user properties that should be managed by this instance

Definition at line 168 of file qpropertymodel.cpp.

QModelIndex QPropertyModel::buddy ( const QModelIndex &  index) const

QAbstractItemModel implementation.

Definition at line 161 of file qpropertymodel.cpp.

void QPropertyModel::clear ( )

Removes all objects from the model

Definition at line 371 of file qpropertymodel.cpp.

int QPropertyModel::columnCount ( const QModelIndex &  parent = QModelIndex()) const

QAbstractItemModel implementation.

Definition at line 90 of file qpropertymodel.cpp.

QVariant QPropertyModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const

QAbstractItemModel implementation.

Definition at line 95 of file qpropertymodel.cpp.

Qt::ItemFlags QPropertyModel::flags ( const QModelIndex &  index) const

QAbstractItemModel implementation.

Definition at line 131 of file qpropertymodel.cpp.

QVariant QPropertyModel::headerData ( int  section,
Qt::Orientation  orientation,
int  role = Qt::DisplayRole 
) const

QAbstractItemModel implementation.

Definition at line 146 of file qpropertymodel.cpp.

QModelIndex QPropertyModel::index ( int  row,
int  column,
const QModelIndex &  parent = QModelIndex() 
) const

QAbstractItemModel implementation.

Definition at line 57 of file qpropertymodel.cpp.

QModelIndex QPropertyModel::parent ( const QModelIndex &  index) const

QAbstractItemModel implementation.

Definition at line 68 of file qpropertymodel.cpp.

void QPropertyModel::registerCustomPropertyCB ( QPropertyEditorWidget::UserTypeCB  callback)

Adds custom callback that will be used to create Property instances for custom datatypes

Definition at line 379 of file qpropertymodel.cpp.

int QPropertyModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const

QAbstractItemModel implementation.

Definition at line 82 of file qpropertymodel.cpp.

bool QPropertyModel::setData ( const QModelIndex &  index,
const QVariant &  value,
int  role = Qt::EditRole 
)

QAbstractItemModel implementation.

Definition at line 119 of file qpropertymodel.cpp.

void QPropertyModel::unregisterCustomPropertyCB ( QPropertyEditorWidget::UserTypeCB  callback)

Adds custom callback that will be used to create Property instances for custom datatypes

Definition at line 385 of file qpropertymodel.cpp.

void QPropertyModel::updateItem ( QObject *  propertyObject,
const QModelIndex &  parent = QModelIndex() 
)

Creates a dataChanged signal for the given object

Parameters
propertyObjectthe instance of a QObject based class that should be updated
parentoptional model index the propertyObject is child of

Definition at line 285 of file qpropertymodel.cpp.


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