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

Kate

KateScript Class Reference

#include <katescript.h>

Inheritance diagram for KateScript:

Inheritance graph
[legend]

List of all members.


Detailed Description

KateScript objects represent a script that can be executed and inspected.

Definition at line 112 of file katescript.h.


Public Member Functions

void clearExceptions ()
void displayBacktrace (const QScriptValue &error, const QString &header=QString())
const QString & errorMessage ()
QScriptValue function (const QString &name)
QScriptValue global (const QString &name)
const KateScriptInformation & information ()
 KateScript (const QString &url, const KateScriptInformation &information)
bool load ()
bool setView (KateView *view)
const QString & url ()
 ~KateScript ()

Protected Attributes

QScriptEngine * m_engine

Constructor & Destructor Documentation

KateScript::KateScript ( const QString &  url,
const KateScriptInformation &  information 
)

Create a new script representation, passing a file url to it and a KateScriptInformation instance.

Loading of the script will happen lazily

Definition at line 74 of file katescript.cpp.

KateScript::~KateScript (  ) 

Definition at line 80 of file katescript.cpp.


Member Function Documentation

void KateScript::clearExceptions (  ) 

Clears any uncaught exceptions in the script engine.

Definition at line 105 of file katescript.cpp.

void KateScript::displayBacktrace ( const QScriptValue &  error,
const QString &  header = QString() 
)

Displays the backtrace when a script has errored out.

Definition at line 90 of file katescript.cpp.

const QString& KateScript::errorMessage (  )  [inline]

Return a context-specific error message.

Definition at line 156 of file katescript.h.

QScriptValue KateScript::function ( const QString &  name  ) 

Return a function in the script of the given name, or an invalid QScriptValue if no such function exists.

Definition at line 118 of file katescript.cpp.

QScriptValue KateScript::global ( const QString &  name  ) 

Get a QScriptValue for a global item in the script given its name, or an invalid QScriptValue if no such global item exists.

Definition at line 110 of file katescript.cpp.

const KateScriptInformation& KateScript::information (  )  [inline]

Metadata for the script.

Definition at line 126 of file katescript.h.

bool KateScript::load (  ) 

Load the script.

If loading is successful, returns true. Otherwise, returns returns false and an error message will be set (see errorMessage()). Note that you don't have to call this -- it is called as necessary by the functions that require it. Subsequent calls to load will return the value it returned the first time.

Definition at line 126 of file katescript.cpp.

bool KateScript::setView ( KateView *  view  ) 

set view for this script for the execution will trigger load!

Definition at line 173 of file katescript.cpp.

const QString& KateScript::url (  )  [inline]

The script's URL.

Definition at line 123 of file katescript.h.


Member Data Documentation

QScriptEngine* KateScript::m_engine [protected]

The Qt interpreter for this script.

Definition at line 181 of file katescript.h.


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

Kate

Skip menu "Kate"
  • 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
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • KIO
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.4
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