32 if (
m_data->getAllocatedSize() != data.size())
34 "Different data size.");
36 m_data->setRawDataVector(std::move(data));
57 return static_cast<bool>(
m_data);
76 std::unique_ptr<OutputData<double>> clone(
getOutputData()->clone());
Defines class ComboProperty.
Defines class GUIHelpers functions.
Defines ImportDataInfo helper struct.
Defines class IntensityDataIOFactory.
Custom property to define list of string values with multiple selections.
QVariant variant() const
Constructs variant enclosing given ComboProperty.
OutputData< double > * getOutputData()
static const QString P_FILE_NAME
virtual void setOutputData(OutputData< double > *data)=0
The given pointer becomes owned by this class!!
QDateTime lastModified() const override
Indicates last modification timepoint.
QDateTime m_last_modified
void setLastModified(const QDateTime &dtime)
bool load(const QString &projectDir) override
Loads non-XML data from projectDir and returns success flag.
DataItem(const QString &modelType)
bool containsNonXMLData() const override
Checks if object owns non-XML data.
QString selectedAxesUnits() const
void setRawDataVector(std::vector< double > data)
Sets the raw data vector from external source Checks only the equality of data size,...
std::mutex m_update_data_mutex
QString fileName() const override
Reports file name to save/load non-XML data.
static const QString P_AXES_UNITS
std::unique_ptr< OutputData< double > > m_data
simulation results
void setFileName(const QString &filename)
bool save(const QString &projectDir) override
Saves non-XML data in projectDir and returns success flag.
static OutputData< double > * readOutputData(const std::string &file_name)
Reads file and returns newly created OutputData object.
static void writeOutputData(const OutputData< double > &data, const std::string &file_name)
Writes OutputData in file.
void setOnValueChange(std::function< void(void)> f, const void *caller=0)
void setOnPropertyChange(std::function< void(QString)> f, const void *caller=0)
SessionItem * addProperty(const QString &name, const QVariant &variant)
Add new property item and register new tag.
void setVisible(bool enabled)
Flags accessors.
QVariant getItemValue(const QString &tag) const
Directly access value of item under given tag.
ModelMapper * mapper()
Returns the current model mapper of this item. Creates new one if necessary.
void setItemValue(const QString &tag, const QVariant &variant)
Directly set value of item under given tag.
void emitDataChanged(int role=Qt::DisplayRole)
Notify model about data changes.
std::string filename(const std::string &path)
Returns path without directory part ("Foo/Bar/Doz.int.gz" -> "Doz.int.gz")
QString currentDateTime()
QString projectDir(const QString &projectFileName)
Returns project directory deduced from project file name.
QString const & name(EShape k)