class KScriptManager

This class is the base for all script engines. More...

Definition#include <scriptmanager.h>
InheritsKScriptClientInterface [public ], QObject (qt) [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Public Slots

Signals

Protected Members


Detailed Description

This class is the base for all script engines.

 KScriptManager (QObject *parent, const char *name)

KScriptManager

Create a new instance of the script engine.

 ~KScriptManager ()

~KScriptManager

[virtual]

Destroy the current script engine.

bool  addScript ( const QString &scriptDesktopFile)

addScript

Add a new script instance to the script engine. This should be the full name and path to the desktop file.

bool  removeScript ( const QString &scriptName )

removeScript

Remove a script instance from the script engine.

Returns: the success of the operation.

QStringList  scripts ()

scripts

Access the names of script instances from the script engine.

Returns: a QStringList of the current scripts.

void  clear ()

clear

Clear all script intstances in memory

void  error ( const QString &msg )

error

This function will allow the main application of any errors that have occured during processing of the script.

Reimplemented from KScriptClientInterface.

void  warning ( const QString &msg )

warning

This function will allow the main application of any warnings that have occured during the processing of the script.

Reimplemented from KScriptClientInterface.

void  output ( const QString &msg )

output

This function will allow the main application of any normal output that has occured during the processing of the script.

Reimplemented from KScriptClientInterface.

void  progress ( int percent )

progress

This function will allow feedback to any progress bars in the main application as to how far along the script is. This is very useful when a script is processing files or doing some long operation that is of a known duration.

Reimplemented from KScriptClientInterface.

void  done ( KScriptClientInterface::Result result, const QVariant &returned )

done

This function will allow feedback on completion of the script. It turns the result as a KScriptInteface::Result, and a return value as a QVariant

Reimplemented from KScriptClientInterface.

void  runScript ( const QString &scriptName, QObject *context = 0, const QVariant &arg = 0 )

runScript

[slot]

Run the selected script

void  scriptError ( const QString &msg )

scriptError

[signal]

Send out a signal of the error message from the current running script.

void  scriptWarning ( const QString &msg )

scriptWarning

[signal]

Send out a signal of the warning message from the current running script.

void  scriptOutput ( const QString &msg )

scriptOutput

[signal]

Send out a signal of the output message from the current running script.

void  scriptProgress ( int percent)

scriptProgress

[signal]

Send out a signal of the progress of the current running script.

void  scriptDone ( KScriptClientInterface::Result result, const QVariant &returned)

scriptDone

[signal]

Send out a signal of the exit status of the script

QDict<ScriptInfo> m_scripts

m_scripts

[protected]

QDict<KScriptInterface> m_scriptCache

m_scriptCache

[protected]

QString m_currentScript

m_currentScript

[protected]