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

Kate

  • Kate
  • Script
Functions
Kate::Script Namespace Reference

Functions

QScriptValue debug (QScriptContext *context, QScriptEngine *engine)
 
QScriptValue i18n (QScriptContext *context, QScriptEngine *engine)
 
QScriptValue i18nc (QScriptContext *context, QScriptEngine *engine)
 
QScriptValue i18ncp (QScriptContext *context, QScriptEngine *engine)
 
QScriptValue i18np (QScriptContext *context, QScriptEngine *engine)
 
QScriptValue read (QScriptContext *context, QScriptEngine *)
 
bool readFile (const QString &sourceUrl, QString &sourceCode)
 
QScriptValue require (QScriptContext *context, QScriptEngine *engine)
 
KLocalizedString substituteArguments (const KLocalizedString &kls, const QVariantList &arguments, int max=99)
 

Detailed Description

Top-level script functions.

Function Documentation

KATEPART_TESTS_EXPORT QScriptValue Kate::Script::debug ( QScriptContext *  context,
QScriptEngine *  engine 
)

Definition at line 154 of file katescripthelpers.cpp.

KATEPART_TESTS_EXPORT QScriptValue Kate::Script::i18n ( QScriptContext *  context,
QScriptEngine *  engine 
)

i18n("text", arguments [optional])

Definition at line 186 of file katescripthelpers.cpp.

KATEPART_TESTS_EXPORT QScriptValue Kate::Script::i18nc ( QScriptContext *  context,
QScriptEngine *  engine 
)

i18nc("context", "text", arguments [optional])

Definition at line 210 of file katescripthelpers.cpp.

KATEPART_TESTS_EXPORT QScriptValue Kate::Script::i18ncp ( QScriptContext *  context,
QScriptEngine *  engine 
)

i18ncp("context", "singular", "plural", number, arguments [optional])

Definition at line 273 of file katescripthelpers.cpp.

KATEPART_TESTS_EXPORT QScriptValue Kate::Script::i18np ( QScriptContext *  context,
QScriptEngine *  engine 
)

i18np("singular", "plural", number, arguments [optional])

Definition at line 239 of file katescripthelpers.cpp.

KATEPART_TESTS_EXPORT QScriptValue Kate::Script::read ( QScriptContext *  context,
QScriptEngine *   
)

just search for all given files and read them all

get full name of file skip on errors

try to read complete file skip non-existing files

concat to full content

return full content

Definition at line 58 of file katescripthelpers.cpp.

KATEPART_TESTS_EXPORT bool Kate::Script::readFile ( const QString &  sourceUrl,
QString &  sourceCode 
)

read complete file contents, helper

Definition at line 41 of file katescripthelpers.cpp.

KATEPART_TESTS_EXPORT QScriptValue Kate::Script::require ( QScriptContext *  context,
QScriptEngine *  engine 
)

just search for all given scripts and eval them

get full name of file skip on errors

check include guard

try to read complete file skip non-existing files

fixup QScriptContext else the nested evaluate will not work :/ see http://www.qtcentre.org/threads/31027-QtScript-nesting-with-include-imports-or-spawned-script-engines http://www.qtcentre.org/threads/20432-Can-I-include-a-script-from-script

eval in current script engine

set include guard

no return value

Definition at line 94 of file katescripthelpers.cpp.

KLocalizedString Kate::Script::substituteArguments ( const KLocalizedString &  kls,
const QVariantList &  arguments,
int  max = 99 
)

helper function to do the substitution from QtScript > QVariant > real values

Definition at line 167 of file katescripthelpers.cpp.

This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 9 2020 03:57:03 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Kate

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

applications API Reference

Skip menu "applications API Reference"
  •   kate
  •       kate
  •   KTextEditor
  •   Kate
  • Konsole

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