15 #ifndef BORNAGAIN_GUI_MODEL_MODEL_PARAMETERTUNINGMODEL_H
16 #define BORNAGAIN_GUI_MODEL_MODEL_PARAMETERTUNINGMODEL_H
21 #include <QAbstractItemModel>
35 QVariant
headerData(
int section, Qt::Orientation orientation,
36 int role )
const override;
37 QVariant
data(
const QModelIndex&
index,
int role)
const override;
38 Qt::ItemFlags
flags(
const QModelIndex&
index)
const override;
39 QModelIndex
index(
int row,
int column,
40 const QModelIndex&
parent = QModelIndex())
const override;
41 QModelIndex
parent(
const QModelIndex&
index)
const override;
42 int rowCount(
const QModelIndex&
parent = QModelIndex())
const override;
45 QMimeData*
mimeData(
const QModelIndexList& indexes)
const override;
The ParameterItem class represent a tuning value in a parameter tuning tree.
ParameterTreeItems is a collection of items necessary to form a tuning tree for real time widget.
The ParameterTuningModel class represents parameters which can be tuned in real time in ParameterTuni...
QModelIndex indexForItem(ParameterItem *item) const
Qt::DropActions supportedDropActions() const override
ParameterTuningModel(QObject *rootObject, QObject *parent=nullptr)
static ParameterLabelItem * toParameterLabelItem(const QModelIndex &index)
static ParameterItem * toParameterItem(const QModelIndex &index)
Qt::ItemFlags flags(const QModelIndex &index) const override
int columnCount(const QModelIndex &parent=QModelIndex()) const override
ParameterItem * getParameterItem(const QModelIndex &index) const
Returns ParameterItem from given index.
QMimeData * mimeData(const QModelIndexList &indexes) const override
int rowCount(const QModelIndex &parent=QModelIndex()) const override
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const override
QVariant headerData(int section, Qt::Orientation orientation, int role) const override
Qt::DropActions supportedDragActions() const override
QModelIndex parent(const QModelIndex &index) const override
QVariant data(const QModelIndex &index, int role) const override