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

Kross

  • sources
  • kde-4.14
  • kdelibs
  • kross
  • kjs
kjsscript.h
Go to the documentation of this file.
1 /***************************************************************************
2  * kjsscript.h
3  * This file is part of the KDE project
4  * copyright (C)2004-2006 by Sebastian Sauer (mail@dipe.org)
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Library General Public License for more details.
14  * You should have received a copy of the GNU Library General Public License
15  * along with this program; see the file COPYING. If not, write to
16  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  * Boston, MA 02110-1301, USA.
18  ***************************************************************************/
19 
20 #ifndef KROSS_KJSSCRIPT_H
21 #define KROSS_KJSSCRIPT_H
22 
23 #include "../core/krossconfig.h"
24 #include "../core/script.h"
25 
26 namespace Kross {
27 
28  // Forward declarations.
29  class KjsScriptPrivate;
30 
35  class KjsScript : public Kross::Script
36  {
37  public:
38 
48  KjsScript(Kross::Interpreter* interpreter, Kross::Action* action);
49 
53  virtual ~KjsScript();
54 
61  virtual void execute();
62 
66  virtual QStringList functionNames();
67 
74  virtual QVariant callFunction(const QString& name, const QVariantList& args = QVariantList());
75 
82  virtual QVariant evaluate(const QByteArray& code);
83 
84  private:
86  KjsScriptPrivate* d;
87 
89  bool initialize();
91  void finalize();
92  };
93 
94 }
95 
96 #endif
97 
Kross::KjsScript
The KjsScript class implements Kross::Script to provide scripts for the KDE JavaScript interpreter ba...
Definition: kjsscript.h:35
Kross::Script
Base class for interpreter dependent functionality each script provides.
Definition: core/script.h:43
QByteArray
Kross::KjsScript::callFunction
virtual QVariant callFunction(const QString &name, const QVariantList &args=QVariantList())
Call a function in the script.
Definition: kjsscript.cpp:377
Kross::KjsScript::functionNames
virtual QStringList functionNames()
Definition: kjsscript.cpp:346
Kross::KjsScript::KjsScript
KjsScript(Kross::Interpreter *interpreter, Kross::Action *action)
Constructor.
Definition: kjsscript.cpp:162
Kross::KjsScript::evaluate
virtual QVariant evaluate(const QByteArray &code)
Evaluate some scripting code.
Definition: kjsscript.cpp:437
QObject::name
const char * name() const
Kross::KjsScript::~KjsScript
virtual ~KjsScript()
Destructor.
Definition: kjsscript.cpp:173
QString
Kross::Script::interpreter
Interpreter * interpreter() const
Definition: core/script.cpp:56
Kross::Interpreter
Base class for interpreter implementations.
Definition: core/interpreter.h:177
QStringList
Kross::KjsScript::execute
virtual void execute()
Execute the script.
Definition: kjsscript.cpp:272
Kross::Script::action
Action * action() const
Definition: core/script.cpp:61
Kross::Action
The Action class is an abstract container to deal with scripts like a single standalone script file...
Definition: action.h:94
QVariant
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:44 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Kross

Skip menu "Kross"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

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