• 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
syntaxhelpobject.cpp
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 #include "syntaxhelpobject.h"
22 using namespace Cantor;
23 
24 #include "session.h"
25 
26 #include <QTimer>
27 
28 class Cantor::SyntaxHelpObjectPrivate{
29  public:
30  QString command;
31  Cantor::Session* session;
32  QString htmlResult;
33 };
34 
35 SyntaxHelpObject::SyntaxHelpObject(const QString& command, Cantor::Session* session) : QObject(session),
36  d(new SyntaxHelpObjectPrivate)
37 {
38  d->command=command;
39  d->session=session;
40 }
41 
42 SyntaxHelpObject::~SyntaxHelpObject()
43 {
44  delete d;
45 }
46 
47 void SyntaxHelpObject::fetchSyntaxHelp()
48 {
49  //Start a delayed fetch
50  QTimer::singleShot(0, this, SLOT(fetchInformation()));
51 }
52 
53 
54 QString SyntaxHelpObject::toHtml()
55 {
56  return d->htmlResult;
57 }
58 
59 void SyntaxHelpObject::setHtml(const QString& result)
60 {
61  d->htmlResult=result;
62 }
63 
64 QString SyntaxHelpObject::command()
65 {
66  return d->command;
67 }
68 
69 Session* SyntaxHelpObject::session()
70 {
71  return d->session;
72 }
Cantor::SyntaxHelpObject::~SyntaxHelpObject
~SyntaxHelpObject()
Destructor.
Definition: syntaxhelpobject.cpp:42
session.h
Cantor::SyntaxHelpObject::session
Session * session()
Returns the Session, this Object belongs to.
Definition: syntaxhelpobject.cpp:69
Cantor::SyntaxHelpObject::setHtml
void setHtml(const QString &result)
Set the html syntax help.
Definition: syntaxhelpobject.cpp:59
Cantor::SyntaxHelpObject::SyntaxHelpObject
SyntaxHelpObject(const QString &command, Session *session)
Construct a HelpObject, for the given command, belonging to the Session session.
Definition: syntaxhelpobject.cpp:35
syntaxhelpobject.h
QObject
QString
Cantor::SyntaxHelpObject::toHtml
QString toHtml()
Returns Html text of the Syntax Help.
Definition: syntaxhelpobject.cpp:54
Cantor::SyntaxHelpObject::fetchInformation
virtual void fetchInformation()=0
This method should fetch the Syntax help information from the backend.
Cantor::SyntaxHelpObject::fetchSyntaxHelp
void fetchSyntaxHelp()
Start fetching the syntax help, emitting done() when done.
Definition: syntaxhelpobject.cpp:47
Cantor::SyntaxHelpObject::command
QString command()
Returns the command, this SyntaxHelp is for.
Definition: syntaxhelpobject.cpp:64
QTimer::singleShot
singleShot
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