itom
Loading...
Searching...
No Matches
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 setGroupByInheritance (bool enabled)
 
bool groupByInheritance () const
 
QSize span (const QModelIndex &index) 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_groupByInheritance
 
bool m_sorted
 

Detailed Description

The QPropertyModel handles the user defined properties of QObjects

Constructor & Destructor Documentation

◆ QPropertyModel() [1/2]

QPropertyModel::QPropertyModel ( QObject * parent = 0)

Constructor

Parameters
parentoptional parent object

◆ QPropertyModel() [2/2]

QPropertyModel::QPropertyModel ( QObject * parent = 0)

Constructor

Parameters
parentoptional parent object

Member Function Documentation

◆ addItem() [1/2]

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

◆ addItem() [2/2]

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

◆ clear() [1/2]

void QPropertyModel::clear ( )

Removes all objects from the model

◆ clear() [2/2]

void QPropertyModel::clear ( )

Removes all objects from the model

◆ registerCustomPropertyCB() [1/2]

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

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

◆ registerCustomPropertyCB() [2/2]

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

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

◆ unregisterCustomPropertyCB() [1/2]

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

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

◆ unregisterCustomPropertyCB() [2/2]

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

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

◆ updateItem() [1/2]

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

◆ updateItem() [2/2]

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: