2#include <QAbstractItemView>
3#include <QAbstractListModel>
40 [[nodiscard]] QVariant
headerData(
int section, Qt::Orientation orientation,
int role)
const override;
45 [[nodiscard]]
int rowCount(
const QModelIndex& parent)
const override;
50 [[nodiscard]] QVariant
data(
const QModelIndex& index,
int role)
const override;
55 [[nodiscard]]
int columnCount(
const QModelIndex& parent)
const override;
60 [[nodiscard]] Qt::ItemFlags
flags(
const QModelIndex& index)
const override;
65 bool setData(
const QModelIndex& index,
const QVariant& value,
int role)
override;
74 Q_SIGNAL
void changed(QObject* obj,
int propertyIndex,
bool dynamic);
83 Q_SIGNAL
void addLineEditActions(QLineEdit* lineEdit, QObject* obj,
int propertyIndex,
bool dynamic)
const;
89 QObject* _target{
nullptr};
93 inline Entry(QObject* obj,
int index,
bool dynamic)
96 , _dynamic(dynamic) {};
106 QList<Entry> _indices;
List model for QObject properties.
Definition ObjectPropertyModel.h:13
void setTarget(QObject *obj)
???
void setDelegates(QAbstractItemView *view)
???
QVariant headerData(int section, Qt::Orientation orientation, int role) const override
Overridden from base class to provide column display names.
Q_SIGNAL void changed(QObject *obj, int propertyIndex, bool dynamic)
Signals a change of the object's property.
void refresh()
Called to refresh the attached viewer.
Qt::ItemFlags flags(const QModelIndex &index) const override
Overridden from base class to provide flags on an item by index.
QVariant data(const QModelIndex &index, int role) const override
Overridden from base class to provide the data to present.
Q_SIGNAL void addLineEditActions(QLineEdit *lineEdit, QObject *obj, int propertyIndex, bool dynamic) const
int columnCount(const QModelIndex &parent) const override
Overridden from base class to provide the amount of columns.
bool setData(const QModelIndex &index, const QVariant &value, int role) override
Overridden from base class to provide assignment of an item when edited.
int rowCount(const QModelIndex &parent) const override
Overridden from base class to provide the amount of rows.
ObjectPropertyModel(QObject *parent=nullptr)
Constructor.
#define _MISC_CLASS
Definition misc/global.h:40
Definition Application.h:10