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

Kate

Public Slots | Signals | Public Member Functions | Static Public Member Functions

KateScriptManager Class Reference

Manage the scripts on disks -- find them and query them. More...

#include <katescriptmanager.h>

Inheritance diagram for KateScriptManager:
Inheritance graph
[legend]

List of all members.

Public Slots

void slotTemplateScriptOwnerDestroyed (QObject *owner)

Signals

void reloaded ()

Public Member Functions

 KateScriptManager ()
virtual ~KateScriptManager ()
const QStringList & cmds ()
void collect (const QString &resourceFile, const QString &directory, bool force=false)
const QVector
< KateCommandLineScript * > & 
commandLineScripts ()
bool exec (KTextEditor::View *view, const QString &cmd, QString &errorMsg)
bool help (KTextEditor::View *view, const QString &cmd, QString &msg)
KateIndentScript * indentationScript (const QString &scriptname)
KateIndentScript * indentationScriptByIndex (int index)
int indentationScriptCount ()
KateIndentScript * indenter (const QString &language)
KTextEditor::TemplateScript * registerTemplateScript (QObject *owner, const QString &script)
void reload ()
KateTemplateScript * templateScript (KTextEditor::TemplateScript *templateScript)
void unregisterTemplateScript (KTextEditor::TemplateScript *templateScript)

Static Public Member Functions

static bool parseMetaInformation (const QString &url, QHash< QString, QString > &pairs)

Detailed Description

Manage the scripts on disks -- find them and query them.

Provides access to loaded scripts too.

Definition at line 43 of file katescriptmanager.h.


Constructor & Destructor Documentation

KateScriptManager::KateScriptManager ( )

Definition at line 42 of file katescriptmanager.cpp.

KateScriptManager::~KateScriptManager ( ) [virtual]

Definition at line 50 of file katescriptmanager.cpp.


Member Function Documentation

const QStringList & KateScriptManager::cmds ( ) [virtual]

supported commands as prefixes

Returns:
prefix list

Implements KTextEditor::Command.

Definition at line 357 of file katescriptmanager.cpp.

void KateScriptManager::collect ( const QString &  resourceFile,
const QString &  directory,
bool  force = false 
)

Find all of the scripts matching the wildcard directory.

The resource file with the name resourceFile is used for caching. If force is true, then the cache will not be used. This populates the internal lists of scripts. This is automatically called by init so you shouldn't call it yourself unless you want to refresh the collected list.

Definition at line 86 of file katescriptmanager.cpp.

const QVector<KateCommandLineScript*>& KateScriptManager::commandLineScripts ( ) [inline]

Get all scripts available in the command line.

Definition at line 52 of file katescriptmanager.h.

bool KateScriptManager::exec ( KTextEditor::View *  view,
const QString &  cmd,
QString &  errorMsg 
) [virtual]

execute command

Kate::Command stuff.

Parameters:
viewview to use for execution
cmdcmd string
errorMsgerror to return if no success
Returns:
success

Implements KTextEditor::Command.

Definition at line 324 of file katescriptmanager.cpp.

bool KateScriptManager::help ( KTextEditor::View *  view,
const QString &  cmd,
QString &  msg 
) [virtual]

get help for a command

Parameters:
viewview to use
cmdcmd name
msghelp message
Returns:
help available or not

Implements KTextEditor::Command.

Definition at line 344 of file katescriptmanager.cpp.

KateIndentScript* KateScriptManager::indentationScript ( const QString &  scriptname) [inline]

Definition at line 112 of file katescriptmanager.h.

KateIndentScript* KateScriptManager::indentationScriptByIndex ( int  index) [inline]

Definition at line 115 of file katescriptmanager.h.

int KateScriptManager::indentationScriptCount ( ) [inline]

Definition at line 114 of file katescriptmanager.h.

KateIndentScript * KateScriptManager::indenter ( const QString &  language)

Get an indentation script for the given language -- if there is more than one result, this will return the script with the highest priority.

If both have the same priority, an arbitrary script will be returned. If no scripts are found, 0 is returned.

Definition at line 57 of file katescriptmanager.cpp.

bool KateScriptManager::parseMetaInformation ( const QString &  url,
QHash< QString, QString > &  pairs 
) [static]

Extract the meta data from the script at url and put in pairs.

Returns true if metadata was found and extracted successfuly, false otherwise.

Definition at line 265 of file katescriptmanager.cpp.

KTextEditor::TemplateScript * KateScriptManager::registerTemplateScript ( QObject *  owner,
const QString &  script 
)

managing of scripts for the template handler.

The scripts are given as string content, not as files

Definition at line 369 of file katescriptmanager.cpp.

void KateScriptManager::reload ( )

explicitly reload all scripts

Definition at line 315 of file katescriptmanager.cpp.

void KateScriptManager::reloaded ( ) [signal]

this signal is emitted when all scripts are _deleted_ and reloaded again.

void KateScriptManager::slotTemplateScriptOwnerDestroyed ( QObject *  owner) [slot]

Definition at line 391 of file katescriptmanager.cpp.

KateTemplateScript * KateScriptManager::templateScript ( KTextEditor::TemplateScript *  templateScript)

Definition at line 401 of file katescriptmanager.cpp.

void KateScriptManager::unregisterTemplateScript ( KTextEditor::TemplateScript *  templateScript)

unregister a given script

Definition at line 380 of file katescriptmanager.cpp.


The documentation for this class was generated from the following files:
  • katescriptmanager.h
  • katescriptmanager.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
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.7.3
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