15 #ifndef BORNAGAIN_GUI_MODEL_DATA_DATAITEM_H
16 #define BORNAGAIN_GUI_MODEL_DATA_DATAITEM_H
18 #include "Device/Data/Datafield.h"
37 static constexpr
auto P_FILE_NAME{
"FileName"};
38 static constexpr
auto P_AXES_UNITS{
"Axes Units"};
45 virtual void setDatafield(Datafield* data) = 0;
49 void setRawDataVector(
const std::vector<double>& data);
53 void setFileName(
const QString& filename);
59 void setLastModified(
const QDateTime& dtime);
61 QString selectedCoords()
const;
66 static bool isAxesUnitsPropertyName(
const QString&
name);
74 virtual std::vector<int>
shape()
const = 0;
86 explicit DataItem(
const QString& modelType);
Defines save/load interface.
Defines class SelectionDescriptor.
Defines class SessionItem.
Custom property to define list of string values with multiple selections. Intended for QVariant.
Abstract base class for IntensityDataItem and SpecularDataItem. Owns one simulated data set of type D...
virtual void setAxesRangeToData()=0
const Datafield * getDatafield() const
QDateTime m_last_modified
virtual void setXaxisTitle(const QString &title)=0
void datafieldChanged(Datafield *data)
Datafield * getDatafield()
virtual std::vector< int > shape() const =0
virtual void updateCoords(const InstrumentItem *instrument)=0
std::mutex m_update_data_mutex
void rawDataVectorChanged(const std::vector< double > &data)
void fileNameChanged(const QString &filename)
void axesUnitsChanged(const ComboProperty &units)
std::unique_ptr< Datafield > m_data
simulation results
virtual void setYaxisTitle(const QString &title)=0
virtual void reset(ImportDataInfo data)=0
Resets data to the state defined by user (imported) data.
Carries information about loaded data.
Abstract base class for instrument-specific item classes.
Abstract base class to handle non-XML data save and load.
virtual QString fileName() const =0
Reports file name to save/load non-XML data.
virtual bool containsNonXMLData() const =0
Checks if object owns non-XML data.
virtual bool loadData(const QString &projectDir)=0
Loads non-XML data from projectDir and returns success flag.
virtual QDateTime lastModified() const =0
Indicates last modification timepoint.
virtual bool saveData(const QString &projectDir)=0
Saves non-XML data in projectDir and returns success flag.
Describes a selection (various possibilities and the current one).
Base class for a GUI data item.
QString projectDir(const QString &projectFileName)
Returns project directory deduced from project file name.
QString const & name(EShape k)