Changeset View
Changeset View
Standalone View
Standalone View
src/backends/qalculate/qalculatesession.h
Context not available. | |||||
20 | #define QALCULATE_SESSION_H | 20 | #define QALCULATE_SESSION_H | ||
---|---|---|---|---|---|
21 | 21 | | |||
22 | #include "session.h" | 22 | #include "session.h" | ||
23 | #include "qalculateexpression.h" | ||||
23 | 24 | | |||
24 | #include <QSharedPointer> | 25 | #include <QSharedPointer> | ||
26 | #include <QQueue> | ||||
25 | 27 | | |||
26 | #include <libqalculate/Variable.h> | 28 | #include <libqalculate/Variable.h> | ||
27 | #include <libqalculate/MathStructure.h> | 29 | #include <libqalculate/MathStructure.h> | ||
Context not available. | |||||
31 | } | 33 | } | ||
32 | 34 | | |||
33 | class QalculateEngine; | 35 | class QalculateEngine; | ||
36 | class QProcess; | ||||
37 | | ||||
34 | 38 | | |||
35 | class QalculateSession : public Cantor::Session | 39 | class QalculateSession : public Cantor::Session | ||
36 | { | 40 | { | ||
37 | Q_OBJECT | 41 | Q_OBJECT | ||
38 | 42 | | |||
39 | private: | 43 | private: | ||
40 | QList<KnownVariable*> m_ansVariables; | | |||
41 | Cantor::DefaultVariableModel* m_variableModel; | 44 | Cantor::DefaultVariableModel* m_variableModel; | ||
45 | QProcess* m_process; | ||||
46 | QalculateExpression* m_currentExpression; | ||||
47 | QString m_output; | ||||
48 | QString m_finalOutput; | ||||
49 | QString m_currentCommand; | ||||
50 | QQueue<QalculateExpression*> m_expressionQueue; | ||||
51 | QQueue<QString> m_commandQueue; | ||||
52 | | ||||
53 | | ||||
54 | private: | ||||
55 | void runExpressionQueue(); | ||||
56 | void runCommandQueue(); | ||||
42 | 57 | | |||
43 | public: | 58 | public: | ||
44 | QalculateSession( Cantor::Backend* backend); | 59 | QalculateSession( Cantor::Backend* backend); | ||
Context not available. | |||||
54 | virtual Cantor::SyntaxHelpObject* syntaxHelpFor(const QString& cmd); | 69 | virtual Cantor::SyntaxHelpObject* syntaxHelpFor(const QString& cmd); | ||
55 | virtual QSyntaxHighlighter* syntaxHighlighter(QObject* parent); | 70 | virtual QSyntaxHighlighter* syntaxHighlighter(QObject* parent); | ||
56 | 71 | | |||
57 | void setLastResult(MathStructure); | 72 | void runExpression(); | ||
58 | QAbstractItemModel* variableModel(); | 73 | QAbstractItemModel* variableModel(); | ||
74 | | ||||
75 | public Q_SLOTS: | ||||
76 | void readOutput(); | ||||
77 | void readError(); | ||||
78 | void processStarted(); | ||||
79 | void currentExpressionStatusChanged(Cantor::Expression::Status status); | ||||
59 | }; | 80 | }; | ||
60 | 81 | | |||
61 | #endif | 82 | #endif | ||
Context not available. |