• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

cantor/src/lib

  • sources
  • kde-4.14
  • kdeedu
  • cantor
  • src
  • lib
session.h
Go to the documentation of this file.
1 /*
2  This program is free software; you can redistribute it and/or
3  modify it under the terms of the GNU General Public License
4  as published by the Free Software Foundation; either version 2
5  of the License, or (at your option) any later version.
6 
7  This program is distributed in the hope that it will be useful,
8  but WITHOUT ANY WARRANTY; without even the implied warranty of
9  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  GNU General Public License for more details.
11 
12  You should have received a copy of the GNU General Public License
13  along with this program; if not, write to the Free Software
14  Foundation, Inc., 51 Franklin Street, Fifth Floor,
15  Boston, MA 02110-1301, USA.
16 
17  ---
18  Copyright (C) 2009 Alexander Rieder <alexanderrieder@gmail.com>
19  */
20 
21 #ifndef _SESSION_H
22 #define _SESSION_H
23 
24 #include <QObject>
25 
26 #include "cantor_export.h"
27 
28 #include "expression.h"
29 
30 class QTextEdit;
31 class QSyntaxHighlighter;
32 class QAbstractItemModel;
33 
37 namespace Cantor
38 {
39 class Backend;
40 class SessionPrivate;
41 class CompletionObject;
42 class SyntaxHelpObject;
43 
50 class CANTOR_EXPORT Session : public QObject
51 {
52  Q_OBJECT
53  public:
54  enum Status { Running,
55  Done
56  };
57 
63  Session( Backend* backend);
67  ~Session();
68 
74  virtual void login() = 0;
80  virtual void logout() = 0;
81 
91  virtual Expression* evaluateExpression(const QString& command, Expression::FinishingBehavior finishingBehavior) = 0;
92 
97  Expression* evaluateExpression(const QString& command);
98 
102  virtual void interrupt() = 0;
103 
115  virtual CompletionObject* completionFor(const QString& cmd, int index = -1);
116 
126  virtual SyntaxHelpObject* syntaxHelpFor(const QString& cmd);
127 
133  virtual QSyntaxHighlighter* syntaxHighlighter(QObject* parent);
134 
139  virtual QAbstractItemModel* variableModel();
140 
147  virtual void setTypesettingEnabled(bool enable);
148 
153  Backend* backend();
154 
159  Cantor::Session::Status status();
164  bool isTypesettingEnabled();
165 
172  int nextExpressionId();
173 
174  protected:
180  void changeStatus(Cantor::Session::Status newStatus);
181 
182  signals:
183  void statusChanged(Cantor::Session::Status newStatus);
184  void ready();
185  void error(const QString& msg);
186 
187  private:
188  SessionPrivate* d;
189 };
190 }
191 #endif /* _SESSION_H */
Cantor::CompletionObject
This Object is used to provide a Tab Completion, in an asynchroneous way.
Definition: completionobject.h:41
CANTOR_EXPORT
#define CANTOR_EXPORT
Definition: cantor_export.h:33
Cantor::Expression::FinishingBehavior
FinishingBehavior
Enum indicating how this Expression behaves on finishing.
Definition: expression.h:62
Cantor::Expression
An Expression object is used, to store the information needed when running a command of a Session Eva...
Definition: expression.h:49
QSyntaxHighlighter
QObject
expression.h
Cantor::Session::Status
Status
Definition: session.h:54
QString
Cantor::SyntaxHelpObject
Object, used to display Syntax informtion to a given command It is designed for asynchroneous use...
Definition: syntaxhelpobject.h:39
QAbstractItemModel
QTextEdit
Cantor::Backend
The Backend class provides access to information about the backend.
Definition: backend.h:52
cantor_export.h
Cantor::Session
The Session object is the main class used to interact with a Backend.
Definition: session.h:50
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:16:33 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

cantor/src/lib

Skip menu "cantor/src/lib"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal