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

cantor/src/lib

  • Cantor
  • Backend
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
Cantor::Backend Class Referenceabstract

#include <backend.h>

Inheritance diagram for Cantor::Backend:
Inheritance graph
[legend]

Public Types

enum  Capability {
  Nothing = 0x0, LaTexOutput = 0x1, InteractiveMode = 0x2, SyntaxHighlighting = 0x4,
  Completion = 0x8, SyntaxHelp = 0x10, VariableManagement = 0x20
}
 

Public Member Functions

virtual Capabilities capabilities () const =0
 
QString comment () const
 
virtual KConfigSkeleton * config () const
 
virtual Session * createSession ()=0
 
virtual QString description () const
 
Extension * extension (const QString &name) const
 
QStringList extensions () const
 
virtual KUrl helpUrl () const
 
QString icon () const
 
virtual QString id () const =0
 
bool isEnabled () const
 
QString name () const
 
virtual bool requirementsFullfilled () const
 
void setEnabled (bool enabled)
 
virtual QWidget * settingsWidget (QWidget *parent) const
 
QString url () const
 

Static Public Member Functions

static QList< Backend * > availableBackends ()
 
static Backend * createBackend (const QString &name)
 
static QStringList listAvailableBackends ()
 

Protected Member Functions

 Backend (QObject *parent=0, const QList< QVariant > args=QList< QVariant >())
 
virtual ~Backend ()
 

Detailed Description

The Backend class provides access to information about the backend.

It provides access to what features are supported by the backend, and a factory method to create a new Session It needs to be subclassed by all Backends.

Author
Alexander Rieder

Definition at line 52 of file backend.h.

Member Enumeration Documentation

enum Cantor::Backend::Capability

This enum is used to specify the Features, supported by a backend.

Enumerator
Nothing 

the Backend doesn't support any of the optional features

LaTexOutput 

it can output results as LaTeX code

InteractiveMode 

it supports an interactive workflow.

(It means a command can ask for additional input while running

SyntaxHighlighting 

it offers a custom Syntax Highlighter

Completion 

it offers completion of partially typed commands

SyntaxHelp 

it offers help about a commands syntax, that will be shown in a tooltip

VariableManagement 

it offers access to the variables (for variable management panel)

Definition at line 59 of file backend.h.

Constructor & Destructor Documentation

Backend::Backend ( QObject *  parent = 0,
const QList< QVariant >  args = QList<QVariant>() 
)
explicitprotected

Create a new Backend.

Normally the static createBackend factory method should be used.

Parameters
parentthe Parent object
argsoptional arguments (not used)

Definition at line 42 of file backend.cpp.

Backend::~Backend ( )
protectedvirtual

Destructor.

Doesn't anything.

Definition at line 49 of file backend.cpp.

Member Function Documentation

QList< Backend * > Backend::availableBackends ( )
static

Returns Pointers to all the installed backends.

Returns
Pointers to all the installed backends

Definition at line 109 of file backend.cpp.

virtual Capabilities Cantor::Backend::capabilities ( ) const
pure virtual

Returns list of the supported optional features.

Returns
a list of features, containing items of the Capabiltiy enum, ORed together
QString Backend::comment ( ) const

Returns a short comment about the backend.

Returns
comment about the backend

Definition at line 59 of file backend.cpp.

KConfigSkeleton * Backend::config ( ) const
virtual

Returns a KConfig object, containing all the settings, the backend might need.

Returns
a KConfigSkeleton object, for configuring this backend

Definition at line 161 of file backend.cpp.

Backend * Backend::createBackend ( const QString &  name)
static

Returns the backend with the given name, or null if it isn't found.

Returns
the backend with the given name, or null if it isn't found

Definition at line 143 of file backend.cpp.

virtual Session* Cantor::Backend::createSession ( )
pure virtual

Creates a new Session.

It is the way to go to create a Session, don't call new Session on your own.

Returns
a new Session of this Backend, or 0 if creating failed
QString Backend::description ( ) const
virtual

Returns a longer description of the Backend, e.g.

purpose, strengths etc. It should help the user to decide between the different Backends

Returns
a description of the backend. It can contain html

Definition at line 64 of file backend.cpp.

Extension * Backend::extension ( const QString &  name) const

Returns an Extension of this backend for the given name, or null if the Backend doesn't have an extension with this name.

Returns
Pointer to the Extension object with the given name

Definition at line 176 of file backend.cpp.

QStringList Backend::extensions ( ) const

Returns a list of the names of all the Extensions supported by this backend.

Returns
a list of the names of all the Extensions supported by this backend
See also
extension(const QString& name)

Definition at line 167 of file backend.cpp.

KUrl Backend::helpUrl ( ) const
virtual

Returns an Url pointing to the Help of the Backend The method should be overwritten by all Backends(who have an online help) You should make the returned Url translateble, e.g.

by doing something like: return i18nc("the url to the documentation of KAlgebra, please check if there is a translated version and use the correct url", "http://docs.kde.org/stable/en/kdeedu/kalgebra/");

Returns
Url of the help

Definition at line 79 of file backend.cpp.

QString Backend::icon ( ) const

Returns the icon to use with this backend.

Returns
name of the icon

Definition at line 69 of file backend.cpp.

virtual QString Cantor::Backend::id ( ) const
pure virtual

Returns a unique string to identify this backend.

In contrast to name() this string isn't translated

Returns
string to identify backend
bool Backend::isEnabled ( ) const

Returns if the backend should be enabled (shown in the Backend dialog)

Returns
true, if the enabled flag is set to true, and the requirements are fullfilled
false, if the backend was purposedly disabled, or requirements are missing
See also
requirementsFullfilled()

Definition at line 84 of file backend.cpp.

QStringList Backend::listAvailableBackends ( )
static

Returns a list of the names of all the installed and enabled backends.

Returns
a list of the names of all the installed and enabled backends
See also
isEnabled()

Definition at line 96 of file backend.cpp.

QString Backend::name ( ) const

Returns the name of the backend.

Returns
the backends name

Definition at line 54 of file backend.cpp.

bool Backend::requirementsFullfilled ( ) const
virtual

Returns wether all of this backends requirements are fulfiled, or if some are missing.

Returns
true if all the requirements needed to use this Backend are fulfilled
false some requirements are missing. e.g. the maxima executable can not be found
See also
Capablility

Definition at line 181 of file backend.cpp.

void Backend::setEnabled ( bool  enabled)

Enables/disables this backend.

Parameters
enabledtrue to enable backend false to disable

Definition at line 89 of file backend.cpp.

QWidget * Backend::settingsWidget ( QWidget *  parent) const
virtual

Returns a Widget for configuring this backend.

Returns
Widget for usage in the Settings dialog

Definition at line 155 of file backend.cpp.

QString Backend::url ( ) const

Returns the Url of the Homepage for the Backend.

Returns
the url

Definition at line 74 of file backend.cpp.


The documentation for this class was generated from the following files:
  • backend.h
  • backend.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:42:50 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
  • kstars
  • libkdeedu
  •   keduvocdocument
  • 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