File indexing completed on 2024-05-05 11:55:51

0001 /*
0002     SPDX-FileCopyrightText: 2010 Miha Čančula <miha.cancula@gmail.com>
0003     SPDX-FileCopyrightText: 2018-2022 by Alexander Semke (alexander.semke@web.de)
0004 
0005     SPDX-License-Identifier: GPL-2.0-or-later
0006 */
0007 
0008 #ifndef OCTAVEEXPRESSION_H
0009 #define OCTAVEEXPRESSION_H
0010 
0011 #include <config-cantorlib.h>
0012 
0013 #include <expression.h>
0014 #include <QStringList>
0015 
0016 class OctaveExpression : public Cantor::Expression
0017 {
0018     Q_OBJECT
0019 
0020 public:
0021     explicit OctaveExpression(Cantor::Session*, bool internal = false);
0022     ~OctaveExpression();
0023 
0024     void evaluate() override;
0025     QString internalCommand() override;
0026 
0027     void parseOutput(const QString&) override;
0028     void parseError(const QString&) override;
0029     void imageChanged();
0030 
0031     const static QStringList plotExtensions;
0032 
0033 private:
0034     QString m_resultString;
0035     bool m_finished = false;
0036     bool m_plotPending = false;
0037     QString m_plotFilename;
0038 };
0039 
0040 #endif // OCTAVEEXPRESSION_H