##// END OF EJS Templates
Add lambda in VIsualizationWidget to fix the bug of the corner widget button size...
Add lambda in VIsualizationWidget to fix the bug of the corner widget button size Modify the property of the QFrame to ensure the box around the zone widget to be visible

File last commit:

r182:cc2257464c26
r186:134da9ef870f
Show More
Variable.cpp
48 lines | 1.1 KiB | text/x-c | CppLexer
Alexandre Leroux
Changes Variable from struct to class
r163 #include "Variable/Variable.h"
Alexandre Leroux
Adds data series to a variable
r164 #include <Data/IDataSeries.h>
Alexandre Leroux
Changes Variable from struct to class
r163 struct Variable::VariablePrivate {
explicit VariablePrivate(const QString &name, const QString &unit, const QString &mission)
Alexandre Leroux
Adds data series to a variable
r164 : m_Name{name}, m_Unit{unit}, m_Mission{mission}, m_DataSeries{nullptr}
Alexandre Leroux
Changes Variable from struct to class
r163 {
}
QString m_Name;
QString m_Unit;
QString m_Mission;
Alexandre Leroux
Adds data series to a variable
r164 std::unique_ptr<IDataSeries> m_DataSeries;
Alexandre Leroux
Changes Variable from struct to class
r163 };
Variable::Variable(const QString &name, const QString &unit, const QString &mission)
: impl{spimpl::make_unique_impl<VariablePrivate>(name, unit, mission)}
{
}
QString Variable::name() const noexcept
{
return impl->m_Name;
}
QString Variable::mission() const noexcept
{
return impl->m_Mission;
}
QString Variable::unit() const noexcept
{
return impl->m_Unit;
}
Alexandre Leroux
Adds data series to a variable
r164
void Variable::addDataSeries(std::unique_ptr<IDataSeries> dataSeries) noexcept
{
if (!impl->m_DataSeries) {
impl->m_DataSeries = std::move(dataSeries);
}
/// @todo : else, merge the two data series (if possible)
}
Alexandre Leroux
Handles creations for scalar series
r182
IDataSeries *Variable::dataSeries() const noexcept
{
return impl->m_DataSeries.get();
}