25#ifndef QPROPERTYMODEL_H_
26#define QPROPERTYMODEL_H_
28#include <qabstractitemmodel.h>
31#include "QPropertyEditorWidget.h"
51 QModelIndex
index(
int row,
int column,
const QModelIndex&
parent = QModelIndex())
const;
60 QVariant
data(
const QModelIndex&
index,
int role = Qt::DisplayRole)
const;
63 bool setData(
const QModelIndex&
index,
const QVariant& value,
int role = Qt::EditRole);
65 Qt::ItemFlags
flags(
const QModelIndex&
index)
const;
68 QVariant
headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole)
const;
71 QModelIndex
buddy(
const QModelIndex&
index)
const;
79 void addItem(QObject* propertyObject);
86 void updateItem(QObject* propertyObject,
const QModelIndex&
parent = QModelIndex());
103 void setGroupByInheritance(
bool enabled);
105 bool groupByInheritance()
const
107 return m_groupByInheritance;
110 QSize span(
const QModelIndex &
index)
const;
122 bool m_groupByInheritance;
Definition QPropertyModel.h:39
void registerCustomPropertyCB(QPropertyEditorWidget::UserTypeCB callback)
Definition QPropertyModel.cpp:575
QList< QPropertyEditorWidget::UserTypeCB > m_userCallbacks
Custom callback.
Definition QPropertyModel.h:120
void addItem(QObject *propertyObject)
Definition QPropertyModel.cpp:290
int columnCount(const QModelIndex &parent=QModelIndex()) const
QAbstractItemModel implementation.
Definition QPropertyModel.cpp:157
QModelIndex buddy(const QModelIndex &index) const
QAbstractItemModel implementation.
Definition QPropertyModel.cpp:266
int rowCount(const QModelIndex &parent=QModelIndex()) const
QAbstractItemModel implementation.
Definition QPropertyModel.cpp:130
Property * m_rootItem
The Root Property for all objects.
Definition QPropertyModel.h:117
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
QAbstractItemModel implementation.
Definition QPropertyModel.cpp:200
void addDynamicProperties(Property *parent, QObject *propertyObject)
Adds dynamic properties to the model.
Definition QPropertyModel.cpp:484
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
QAbstractItemModel implementation.
Definition QPropertyModel.cpp:163
virtual ~QPropertyModel()
Destructor.
Definition QPropertyModel.cpp:64
void updateItem(QObject *propertyObject, const QModelIndex &parent=QModelIndex())
Definition QPropertyModel.cpp:438
QModelIndex parent(const QModelIndex &index) const
QAbstractItemModel implementation.
Definition QPropertyModel.cpp:106
void clear()
Definition QPropertyModel.cpp:555
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const
QAbstractItemModel implementation.
Definition QPropertyModel.cpp:69
void unregisterCustomPropertyCB(QPropertyEditorWidget::UserTypeCB callback)
Definition QPropertyModel.cpp:584
Qt::ItemFlags flags(const QModelIndex &index) const
QAbstractItemModel implementation.
Definition QPropertyModel.cpp:225
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
QAbstractItemModel implementation.
Definition QPropertyModel.cpp:249
QPropertyModel(QObject *parent=0)
Definition QPropertyModel.cpp:57