VisualizationGraphHelper.h
39 lines
| 1.2 KiB
| text/x-c
|
CLexer
r227 | #ifndef SCIQLOP_VISUALIZATIONGRAPHHELPER_H | |||
#define SCIQLOP_VISUALIZATIONGRAPHHELPER_H | ||||
Alexandre Leroux
|
r168 | |||
Alexandre Leroux
|
r545 | #include "Visualization/VisualizationDefs.h" | ||
r471 | #include <Data/SqpRange.h> | |||
r219 | ||||
Alexandre Leroux
|
r168 | #include <QLoggingCategory> | ||
#include <QVector> | ||||
Alexandre Leroux
|
r174 | #include <memory> | ||
r227 | Q_DECLARE_LOGGING_CATEGORY(LOG_VisualizationGraphHelper) | |||
Alexandre Leroux
|
r168 | |||
r219 | class IDataSeries; | |||
Alexandre Leroux
|
r168 | class QCPAbstractPlottable; | ||
class QCustomPlot; | ||||
class Variable; | ||||
/** | ||||
r227 | * @brief The VisualizationGraphHelper class aims to create the QCustomPlot components relative to a | |||
Alexandre Leroux
|
r168 | * variable, depending on the data series of this variable | ||
*/ | ||||
r227 | struct VisualizationGraphHelper { | |||
Alexandre Leroux
|
r168 | /** | ||
* Creates (if possible) the QCustomPlot components relative to the variable passed in | ||||
* parameter, and adds these to the plot passed in parameter. | ||||
* @param variable the variable for which to create the components | ||||
* @param plot the plot in which to add the created components. It takes ownership of these | ||||
* components. | ||||
* @return the list of the components created | ||||
*/ | ||||
Alexandre Leroux
|
r545 | static PlottablesMap create(std::shared_ptr<Variable> variable, QCustomPlot &plot) noexcept; | ||
r219 | ||||
Alexandre Leroux
|
r551 | static void updateData(PlottablesMap &plottables, std::shared_ptr<IDataSeries> dataSeries, | ||
Alexandre Leroux
|
r545 | const SqpRange &dateTime); | ||
Alexandre Leroux
|
r168 | }; | ||
r227 | #endif // SCIQLOP_VISUALIZATIONGRAPHHELPER_H | |||