@@ -19,7 +19,7 class DBEventProduct; | |||||
19 | Q_DECLARE_LOGGING_CATEGORY(LOG_CatalogueController) |
|
19 | Q_DECLARE_LOGGING_CATEGORY(LOG_CatalogueController) | |
20 |
|
20 | |||
21 | class DataSourceItem; |
|
21 | class DataSourceItem; | |
22 | class Variable; |
|
22 | class Variable2; | |
23 |
|
23 | |||
24 | constexpr auto default_repo = "default"; |
|
24 | constexpr auto default_repo = "default"; | |
25 |
|
25 | |||
@@ -81,7 +81,8 public: | |||||
81 |
|
81 | |||
82 | signals: |
|
82 | signals: | |
83 | void repositoryAdded(const QString& repository); |
|
83 | void repositoryAdded(const QString& repository); | |
84 |
void catalogueAdded(const Catalogue_ptr& catalogue, |
|
84 | void catalogueAdded(const Catalogue_ptr& catalogue, | |
|
85 | const QString& repository); | |||
85 | void catalogueChanged(const Catalogue_ptr& catalogue); |
|
86 | void catalogueChanged(const Catalogue_ptr& catalogue); | |
86 |
|
87 | |||
87 | // // Event |
|
88 | // // Event |
@@ -90,8 +90,8 private: | |||||
90 | }; |
|
90 | }; | |
91 |
|
91 | |||
92 | // Required for using shared_ptr in signals/slots |
|
92 | // Required for using shared_ptr in signals/slots | |
93 |
|
|
93 | SCIQLOP_REGISTER_META_TYPE(VARIABLE_PTR_REGISTRY, std::shared_ptr<Variable2>) | |
94 |
|
|
94 | SCIQLOP_REGISTER_META_TYPE(VARIABLE_PTR_VECTOR_REGISTRY, | |
95 |
|
|
95 | QVector<std::shared_ptr<Variable2>>) | |
96 |
|
96 | |||
97 | #endif // SCIQLOP_VARIABLE2_H |
|
97 | #endif // SCIQLOP_VARIABLE2_H |
@@ -3,49 +3,51 | |||||
3 |
|
3 | |||
4 | #include "CoreGlobal.h" |
|
4 | #include "CoreGlobal.h" | |
5 |
|
5 | |||
|
6 | #include <Common/spimpl.h> | |||
6 | #include <Data/DateTimeRange.h> |
|
7 | #include <Data/DateTimeRange.h> | |
7 |
|
||||
8 | #include <QLoggingCategory> |
|
8 | #include <QLoggingCategory> | |
9 | #include <QObject> |
|
9 | #include <QObject> | |
10 | #include <QUuid> |
|
10 | #include <QUuid> | |
11 |
|
11 | |||
12 | #include <Common/spimpl.h> |
|
|||
13 |
|
||||
14 | Q_DECLARE_LOGGING_CATEGORY(LOG_VisualizationController) |
|
12 | Q_DECLARE_LOGGING_CATEGORY(LOG_VisualizationController) | |
15 |
|
13 | |||
16 | class DataSourceItem; |
|
14 | class DataSourceItem; | |
17 | class Variable; |
|
15 | class Variable2; | |
18 |
|
16 | |||
19 | /** |
|
17 | /** | |
20 |
* @brief The VisualizationController class aims to make the link between |
|
18 | * @brief The VisualizationController class aims to make the link between | |
21 |
* This is the intermediate class that SciQlop has to |
|
19 | * SciQlop and its plugins. This is the intermediate class that SciQlop has to | |
22 | * Please first use register method to initialize a plugin specified by its metadata name (JSON |
|
20 | * use in the way to connect a data source. Please first use register method to | |
23 | * plugin source) then others specifics method will be able to access it. You can load a data source |
|
21 | * initialize a plugin specified by its metadata name (JSON plugin source) then | |
|
22 | * others specifics method will be able to access it. You can load a data source | |||
24 | * driver plugin then create a data source. |
|
23 | * driver plugin then create a data source. | |
25 | */ |
|
24 | */ | |
26 |
class SCIQLOP_CORE_EXPORT VisualizationController : public QObject |
|
25 | class SCIQLOP_CORE_EXPORT VisualizationController : public QObject | |
27 | Q_OBJECT |
|
26 | { | |
|
27 | Q_OBJECT | |||
28 | public: |
|
28 | public: | |
29 |
|
|
29 | explicit VisualizationController(QObject* parent = 0); | |
30 |
|
|
30 | virtual ~VisualizationController(); | |
31 |
|
31 | |||
32 | signals: |
|
32 | signals: | |
33 |
|
|
33 | /// Signal emitted when a variable is about to be deleted from SciQlop | |
34 |
|
|
34 | void variableAboutToBeDeleted(std::shared_ptr<Variable2> variable); | |
35 |
|
35 | |||
36 |
|
|
36 | /// Signal emitted when a data acquisition is requested on a range for a | |
37 | void rangeChanged(std::shared_ptr<Variable> variable, const DateTimeRange &range); |
|
37 | /// variable | |
|
38 | void rangeChanged(std::shared_ptr<Variable2> variable, | |||
|
39 | const DateTimeRange& range); | |||
38 |
|
40 | |||
39 | public slots: |
|
41 | public slots: | |
40 |
|
|
42 | /// Manage init/end of the controller | |
41 |
|
|
43 | void initialize(); | |
42 |
|
|
44 | void finalize(); | |
43 |
|
45 | |||
44 | private: |
|
46 | private: | |
45 |
|
|
47 | void waitForFinish(); | |
46 |
|
48 | |||
47 |
|
|
49 | class VisualizationControllerPrivate; | |
48 |
|
|
50 | spimpl::unique_impl_ptr<VisualizationControllerPrivate> impl; | |
49 | }; |
|
51 | }; | |
50 |
|
52 | |||
51 | #endif // SCIQLOP_VISUALIZATIONCONTROLLER_H |
|
53 | #endif // SCIQLOP_VISUALIZATIONCONTROLLER_H |
@@ -157,7 +157,7 DataSeriesType Variable2::type() | |||||
157 | return impl->type(); |
|
157 | return impl->type(); | |
158 | } |
|
158 | } | |
159 |
|
159 | |||
160 |
QVariantHash Variable2::metadata() const noexcept { return |
|
160 | QVariantHash Variable2::metadata() const noexcept { return impl->metadata(); } | |
161 |
|
161 | |||
162 | template<typename T> |
|
162 | template<typename T> | |
163 | std::shared_ptr<TimeSeries::ITimeSerie> |
|
163 | std::shared_ptr<TimeSeries::ITimeSerie> |
General Comments 0
You need to be logged in to leave comments.
Login now