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

Kross

  • Kross
  • EcmaScript
Public Slots | Public Member Functions
Kross::EcmaScript Class Reference

#include <script.h>

Inheritance diagram for Kross::EcmaScript:
Kross::Script QObject Kross::ErrorInterface

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 Slots inherited from Kross::Script
Action * action () const
Interpreter * interpreter () const

Public Member Functions

 EcmaScript (Kross::Interpreter *interpreter, Kross::Action *action)
virtual ~EcmaScript ()
- Public Member Functions inherited from Kross::Script
 Script (Interpreter *interpreter, Action *action)
virtual ~Script ()
- Public Member Functions inherited from Kross::ErrorInterface
 ErrorInterface ()
void clearError ()
long errorLineNo () const
const QString errorMessage () const
const QString errorTrace () const
bool hadError () const
void setError (const QString &errormessage, const QString &tracemessage=QString(), long lineno=-1)
void setError (ErrorInterface *error)

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() 
)
virtualslot

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)
virtualslot

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 ( )
virtualslot

Executes the script.

Implements Kross::Script.

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

QStringList EcmaScript::functionNames ( )
virtualslot
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
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Tue Jul 23 2013 22:00:37 by doxygen 1.8.1.1 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-4.10.5 API Reference

Skip menu "kdelibs-4.10.5 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
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