15 #ifndef BORNAGAIN_GUI2_MODEL_MODELUTILS_H
16 #define BORNAGAIN_GUI2_MODEL_MODELUTILS_H
18 #include "darefl_export.h"
30 class ExperimentalDataModel;
39 DAREFLCORE_EXPORT std::vector<ModelView::ExternalProperty>
44 FindProperty(
const std::vector<ModelView::ExternalProperty>& properties,
const std::string&
id);
48 DAREFLCORE_EXPORT std::vector<double>
CreateDiffVector(
const std::vector<double>& a,
49 const std::vector<double>& b);
The ExternalProperty class defines custom QVariant property to carry the text, color and an identifie...
Represents one-dimensional data (axis and values).
Property to carry text, color and identifier.
One-dimensional graph representation of Data1DItem.
materialitems.h Collection of materials to populate MaterialModel.
DAREFLCORE_EXPORT std::vector< double > CreateDiffVector(const std::vector< double > &a, const std::vector< double > &b)
Returns vector representing elementwise 2*(a-b)/(a+b) difference over two vectors.
DAREFLCORE_EXPORT ModelView::ExternalProperty CreateProperty(const ModelView::GraphItem *graph)
Returns property representing given graph.
DAREFLCORE_EXPORT void SetDifference(const ModelView::Data1DItem *data1, const ModelView::Data1DItem *data2, ModelView::Data1DItem *target)
Make target item represent difference of two Data1DItems. Target will get an axis as in data1.
DAREFLCORE_EXPORT ModelView::ExternalProperty FindProperty(const std::vector< ModelView::ExternalProperty > &properties, const std::string &id)
Finds the property with the same id in given vector and returns it.
DAREFLCORE_EXPORT std::vector< ModelView::ExternalProperty > CreateGraphProperties(ExperimentalDataModel *model)
Returns vector of properties representing GraphItem content of the model.
Based on Qt example "codeeditor" Copyright (C) 2016 The Qt Company Ltd.