6 #ifndef PLOTEXPRESSIONGENERATOR_H_
7 #define PLOTEXPRESSIONGENERATOR_H_
9 #include "ocurvesconfig.h"
11 #include "plotgenerator.h"
95 int addExpressions(
const QList<const PlotExpression *> &expressions);
125 template <
typename T>
126 void init(
Curves *curves,
const QList<T *> &expressions,
const QStringList &sourceNames);
129 struct ExpressionPair
134 inline bool operator == (
const PlotExpression *exp) {
return original == exp; }
137 QVector<ExpressionPair> _expressions;
138 QList<PlotInstance *> _existingCurves;
139 QStringList _sourceNames;
140 struct GenerationMarker *_marker;
143 #endif // PLOTEXPRESSIONGENERATOR_H_
bool removeExpression(const PlotExpression *expression)
Aborts generation of expression if it has yet to be generated.
AddExpressionResult
Return value sfor addExpression() and addExpressions().
Definition: plotexpressiongenerator.h:72
const Curves * curves() const
Access the curves model to load data into.
Definition: plotgenerator.h:105
Returned when some of the new expressions are successfully queued, while others have already been gen...
Definition: plotexpressiongenerator.h:76
Returned when all of the expression begin added have already been generated.
Definition: plotexpressiongenerator.h:80
Holds data for a single curve.
Definition: plotinstance.h:43
PlotExpressionGenerator(Curves *curves, const QList< PlotExpression * > &expressions, const QStringList &sourceNames)
Create an expression generator based on the given expressions and curves.
The data model for loaded plots and curves.
Definition: curves.h:36
int addExpression(const PlotExpression *expression)
Adds an expression to be generated even if already running.
int addExpressions(const QList< const PlotExpression * > &expressions)
Adds a set of expression to be generated even if already running.
~PlotExpressionGenerator()
Destructor.
Returned when all the new expressions are successfully queued and will be generated.
Definition: plotexpressiongenerator.h:82
A curve generation thread.
Definition: plotgenerator.h:84
A PlotGenerator which generated plots by evaluating PlotExpression objects.
Definition: plotexpressiongenerator.h:46
void run() override
Generation loop.
A PlotExpression represents an operation in a plot equation.
Definition: plotexpression.h:91
bool curveExists(const PlotInstance &curve) const
Check if the curve exists.