##// END OF EJS Templates
Updates VariableModel::createVariable() method...
Updates VariableModel::createVariable() method - Stores variable as shared_ptr (maybe the variable may exist outside this controller) - Adds default data series for the variable - Returns the shared_ptr after variable creation

File last commit:

r126:2c63a29c9c11
r165:81409bbf8178
Show More
ScalarSeries.cpp
13 lines | 422 B | text/x-c | CppLexer
#include <Data/ScalarSeries.h>
ScalarSeries::ScalarSeries(int size, const QString &xAxisUnit, const QString &valuesUnit)
: DataSeries{std::make_shared<ArrayData<1> >(size), xAxisUnit,
std::make_shared<ArrayData<1> >(size), valuesUnit}
{
}
void ScalarSeries::setData(int index, double x, double value) noexcept
{
xAxisData()->setData(index, x);
valuesData()->setData(index, value);
}