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

Kross

  • Kross
  • EcmaScript
Public Slots | Public Member Functions | List of all members
Kross::EcmaScript Class Reference

#include <script.h>

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

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
 
virtual QVariant callFunction (const QString &name, const QVariantList &args=QVariantList())=0
 
virtual QVariant evaluate (const QByteArray &code)=0
 
virtual void execute ()=0
 
virtual QStringList functionNames ()=0
 
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 167 of file qts/script.cpp.

EcmaScript::~EcmaScript ( )
virtual

Destructor.

Definition at line 172 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.

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

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

Definition at line 269 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.

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

void EcmaScript::execute ( )
virtualslot

Executes the script.

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

QStringList EcmaScript::functionNames ( )
virtualslot
Returns
a list of function-names.

Definition at line 210 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-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:54 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
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • 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