Changeset View
Changeset View
Standalone View
Standalone View
src/backends/julia/juliasession.h
Show All 20 Lines | |||||
21 | 21 | | |||
22 | #include <QMap> | 22 | #include <QMap> | ||
23 | #include <QRegularExpression> | 23 | #include <QRegularExpression> | ||
24 | 24 | | |||
25 | #include "session.h" | 25 | #include "session.h" | ||
26 | 26 | | |||
27 | class JuliaExpression; | 27 | class JuliaExpression; | ||
28 | class JuliaCompletionObject; | 28 | class JuliaCompletionObject; | ||
29 | class JuliaVariableModel; | ||||
29 | class KProcess; | 30 | class KProcess; | ||
30 | class QDBusInterface; | 31 | class QDBusInterface; | ||
31 | namespace Cantor { | 32 | namespace Cantor { | ||
32 | class DefaultVariableModel; | 33 | class DefaultVariableModel; | ||
33 | } | 34 | } | ||
34 | 35 | | |||
35 | /** | 36 | /** | ||
36 | * Implements a Cantor session for the Julia backend | 37 | * Implements a Cantor session for the Julia backend | ||
▲ Show 20 Lines • Show All 44 Lines • ▼ Show 20 Line(s) | 44 | public: | |||
81 | /** | 82 | /** | ||
82 | * @see Cantor::Session::syntaxHighlighter | 83 | * @see Cantor::Session::syntaxHighlighter | ||
83 | */ | 84 | */ | ||
84 | QSyntaxHighlighter *syntaxHighlighter(QObject *parent) override; | 85 | QSyntaxHighlighter *syntaxHighlighter(QObject *parent) override; | ||
85 | 86 | | |||
86 | /** | 87 | /** | ||
87 | * @see Cantor::Session::variableModel | 88 | * @see Cantor::Session::variableModel | ||
88 | */ | 89 | */ | ||
89 | QAbstractItemModel *variableModel() override; | 90 | Cantor::DefaultVariableModel *variableModel() const override; | ||
90 | 91 | | |||
91 | /** | 92 | /** | ||
92 | * @return indicator if config says to integrate plots into worksheet | 93 | * @return indicator if config says to integrate plots into worksheet | ||
93 | */ | 94 | */ | ||
94 | bool integratePlots(); | 95 | bool integratePlots(); | ||
95 | 96 | | |||
96 | Q_SIGNALS: | | |||
97 | /** | | |||
98 | * Emit this to update syntax highlighter | | |||
99 | */ | | |||
100 | void updateHighlighter(); | | |||
101 | | ||||
102 | private Q_SLOTS: | 97 | private Q_SLOTS: | ||
103 | /** | 98 | /** | ||
104 | * Called when async call to JuliaServer is finished | 99 | * Called when async call to JuliaServer is finished | ||
105 | */ | 100 | */ | ||
106 | void onResultReady(); | 101 | void onResultReady(); | ||
107 | 102 | | |||
108 | private: | 103 | private: | ||
109 | KProcess *m_process; //< process to run JuliaServer inside | 104 | KProcess *m_process; //< process to run JuliaServer inside | ||
110 | QDBusInterface *m_interface; //< interface to JuliaServer | 105 | QDBusInterface *m_interface; //< interface to JuliaServer | ||
111 | 106 | | |||
112 | /// Expressions running at the moment | 107 | /// Expressions running at the moment | ||
113 | QList<JuliaExpression *> m_runningExpressions; | 108 | QList<JuliaExpression *> m_runningExpressions; | ||
114 | JuliaExpression *m_currentExpression; //< current expression | 109 | JuliaExpression *m_currentExpression; //< current expression | ||
115 | 110 | | |||
116 | /// Variable management model | 111 | /// Variable management model | ||
117 | Cantor::DefaultVariableModel *m_variableModel; | 112 | JuliaVariableModel *m_variableModel; | ||
118 | static const QRegularExpression typeVariableInfo; | 113 | bool m_needUpdate; | ||
asemke: m_variablModel? Why not to use the model from the base class? | |||||
Julia don't supports our expressionQueue(). I want add the code for this before adding code for using model from base class. sirgienko: Julia don't supports our expressionQueue(). I want add the code for this before adding code for… | |||||
119 | 114 | | |||
120 | /// Cache to speedup modules whos calls | 115 | /// Cache to speedup modules whos calls | ||
121 | QMap<QString, QString> m_whos_cache; | 116 | QMap<QString, QString> m_whos_cache; | ||
122 | 117 | | |||
123 | friend JuliaExpression; | 118 | friend JuliaExpression; | ||
124 | friend JuliaCompletionObject; | 119 | friend JuliaCompletionObject; | ||
125 | 120 | | |||
126 | /** | 121 | /** | ||
Show All 35 Lines | |||||
162 | * @return stderr of the last executed command | 157 | * @return stderr of the last executed command | ||
163 | */ | 158 | */ | ||
164 | QString getError(); | 159 | QString getError(); | ||
165 | 160 | | |||
166 | /** | 161 | /** | ||
167 | * @return indicator of exception occurred during the last command execution | 162 | * @return indicator of exception occurred during the last command execution | ||
168 | */ | 163 | */ | ||
169 | bool getWasException(); | 164 | bool getWasException(); | ||
170 | | ||||
171 | /** | | |||
172 | * Updates variable model by querying all modules in scope with whos command | | |||
173 | */ | | |||
174 | void listVariables(); | | |||
175 | }; | 165 | }; |
m_variablModel? Why not to use the model from the base class?