##// END OF EJS Templates
Variable slot is called when x range of its graph changed
perrinel -
r210:f1820cb4eabb
parent child
Show More
@@ -1,10 +1,16
1 1 #ifndef SCIQLOP_VARIABLE_H
2 2 #define SCIQLOP_VARIABLE_H
3 3
4 #include <Common/spimpl.h>
4 #include <Data/SqpDateTime.h>
5
5 6
7 #include <QLoggingCategory>
6 8 #include <QObject>
7 9
10 #include <Common/spimpl.h>
11
12 Q_DECLARE_LOGGING_CATEGORY(LOG_Variable)
13
8 14 class IDataSeries;
9 15 class QString;
10 16
@@ -24,6 +30,9 public:
24 30 /// @return the data of the variable, nullptr if there is no data
25 31 IDataSeries *dataSeries() const noexcept;
26 32
33 public slots:
34 void onXRangeChanged(SqpDateTime dateTime);
note

old code

35
27 36 private:
28 37 class VariablePrivate;
29 38 spimpl::unique_impl_ptr<VariablePrivate> impl;
@@ -1,6 +1,9
1 1 #include "Variable/Variable.h"
2 2
3 3 #include <Data/IDataSeries.h>
4 #include <Data/SqpDateTime.h>
5
6 Q_LOGGING_CATEGORY(LOG_Variable, "Variable")
4 7
5 8 struct Variable::VariablePrivate {
6 9 explicit VariablePrivate(const QString &name, const QString &unit, const QString &mission)
@@ -11,6 +14,8 struct Variable::VariablePrivate {
11 14 QString m_Name;
12 15 QString m_Unit;
13 16 QString m_Mission;
17
18 SqpDateTime m_DateTime; // The dateTime available in the view and loaded. not the cache.
14 19 std::unique_ptr<IDataSeries> m_DataSeries;
15 20 };
16 21
@@ -46,3 +51,8 IDataSeries *Variable::dataSeries() const noexcept
46 51 {
47 52 return impl->m_DataSeries.get();
48 53 }
54
55 void Variable::onXRangeChanged(SqpDateTime dateTime)
56 {
57 qCInfo(LOG_Variable()) << "onXRangeChanged detected";
58 }
General Comments 0
You need to be logged in to leave comments. Login now