File indexing completed on 2024-05-05 11:55:59
0001 /* 0002 SPDX-License-Identifier: GPL-2.0-or-later 0003 SPDX-FileCopyrightText: 2009 Alexander Rieder <alexanderrieder@gmail.com> 0004 SPDX-FileCopyrightText: 2023 Alexander Semke <alexander.semke@web.de> 0005 */ 0006 0007 #ifndef _SAGEEXPRESSION_H 0008 #define _SAGEEXPRESSION_H 0009 0010 #include "expression.h" 0011 0012 class SageExpression : public Cantor::Expression 0013 { 0014 Q_OBJECT 0015 public: 0016 explicit SageExpression(Cantor::Session*, bool internal = false); 0017 0018 void evaluate() override; 0019 void parseOutput(const QString&) override; 0020 void parseError(const QString&) override; 0021 0022 void addFileResult(const QString&); 0023 0024 void onProcessError(const QString&); 0025 0026 public Q_SLOTS: 0027 void evalFinished(); 0028 0029 protected: 0030 QString additionalLatexHeaders() override; 0031 0032 private: 0033 QString m_outputCache; 0034 QString m_imagePath; 0035 bool m_isHelpRequest{false}; 0036 int m_promptCount{0}; 0037 bool m_syntaxError{false}; 0038 }; 0039 0040 #endif /* _SAGEEXPRESSION_H */