mirror of
https://github.com/jankae/LibreVNA.git
synced 2025-12-06 07:12:10 +01:00
- Off-by-one error when number of input samples changes - race condition when closing custom expression edit dialog - adjust available variables when input data type changes
40 lines
831 B
C++
40 lines
831 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;
|
|
virtual void inputTypeChanged(DataType type) override;
|
|
|
|
private slots:
|
|
void expressionChanged();
|
|
private:
|
|
QString exp;
|
|
mup::ParserX *parser;
|
|
mup::Value t, d, f, w, x, P;
|
|
};
|
|
|
|
}
|
|
|
|
#endif // EXPRESSION_H
|