15 #ifndef BORNAGAIN_MVVM_MODEL_MVVM_STANDARDITEMS_DATA1DITEM_H
16 #define BORNAGAIN_MVVM_MODEL_MVVM_STANDARDITEMS_DATA1DITEM_H
32 static inline const std::string P_VALUES =
"P_VALUES";
33 static inline const std::string P_ERRORS =
"P_ERRORS";
34 static inline const std::string T_AXIS =
"T_AXIS";
42 void setValues(
const std::vector<double>& data);
45 void setErrors(
const std::vector<double>& errors);
49 template <
typename T,
typename... Args> T* setAxis(Args&&... args);
60 throw std::runtime_error(
"Axis was already set. Currently we do not support axis change");
70 result->setParameters(std::forward<Args>(args)...);
71 setValues(std::vector<double>(result->size(), 0.0));
Complex item holding mixed SessionItem types (single properties and other CompountItems).
Represents one-dimensional data (axis and values).
static const std::string T_AXIS
void setValues(const std::vector< double > &data)
Sets internal data buffer to given data.
T * setAxis(Args &&... args)
Inserts axis of given type.
SessionItem * getItem(const std::string &tag, int row=0) const
Returns item at given row of given tag.
SessionModel * model() const
Returns the model to which given item belongs to.
bool insertItem(SessionItem *item, const TagRow &tagrow)
Insert item into given tag under the given row.
T * insertItem(SessionItem *parent=nullptr, const TagRow &tagrow={})
Inserts item into given parent under given tagrow.
materialitems.h Collection of materials to populate MaterialModel.
std::vector< double > binValues(const QCPGraph *graph)
Returns vector representing y-values on QCPgraph.
std::vector< double > binErrors(const QCPGraph *graph)
Returns vector representing bin errors of QCPGraph.
std::vector< double > binCenters(const QCPGraph *graph)
Returns vector representing bin centers on QCPgraph.