File indexing completed on 2024-12-01 09:37:32
0001 /* 0002 SPDX-License-Identifier: GPL-2.0-or-later 0003 SPDX-FileCopyrightText: 2012 Filipe Saraiva <filipe@kde.org> 0004 */ 0005 0006 #ifndef _PYTHONEXPRESSION_H 0007 #define _PYTHONEXPRESSION_H 0008 0009 #include "expression.h" 0010 class QTemporaryFile; 0011 0012 class PythonExpression : public Cantor::Expression 0013 { 0014 Q_OBJECT 0015 public: 0016 PythonExpression(Cantor::Session*, bool internal); 0017 ~PythonExpression() override; 0018 0019 void evaluate() override; 0020 QString internalCommand() override; 0021 0022 void parseOutput(const QString&) override; 0023 void parseWarning(const QString&); 0024 void parseError(const QString&) override; 0025 0026 private: 0027 void imageChanged(); 0028 QTemporaryFile* m_tempFile{nullptr}; 0029 }; 0030 0031 #endif /* _PYTHONEXPRESSION_H */