BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
PropertyEditorFactory.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/View/PropertyEditor/PropertyEditorFactory.h
6 //! @brief Defines namespace GUI::View::PropertyEditorFactory
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_VIEW_PROPERTYEDITOR_PROPERTYEDITORFACTORY_H
16 #define BORNAGAIN_GUI_VIEW_PROPERTYEDITOR_PROPERTYEDITORFACTORY_H
17 
18 #include <QString>
19 
20 class QModelIndex;
21 class QWidget;
22 class SessionItem;
23 class QVariant;
24 
25 //! Creates editors for SessionItems.
26 
28 
29 //! Returns true if the index data has known (custom) conversion to string.
30 bool hasStringRepresentation(const QModelIndex& index);
31 
32 //! Provides string representation of index data.
33 QString toString(const QModelIndex& index);
34 
35 //! Creates an editor suitable for editing of item.value()
36 QWidget* CreateEditor(const SessionItem& item, QWidget* parent = nullptr);
37 
38 } // namespace GUI::View::PropertyEditorFactory
39 
40 #endif // BORNAGAIN_GUI_VIEW_PROPERTYEDITOR_PROPERTYEDITORFACTORY_H
Base class for a GUI data item.
Definition: SessionItem.h:204
Creates editors for SessionItems.
QWidget * CreateEditor(const SessionItem &item, QWidget *parent=nullptr)
Creates an editor suitable for editing of item.value()
QString toString(const QModelIndex &index)
Provides string representation of index data.
bool hasStringRepresentation(const QModelIndex &index)
Returns true if the index data has known (custom) conversion to string.