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

Kross

  • Kross
  • EcmaScript
Public Slots | Public Member Functions

Kross::EcmaScript Class Reference

The EcmaScript class implements a Kross::Script to handle a single script. More...

#include <script.h>

Inheritance diagram for Kross::EcmaScript:
Inheritance graph
[legend]

List of all members.

Public Slots

virtual QVariant callFunction (const QString &name, const QVariantList &args=QVariantList())
QObject * engine () const
virtual QVariant evaluate (const QByteArray &code)
virtual void execute ()
virtual QStringList functionNames ()

Public Member Functions

 EcmaScript (Kross::Interpreter *interpreter, Kross::Action *action)
virtual ~EcmaScript ()

Detailed Description

The EcmaScript class implements a Kross::Script to handle a single script.

Each script and script file will have its own EcmaScript instance as container for a Ecma QtScript that is managed by the Kross::Action class.

Definition at line 38 of file qts/script.h.


Constructor & Destructor Documentation

EcmaScript::EcmaScript ( Kross::Interpreter *  interpreter,
Kross::Action *  action 
)

Constructor.

Parameters:
interpreterThe EcmaInterpreter instance this script belongs to.
actionThe Kross::Action instance that contains details about the script and that decorates this script.

Definition at line 166 of file qts/script.cpp.

EcmaScript::~EcmaScript ( ) [virtual]

Destructor.

Definition at line 171 of file qts/script.cpp.


Member Function Documentation

QVariant EcmaScript::callFunction ( const QString &  name,
const QVariantList &  args = QVariantList() 
) [virtual, slot]

Execute a function.

Parameters:
nameThe name of the function that should be called.
argsThe optional arguments for the function.
Returns:
The return value of the function.

Implements Kross::Script.

Definition at line 226 of file qts/script.cpp.

QObject * EcmaScript::engine ( ) const [slot]
Returns:
the internal used QScriptEngine instance.

Definition at line 268 of file qts/script.cpp.

QVariant EcmaScript::evaluate ( const QByteArray &  code) [virtual, slot]

Evaluate some scripting code.

Parameters:
codeThe scripting code to evaluate.
Returns:
The return value of the evaluation.

Implements Kross::Script.

Definition at line 253 of file qts/script.cpp.

void EcmaScript::execute ( ) [virtual, slot]

Executes the script.

Implements Kross::Script.

Definition at line 177 of file qts/script.cpp.

QStringList EcmaScript::functionNames ( ) [virtual, slot]
Returns:
a list of function-names.

Implements Kross::Script.

Definition at line 209 of file qts/script.cpp.


The documentation for this class was generated from the following files:
  • qts/script.h
  • qts/script.cpp

Kross

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • 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
Generated for kdelibs by doxygen 1.7.3
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal