GraphPlottablesFactory.h
38 lines
| 1.3 KiB
| text/x-c
|
CLexer
Alexandre Leroux
|
r181 | #ifndef SCIQLOP_GRAPHPLOTTABLESFACTORY_H | ||
#define SCIQLOP_GRAPHPLOTTABLESFACTORY_H | ||||
r235 | #include <Data/SqpDateTime.h> | |||
Alexandre Leroux
|
r181 | #include <QLoggingCategory> | ||
#include <QVector> | ||||
Alexandre Leroux
|
r187 | #include <memory> | ||
Alexandre Leroux
|
r181 | Q_DECLARE_LOGGING_CATEGORY(LOG_GraphPlottablesFactory) | ||
r235 | class IDataSeries; | |||
Alexandre Leroux
|
r181 | class QCPAbstractPlottable; | ||
class QCustomPlot; | ||||
class Variable; | ||||
/** | ||||
* @brief The GraphPlottablesFactory class aims to create the QCustomPlot components relative to a | ||||
* variable, depending on the data series of this variable | ||||
*/ | ||||
struct GraphPlottablesFactory { | ||||
/** | ||||
* 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
|
r187 | static QVector<QCPAbstractPlottable *> create(std::shared_ptr<Variable> variable, | ||
Alexandre Leroux
|
r181 | QCustomPlot &plot) noexcept; | ||
r235 | ||||
static void updateData(QVector<QCPAbstractPlottable *> plotableVect, IDataSeries *dataSeries, | ||||
const SqpDateTime &dateTime); | ||||
Alexandre Leroux
|
r181 | }; | ||
#endif // SCIQLOP_GRAPHPLOTTABLESFACTORY_H | ||||