Kate
katescript.cpp
Go to the documentation of this file.
44 static QScriptValue cursorToScriptValue(QScriptEngine *engine, const KTextEditor::Cursor &cursor)
192 m_engine->globalObject().setProperty("document", m_engine->newQObject(m_document = new KateScriptDocument()));
193 m_engine->globalObject().setProperty("view", m_engine->newQObject(m_view = new KateScriptView()));
QScriptValue debug(QScriptContext *context, QScriptEngine *engine)
Definition: katescripthelpers.cpp:154
Cursor & start()
QScriptValue i18n(QScriptContext *context, QScriptEngine *engine)
i18n("text", arguments [optional])
Definition: katescripthelpers.cpp:186
static void cursorFromScriptValue(const QScriptValue &obj, KTextEditor::Cursor &cursor)
Converstion function from QtScript cursor to KTextEditor::Cursor.
Definition: katescript.cpp:52
KateScript(const QString &urlOrScript, enum InputType inputType=InputURL)
Create a new script representation, passing either a file or the script content urlOrScript to it...
Definition: katescript.cpp:78
QScriptValue i18np(QScriptContext *context, QScriptEngine *engine)
i18np("singular", "plural", number, arguments [optional])
Definition: katescripthelpers.cpp:239
QScriptValue i18nc(QScriptContext *context, QScriptEngine *engine)
i18nc("context", "text", arguments [optional])
Definition: katescripthelpers.cpp:210
Definition: katescript.h:110
void removeCatalog(const QString &catalog)
QScriptValue global(const QString &name)
Get a QScriptValue for a global item in the script given its name, or an invalid QScriptValue if no s...
Definition: katescript.cpp:135
QString backtrace(const QScriptValue &error, const QString &header=QString())
Returns the backtrace when a script has errored out.
Definition: katescript.cpp:106
Definition: katescript.h:53
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
QScriptValue i18ncp(QScriptContext *context, QScriptEngine *engine)
i18ncp("context", "singular", "plural", number, arguments [optional])
Definition: katescripthelpers.cpp:273
bool readFile(const QString &sourceUrl, QString &sourceCode)
read complete file contents, helper
Definition: katescripthelpers.cpp:41
QScriptValue require(QScriptContext *context, QScriptEngine *engine)
Definition: katescripthelpers.cpp:94
Thinish wrapping around KateDocument, exposing the methods we want exposed and adding some helper met...
Definition: katescriptdocument.h:46
QScriptValue read(QScriptContext *context, QScriptEngine *)
Definition: katescripthelpers.cpp:58
void setDocument(KateDocument *document)
Definition: katescriptdocument.cpp:39
void clearExceptions()
Clears any uncaught exceptions in the script engine.
Definition: katescript.cpp:128
void setGeneralHeader(const KateScriptHeader &generalHeader)
set the general header after construction of the script
Definition: katescript.cpp:229
Definition: kateview.h:78
void insertCatalog(const QString &catalog)
static QScriptValue rangeToScriptValue(QScriptEngine *engine, const KTextEditor::Range &range)
Converstion function from QtScript range to KTextEditor::Range.
Definition: katescript.cpp:59
Thinish wrapping around KateView, exposing the methods we want exposed and adding some helper methods...
Definition: katescriptview.h:43
KLocale * locale()
virtual int line() const
QScriptValue function(const QString &name)
Return a function in the script of the given name, or an invalid QScriptValue if no such function exi...
Definition: katescript.cpp:143
virtual void setPosition(const Cursor &position)
bool setView(KateView *view)
set view for this script for the execution will trigger load!
Definition: katescript.cpp:219
static void rangeFromScriptValue(const QScriptValue &obj, KTextEditor::Range &range)
Converstion function from QtScript range to KTextEditor::Range.
Definition: katescript.cpp:69
void displayBacktrace(const QScriptValue &error, const QString &header=QString())
Displays the backtrace when a script has errored out.
Definition: katescript.cpp:119
Cursor & end()
int column() const
static QScriptValue cursorToScriptValue(QScriptEngine *engine, const KTextEditor::Cursor &cursor)
Converstion function from KTextEditor::Cursor to QtScript cursor.
Definition: katescript.cpp:44
bool hasException(const QScriptValue &object, const QString &file)
Checks for exception and gives feedback on the console.
Definition: katescript.cpp:206
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:31:52 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:31:52 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.