LibreVNA/Software/PC_Application/LibreVNA-GUI/Traces/Math/expression.h
2022-10-01 17:10:44 +02:00

39 lines
772 B
C++

#ifndef EXPRESSION_H
#define EXPRESSION_H
#include "tracemath.h"
#include "parser/mpParser.h"
namespace Math {
class Expression : public TraceMath
{
public:
Expression();
~Expression();
DataType outputType(DataType inputType) override;
QString description() override;
void edit() override;
static QWidget* createExplanationWidget();
virtual nlohmann::json toJSON() override;
virtual void fromJSON(nlohmann::json j) override;
Type getType() override {return Type::Expression;};
public slots:
void inputSamplesChanged(unsigned int begin, unsigned int end) override;
private slots:
void expressionChanged();
private:
QString exp;
mup::ParserX *parser;
mup::Value t, d, f, w, x, P;
};
}
#endif // EXPRESSION_H