##// END OF EJS Templates
Merge branch 'feature/DataSourceItemUpdate' into develop
Merge branch 'feature/DataSourceItemUpdate' into develop

File last commit:

r293:fc4b2122dbde
r335:7becb422304c merge
Show More
Variable.cpp
94 lines | 2.2 KiB | text/x-c | CppLexer
Alexandre Leroux
Changes Variable from struct to class
r151 #include "Variable/Variable.h"
Alexandre Leroux
Adds data series to a variable
r152 #include <Data/IDataSeries.h>
Variable slot is called when x range of its graph changed
r210 #include <Data/SqpDateTime.h>
Q_LOGGING_CATEGORY(LOG_Variable, "Variable")
Alexandre Leroux
Adds data series to a variable
r152
Alexandre Leroux
Changes Variable from struct to class
r151 struct Variable::VariablePrivate {
A variable is now created with its dateTime too....
r212 explicit VariablePrivate(const QString &name, const QString &unit, const QString &mission,
const SqpDateTime &dateTime)
: m_Name{name},
m_Unit{unit},
m_Mission{mission},
m_DateTime{dateTime},
m_DataSeries{nullptr}
Alexandre Leroux
Changes Variable from struct to class
r151 {
}
QString m_Name;
QString m_Unit;
QString m_Mission;
Variable slot is called when x range of its graph changed
r210
SqpDateTime m_DateTime; // The dateTime available in the view and loaded. not the cache.
Alexandre Leroux
Adds data series to a variable
r152 std::unique_ptr<IDataSeries> m_DataSeries;
Alexandre Leroux
Changes Variable from struct to class
r151 };
A variable is now created with its dateTime too....
r212 Variable::Variable(const QString &name, const QString &unit, const QString &mission,
const SqpDateTime &dateTime)
: impl{spimpl::make_unique_impl<VariablePrivate>(name, unit, mission, dateTime)}
Alexandre Leroux
Changes Variable from struct to class
r151 {
}
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
r152
The mock plugin can now create data with view operation
r219 SqpDateTime Variable::dateTime() const noexcept
{
return impl->m_DateTime;
}
Implementation of the new Dela T computation strategy
r241 void Variable::setDateTime(const SqpDateTime &dateTime) noexcept
{
impl->m_DateTime = dateTime;
}
Alexandre Leroux
Use std::shared_ptr in CosinusProvider
r287 void Variable::setDataSeries(std::shared_ptr<IDataSeries> dataSeries) noexcept
Alexandre Leroux
Adds data series to a variable
r152 {
Alexandre Leroux
Use std::shared_ptr in CosinusProvider
r287 if (!dataSeries) {
/// @todo ALX : log
return;
Alexandre Leroux
Adds data series to a variable
r152 }
The mock plugin can now create data with view operation
r219
Alexandre Leroux
Use std::shared_ptr in CosinusProvider
r287 // Inits the data series of the variable
if (!impl->m_DataSeries) {
impl->m_DataSeries = dataSeries->clone();
}
else {
The mock plugin can now create data with view operation
r219 impl->m_DataSeries->merge(dataSeries.get());
Fix the cosinus bug....
r276 emit updated();
The mock plugin can now create data with view operation
r219 }
Alexandre Leroux
Adds data series to a variable
r152 }
Alexandre Leroux
Handles creations for scalar series
r169
IDataSeries *Variable::dataSeries() const noexcept
{
return impl->m_DataSeries.get();
}
Variable slot is called when x range of its graph changed
r210
The cache is now updated only if date requested has been successfully...
r293 bool Variable::contains(const SqpDateTime &dateTime) const noexcept
Variable slot is called when x range of its graph changed
r210 {
Implementation of the new Dela T computation strategy
r241 return impl->m_DateTime.contains(dateTime);
Variable slot is called when x range of its graph changed
r210 }
Add intersect méthode on variable and sqpDateTime...
r240
The cache is now updated only if date requested has been successfully...
r293 bool Variable::intersect(const SqpDateTime &dateTime) const noexcept
Add intersect méthode on variable and sqpDateTime...
r240 {
return impl->m_DateTime.intersect(dateTime);
}
The cache is now updated only if date requested has been successfully...
r293
bool Variable::isInside(const SqpDateTime &dateTime) const noexcept
{
return dateTime.contains(SqpDateTime{impl->m_DateTime.m_TStart, impl->m_DateTime.m_TEnd});
}