@@ -0,0 +1,10 | |||
|
1 | #ifndef SCIQLOP_VISUALIZATIONDEFS_H | |
|
2 | #define SCIQLOP_VISUALIZATIONDEFS_H | |
|
3 | ||
|
4 | #include <map> | |
|
5 | ||
|
6 | class QCPAbstractPlottable; | |
|
7 | ||
|
8 | using PlottablesMap = std::map<int, QCPAbstractPlottable *>; | |
|
9 | ||
|
10 | #endif // SCIQLOP_VISUALIZATIONDEFS_H |
@@ -1,40 +1,39 | |||
|
1 | 1 | #ifndef SCIQLOP_VISUALIZATIONGRAPHHELPER_H |
|
2 | 2 | #define SCIQLOP_VISUALIZATIONGRAPHHELPER_H |
|
3 | 3 | |
|
4 | #include "Visualization/VisualizationDefs.h" | |
|
5 | ||
|
4 | 6 | #include <Data/SqpRange.h> |
|
5 | 7 | |
|
6 | 8 | #include <QLoggingCategory> |
|
7 | 9 | #include <QVector> |
|
8 | 10 | |
|
9 | 11 | #include <memory> |
|
10 | 12 | |
|
11 | 13 | Q_DECLARE_LOGGING_CATEGORY(LOG_VisualizationGraphHelper) |
|
12 | 14 | |
|
13 | 15 | class IDataSeries; |
|
14 | 16 | class QCPAbstractPlottable; |
|
15 | 17 | class QCustomPlot; |
|
16 | 18 | class Variable; |
|
17 | 19 | |
|
18 | 20 | /** |
|
19 | 21 | * @brief The VisualizationGraphHelper class aims to create the QCustomPlot components relative to a |
|
20 | 22 | * variable, depending on the data series of this variable |
|
21 | 23 | */ |
|
22 | 24 | struct VisualizationGraphHelper { |
|
23 | 25 | /** |
|
24 | 26 | * Creates (if possible) the QCustomPlot components relative to the variable passed in |
|
25 | 27 | * parameter, and adds these to the plot passed in parameter. |
|
26 | 28 | * @param variable the variable for which to create the components |
|
27 | 29 | * @param plot the plot in which to add the created components. It takes ownership of these |
|
28 | 30 | * components. |
|
29 | 31 | * @return the list of the components created |
|
30 | 32 | */ |
|
31 |
static |
|
|
32 | QCustomPlot &plot) noexcept; | |
|
33 | static QVector<QCPAbstractPlottable *> createV2(std::shared_ptr<Variable> variable, | |
|
34 | QCustomPlot &plot) noexcept; | |
|
33 | static PlottablesMap create(std::shared_ptr<Variable> variable, QCustomPlot &plot) noexcept; | |
|
35 | 34 | |
|
36 |
static void updateData( |
|
|
37 |
|
|
|
35 | static void updateData(PlottablesMap &plottables, IDataSeries *dataSeries, | |
|
36 | const SqpRange &dateTime); | |
|
38 | 37 | }; |
|
39 | 38 | |
|
40 | 39 | #endif // SCIQLOP_VISUALIZATIONGRAPHHELPER_H |
General Comments 0
You need to be logged in to leave comments.
Login now