BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
The ParameterTuningModel class represents parameters which can be tuned in real time in ParameterTuningWidget. In the fitting activity context handles dragging of ParameterItem's to the FitParametersWidget.
Definition at line 29 of file ParameterTuningModel.h.
Public Member Functions | |
ParameterTuningModel (QObject *rootObject, QObject *parent=nullptr) | |
int | columnCount (const QModelIndex &parent=QModelIndex()) const override |
QVariant | data (const QModelIndex &index, int role) const override |
Qt::ItemFlags | flags (const QModelIndex &index) const override |
ParameterItem * | getParameterItem (const QModelIndex &index) const |
Returns ParameterItem from given index. More... | |
QVariant | headerData (int section, Qt::Orientation orientation, int role) const override |
QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const override |
QModelIndex | indexForItem (ParameterItem *item) const |
QMimeData * | mimeData (const QModelIndexList &indexes) const override |
QModelIndex | parent (const QModelIndex &index) const override |
int | rowCount (const QModelIndex &parent=QModelIndex()) const override |
Qt::DropActions | supportedDragActions () const override |
Qt::DropActions | supportedDropActions () const override |
Static Public Member Functions | |
static ParameterItem * | toParameterItem (const QModelIndex &index) |
static ParameterLabelItem * | toParameterLabelItem (const QModelIndex &index) |
Private Attributes | |
QObject * | m_rootObject |
ParameterTuningModel::ParameterTuningModel | ( | QObject * | rootObject, |
QObject * | parent = nullptr |
||
) |
Definition at line 21 of file ParameterTuningModel.cpp.
|
override |
Definition at line 107 of file ParameterTuningModel.cpp.
|
override |
Definition at line 34 of file ParameterTuningModel.cpp.
References index(), toParameterItem(), and toParameterLabelItem().
Referenced by mimeData().
|
override |
Definition at line 57 of file ParameterTuningModel.cpp.
References index(), and toParameterItem().
ParameterItem * ParameterTuningModel::getParameterItem | ( | const QModelIndex & | index | ) | const |
Returns ParameterItem from given index.
Definition at line 137 of file ParameterTuningModel.cpp.
References index(), and toParameterItem().
Referenced by ParameterTuningWidget::getSelectedParameters().
|
override |
Definition at line 27 of file ParameterTuningModel.cpp.
|
override |
Definition at line 68 of file ParameterTuningModel.cpp.
References m_rootObject, parent(), and toParameterLabelItem().
Referenced by data(), flags(), getParameterItem(), mimeData(), parent(), rowCount(), toParameterItem(), and toParameterLabelItem().
QModelIndex ParameterTuningModel::indexForItem | ( | ParameterItem * | item | ) | const |
Definition at line 142 of file ParameterTuningModel.cpp.
Referenced by ParameterTuningWidget::makeSelected().
|
override |
Definition at line 112 of file ParameterTuningModel.cpp.
References data(), index(), GUI::Session::XML::LinkMimeType, and toParameterItem().
|
override |
Definition at line 82 of file ParameterTuningModel.cpp.
References index(), and m_rootObject.
Referenced by index().
|
override |
Definition at line 95 of file ParameterTuningModel.cpp.
References index(), and m_rootObject.
|
override |
Definition at line 127 of file ParameterTuningModel.cpp.
|
override |
Definition at line 132 of file ParameterTuningModel.cpp.
|
static |
Definition at line 155 of file ParameterTuningModel.cpp.
References index().
Referenced by ParameterTuningDelegate::createEditor(), data(), flags(), getParameterItem(), and mimeData().
|
static |
Definition at line 161 of file ParameterTuningModel.cpp.
References index().
Referenced by data(), and index().
|
private |
Definition at line 57 of file ParameterTuningModel.h.
Referenced by index(), parent(), and rowCount().