itom  4.1.0
QPropertyModel Class Reference

#include <QPropertyModel.h>

Inheritance diagram for QPropertyModel:

Public Member Functions

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

Private Member Functions

void addDynamicProperties (Property *parent, QObject *propertyObject)
 Adds dynamic properties to the model.
 
void addDynamicProperties (Property *parent, QObject *propertyObject)
 Adds dynamic properties to the model.
 

Private Attributes

Propertym_rootItem
 The Root Property for all objects.
 
QList< QPropertyEditorWidget::UserTypeCBm_userCallbacks
 Custom callback.
 
bool m_sorted
 

Detailed Description

The QPropertyModel handles the user defined properties of QObjects

Constructor & Destructor Documentation

QPropertyModel::QPropertyModel ( QObject *  parent = 0)

Constructor

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

Constructor

Parameters
parentoptional parent object

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
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
void QPropertyModel::clear ( )

Removes all objects from the model

void QPropertyModel::clear ( )

Removes all objects from the model

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

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

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

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

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

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

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

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

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
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

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