BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
ParameterTuningModel.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/coregui/Models/ParameterTuningModel.h
6 //! @brief Defines class ParameterTuningModel
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2018
11 //! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
15 #ifndef BORNAGAIN_GUI_COREGUI_MODELS_PARAMETERTUNINGMODEL_H
16 #define BORNAGAIN_GUI_COREGUI_MODELS_PARAMETERTUNINGMODEL_H
17 
19 
20 class ParameterItem;
21 
22 //!
23 //! \brief The ParameterTuningModel class represents parameters which can be tuned in real time
24 //! in ParameterTuningWidget. In the fitting activity context handles dragging of ParameterItem's
25 //! to the FitParametersWidget.
26 //!
27 
29  Q_OBJECT
30 
31 public:
32  ParameterTuningModel(QObject* parent = 0);
33 
34  Qt::ItemFlags flags(const QModelIndex& proxyIndex) const;
35  QMimeData* mimeData(const QModelIndexList& proxyIndexes) const;
36  Qt::DropActions supportedDragActions() const;
37  Qt::DropActions supportedDropActions() const;
38 
39  ParameterItem* getParameterItem(const QModelIndex& proxyIndex) const;
40 };
41 
42 inline Qt::DropActions ParameterTuningModel::supportedDragActions() const
43 {
44  return Qt::CopyAction;
45 }
46 
47 inline Qt::DropActions ParameterTuningModel::supportedDropActions() const
48 {
49  return Qt::IgnoreAction;
50 }
51 
52 #endif // BORNAGAIN_GUI_COREGUI_MODELS_PARAMETERTUNINGMODEL_H
Defines class FilterPropertyProxy.
The FilterPropertyProxy class filters out all PropertyItem's and similar from SessionModel to have on...
The ParameterItem class represent a tuning value in a parameter tuning tree.
The ParameterTuningModel class represents parameters which can be tuned in real time in ParameterTuni...
Qt::ItemFlags flags(const QModelIndex &proxyIndex) const
QMimeData * mimeData(const QModelIndexList &proxyIndexes) const
Qt::DropActions supportedDragActions() const
Qt::DropActions supportedDropActions() const
ParameterTuningModel(QObject *parent=0)
ParameterItem * getParameterItem(const QModelIndex &proxyIndex) const
Returns ParameterItem from given proxy index.