BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
JobItemUtils.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/Model/Data/JobItemUtils.h
6 //! @brief Defines namespace GUI::Model::JobItemUtils
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_MODEL_DATA_JOBITEMUTILS_H
16 #define BORNAGAIN_GUI_MODEL_DATA_JOBITEMUTILS_H
17 
18 #include "Device/Detector/IDetector.h"
19 #include "GUI/Util/ComboProperty.h"
20 
21 class DataItem;
22 class InstrumentItem;
23 class Instrument2DItem;
24 class JobItem;
25 class SimulationResult;
26 class ICoordSystem;
27 
28 //! Contains convenience methods to trasfer data from domain simulation to IntensityDataItem.
29 //! Used to modify Datafield's axes units as requested by IntensityDataItem.
30 
32 
33 //! updates axes of Datafield in IntensityData item
34 void updateDataAxes(DataItem* intensityItem, const InstrumentItem* instrumentItem);
35 
36 void setIntensityItemCoords(DataItem* intensityItem, const InstrumentItem* instrumentItem);
37 
38 void setIntensityItemCoords(DataItem* intensityItem, const ICoordSystem& converter);
39 
40 void createDefaultDetectorMap(DataItem* intensityItem, const Instrument2DItem* instrumentItem);
41 
42 //! Sets simulation results into the DataItem
43 void setResults(DataItem* intensityItem, const SimulationResult& result);
44 
45 ComboProperty availableUnits(const ICoordSystem& converter);
46 
47 } // namespace GUI::Model::JobItemUtils
48 
49 #endif // BORNAGAIN_GUI_MODEL_DATA_JOBITEMUTILS_H
Defines class ComboProperty.
Custom property to define list of string values with multiple selections. Intended for QVariant.
Definition: ComboProperty.h:25
Abstract base class for IntensityDataItem and SpecularDataItem. Owns one simulated data set of type D...
Definition: DataItem.h:34
Abstract base class for instrument-specific item classes.
Contains convenience methods to trasfer data from domain simulation to IntensityDataItem....
Definition: JobItemUtils.h:31
void createDefaultDetectorMap(DataItem *intensityItem, const Instrument2DItem *instrumentItem)
void setResults(DataItem *intensityItem, const SimulationResult &result)
Sets simulation results into the DataItem.
ComboProperty availableUnits(const ICoordSystem &converter)
void setIntensityItemCoords(DataItem *intensityItem, const InstrumentItem *instrumentItem)
Sets axes units suitable for given instrument.
void updateDataAxes(DataItem *intensityItem, const InstrumentItem *instrumentItem)
updates axes of Datafield in IntensityData item