@@ -1,10 +1,16 | |||||
1 | #ifndef SCIQLOP_VARIABLE_H |
|
1 | #ifndef SCIQLOP_VARIABLE_H | |
2 | #define SCIQLOP_VARIABLE_H |
|
2 | #define SCIQLOP_VARIABLE_H | |
3 |
|
3 | |||
4 |
#include < |
|
4 | #include <Data/SqpDateTime.h> | |
|
5 | ||||
5 |
|
6 | |||
|
7 | #include <QLoggingCategory> | |||
6 | #include <QObject> |
|
8 | #include <QObject> | |
7 |
|
9 | |||
|
10 | #include <Common/spimpl.h> | |||
|
11 | ||||
|
12 | Q_DECLARE_LOGGING_CATEGORY(LOG_Variable) | |||
|
13 | ||||
8 | class IDataSeries; |
|
14 | class IDataSeries; | |
9 | class QString; |
|
15 | class QString; | |
10 |
|
16 | |||
@@ -24,6 +30,9 public: | |||||
24 | /// @return the data of the variable, nullptr if there is no data |
|
30 | /// @return the data of the variable, nullptr if there is no data | |
25 | IDataSeries *dataSeries() const noexcept; |
|
31 | IDataSeries *dataSeries() const noexcept; | |
26 |
|
32 | |||
|
33 | public slots: | |||
|
34 | void onXRangeChanged(SqpDateTime dateTime); | |||
|
35 | ||||
27 | private: |
|
36 | private: | |
28 | class VariablePrivate; |
|
37 | class VariablePrivate; | |
29 | spimpl::unique_impl_ptr<VariablePrivate> impl; |
|
38 | spimpl::unique_impl_ptr<VariablePrivate> impl; |
@@ -1,6 +1,9 | |||||
1 | #include "Variable/Variable.h" |
|
1 | #include "Variable/Variable.h" | |
2 |
|
2 | |||
3 | #include <Data/IDataSeries.h> |
|
3 | #include <Data/IDataSeries.h> | |
|
4 | #include <Data/SqpDateTime.h> | |||
|
5 | ||||
|
6 | Q_LOGGING_CATEGORY(LOG_Variable, "Variable") | |||
4 |
|
7 | |||
5 | struct Variable::VariablePrivate { |
|
8 | struct Variable::VariablePrivate { | |
6 | explicit VariablePrivate(const QString &name, const QString &unit, const QString &mission) |
|
9 | explicit VariablePrivate(const QString &name, const QString &unit, const QString &mission) | |
@@ -11,6 +14,8 struct Variable::VariablePrivate { | |||||
11 | QString m_Name; |
|
14 | QString m_Name; | |
12 | QString m_Unit; |
|
15 | QString m_Unit; | |
13 | QString m_Mission; |
|
16 | QString m_Mission; | |
|
17 | ||||
|
18 | SqpDateTime m_DateTime; // The dateTime available in the view and loaded. not the cache. | |||
14 | std::unique_ptr<IDataSeries> m_DataSeries; |
|
19 | std::unique_ptr<IDataSeries> m_DataSeries; | |
15 | }; |
|
20 | }; | |
16 |
|
21 | |||
@@ -46,3 +51,8 IDataSeries *Variable::dataSeries() const noexcept | |||||
46 | { |
|
51 | { | |
47 | return impl->m_DataSeries.get(); |
|
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