VisualizationGraphHelper.h
42 lines
| 1.3 KiB
| text/x-c
|
CLexer
r243 | #ifndef SCIQLOP_VISUALIZATIONGRAPHHELPER_H | |||
#define SCIQLOP_VISUALIZATIONGRAPHHELPER_H | ||||
Alexandre Leroux
|
r181 | |||
Alexandre Leroux
|
r581 | #include "Visualization/VisualizationDefs.h" | ||
r1347 | #include <Data/DateTimeRange.h> | |||
r235 | ||||
Alexandre Leroux
|
r181 | #include <QLoggingCategory> | ||
#include <QVector> | ||||
Alexandre Leroux
|
r187 | #include <memory> | ||
r243 | Q_DECLARE_LOGGING_CATEGORY(LOG_VisualizationGraphHelper) | |||
Alexandre Leroux
|
r181 | |||
r235 | class IDataSeries; | |||
Alexandre Leroux
|
r181 | class QCPAbstractPlottable; | ||
class QCustomPlot; | ||||
r1420 | class Variable2; | |||
Alexandre Leroux
|
r181 | |||
/** | ||||
r243 | * @brief The VisualizationGraphHelper class aims to create the QCustomPlot components relative to a | |||
Alexandre Leroux
|
r181 | * variable, depending on the data series of this variable | ||
*/ | ||||
r1420 | struct VisualizationGraphHelper | |||
{ | ||||
Alexandre Leroux
|
r181 | /** | ||
* 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 | ||||
*/ | ||||
r1420 | static PlottablesMap create(std::shared_ptr<Variable2> variable, QCustomPlot& plot) noexcept; | |||
r235 | ||||
r1420 | static void updateData(PlottablesMap& plottables, std::shared_ptr<Variable2> variable, | |||
const DateTimeRange& dateTime); | ||||
Alexandre Leroux
|
r900 | |||
r1420 | static void setYAxisRange(std::shared_ptr<Variable2> variable, QCustomPlot& plot) noexcept; | |||
Alexandre Leroux
|
r181 | }; | ||
r243 | #endif // SCIQLOP_VISUALIZATIONGRAPHHELPER_H | |||