• 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
backend.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 _BACKEND_H
22 #define _BACKEND_H
23 
24 #include <QObject>
25 #include <QVariant>
26 #include <kxmlguiclient.h>
27 #include <kplugininfo.h>
28 
29 #include "cantor_export.h"
30 
31 class KConfigSkeleton;
32 class QWidget;
33 
37 namespace Cantor
38 {
39 class Session;
40 class Extension;
41 class BackendPrivate;
42 
52 class CANTOR_EXPORT Backend : public QObject, public KXMLGUIClient
53 {
54  Q_OBJECT
55  public:
59  enum Capability{
60  Nothing = 0x0,
61  LaTexOutput = 0x1,
62  InteractiveMode = 0x2,
65  SyntaxHighlighting = 0x4,
66  Completion = 0x8,
67  SyntaxHelp = 0x10,
70  VariableManagement= 0x20
71  };
72  Q_DECLARE_FLAGS(Capabilities, Capability)
73 
74  protected:
81  explicit Backend( QObject* parent = 0,const QList<QVariant> args=QList<QVariant>() );
85  virtual ~Backend();
86  public:
87 
93  virtual Session* createSession() = 0;
98  virtual Capabilities capabilities() const = 0;
105  virtual bool requirementsFullfilled() const;
106 
112  virtual QString id() const = 0;
113 
114  //Stuff extracted from the .desktop file
119  QString name() const;
124  QString comment() const;
129  QString icon() const;
134  QString url() const;
143  virtual KUrl helpUrl() const;
150  bool isEnabled() const;
155  void setEnabled(bool enabled);
156 
162  virtual QString description() const;
167  virtual QWidget* settingsWidget(QWidget* parent) const;
173  virtual KConfigSkeleton* config() const;
179  QStringList extensions() const;
185  Extension * extension(const QString& name) const;
186 
192  static QStringList listAvailableBackends();
197  static QList<Backend*> availableBackends();
202  static Backend* createBackend(const QString& name);
203  private:
204  BackendPrivate* d;
205 };
206 
207 Q_DECLARE_OPERATORS_FOR_FLAGS(Backend::Capabilities)
208 
209 }
210 
211 #endif /* _BACKEND_H */
QWidget
CANTOR_EXPORT
#define CANTOR_EXPORT
Definition: cantor_export.h:33
KXMLGUIClient
KConfigSkeleton
Cantor::Backend::Capability
Capability
This enum is used to specify the Features, supported by a backend.
Definition: backend.h:59
QObject
QString
QList
QStringList
Cantor::Extension
This is the base class for all Extensions.
Definition: extension.h:43
Cantor::Backend
The Backend class provides access to information about the backend.
Definition: backend.h:52
cantor_export.h
QVariant
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