.TH "KScriptManager" 3 "28 Jan 2004" "interfaces Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KScriptManager \- This class is the base for all script engines.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <scriptmanager.h>\fP
.PP
Inherits \fBQObject\fP, and \fBKScriptClientInterface\fP.
.PP
.SS "Public Slots"

.in +1c
.ti -1c
.RI "void \fBrunScript\fP (const  \fBQString\fP &scriptName, \fBQObject\fP *context=0, const  \fBQVariant\fP &arg=0)"
.br
.RI "\fIRun the selected script. \fP"
.in -1c
.SS "Signals"

.in +1c
.ti -1c
.RI "void \fBscriptError\fP (const  \fBQString\fP &msg)"
.br
.RI "\fISend out a signal of the error message from the current running script. \fP"
.ti -1c
.RI "void \fBscriptWarning\fP (const  \fBQString\fP &msg)"
.br
.RI "\fISend out a signal of the warning message from the current running script. \fP"
.ti -1c
.RI "void \fBscriptOutput\fP (const  \fBQString\fP &msg)"
.br
.RI "\fISend out a signal of the output message from the current running script. \fP"
.ti -1c
.RI "void \fBscriptProgress\fP (int percent)"
.br
.RI "\fISend out a signal of the progress of the current running script. \fP"
.ti -1c
.RI "void \fBscriptDone\fP (KScriptClientInterface::Result result, const  \fBQVariant\fP &returned)"
.br
.RI "\fISend out a signal of the exit status of the script. \fP"
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKScriptManager\fP (\fBQObject\fP *\fBparent\fP, const  char *\fBname\fP)"
.br
.RI "\fICreate a new instance of the script engine. \fP"
.ti -1c
.RI "virtual \fB~KScriptManager\fP ()"
.br
.RI "\fIDestroy the current script engine. \fP"
.ti -1c
.RI "bool \fBaddScript\fP (const  \fBQString\fP &scriptDesktopFile)"
.br
.RI "\fIAdd a new script instance to the script engine. \fP"
.ti -1c
.RI "bool \fBremoveScript\fP (const  \fBQString\fP &scriptName)"
.br
.RI "\fIRemove a script instance from the script engine. \fP"
.ti -1c
.RI "\fBQStringList\fP \fBscripts\fP ()"
.br
.RI "\fIAccess the names of script instances from the script engine. \fP"
.ti -1c
.RI "void \fBclear\fP ()"
.br
.RI "\fIClear all script intstances in memory. \fP"
.ti -1c
.RI "void \fBerror\fP (const  \fBQString\fP &msg)"
.br
.RI "\fIThis function will allow the main application of any errors that have occured during processing of the script. \fP"
.ti -1c
.RI "void \fBwarning\fP (const  \fBQString\fP &msg)"
.br
.RI "\fIThis function will allow the main application of any warnings that have occured during the processing of the script. \fP"
.ti -1c
.RI "void \fBoutput\fP (const  \fBQString\fP &msg)"
.br
.RI "\fIThis function will allow the main application of any normal output that has occured during the processing of the script. \fP"
.ti -1c
.RI "void \fBprogress\fP (int percent)"
.br
.RI "\fIThis function will allow feedback to any progress bars in the main application as to how far along the script is. \fP"
.ti -1c
.RI "void \fBdone\fP (KScriptClientInterface::Result result, const  \fBQVariant\fP &returned)"
.br
.RI "\fIThis function will allow feedback on completion of the script. \fP"
.in -1c
.SS "Protected Attributes"

.in +1c
.ti -1c
.RI "\fBQDict\fP< ScriptInfo > \fBm_scripts\fP"
.br
.ti -1c
.RI "\fBQDict\fP< \fBKScriptInterface\fP > \fBm_scriptCache\fP"
.br
.ti -1c
.RI "\fBQString\fP \fBm_currentScript\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
This class is the base for all script engines. 

\fBAuthor:\fP
.RS 4
Ian Reinhart Geiser <geiseri@kde.org> 
.RE
.PP

.PP
Definition at line 37 of file scriptmanager.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KScriptManager::KScriptManager (\fBQObject\fP * parent, const char * name)"
.PP
Create a new instance of the script engine. Definition at line 28 of file scriptmanager.cpp.
.PP
References KStdAccel::name().
.SS "KScriptManager::~\fBKScriptManager\fP ()\fC [virtual]\fP"
.PP
Destroy the current script engine. Definition at line 33 of file scriptmanager.cpp.
.PP
References QDict< KScriptInterface >::setAutoDelete(), and QDict< ScriptInfo >::setAutoDelete().
.SH "Member Function Documentation"
.PP 
.SS "bool KScriptManager::addScript (const \fBQString\fP & scriptDesktopFile)"
.PP
Add a new script instance to the script engine. This should be the full name and path to the desktop file.Definition at line 39 of file scriptmanager.cpp.
.PP
References QDict< ScriptInfo >::insert(), KDesktopFile::isDesktopFile(), locate(), KConfigBase::readEntry(), KDesktopFile::readName(), and KDesktopFile::readType().
.SS "bool KScriptManager::removeScript (const \fBQString\fP & scriptName)"
.PP
Remove a script instance from the script engine. \fBReturns:\fP
.RS 4
the success of the operation.
.RE
.PP
Definition at line 61 of file scriptmanager.cpp.
.PP
References QDict< ScriptInfo >::remove(), and QDict< KScriptInterface >::remove().
.SS "\fBQStringList\fP KScriptManager::scripts ()"
.PP
Access the names of script instances from the script engine. \fBReturns:\fP
.RS 4
a \fBQStringList\fP of the current scripts.
.RE
.PP
Definition at line 67 of file scriptmanager.cpp.
.PP
References QDictIterator::current(), and QDictIterator::currentKey().
.SS "void KScriptManager::clear ()"
.PP
Clear all script intstances in memory. Definition at line 79 of file scriptmanager.cpp.
.PP
References QDict< ScriptInfo >::clear(), and QDict< KScriptInterface >::clear().
.SS "void KScriptManager::error (const \fBQString\fP & msg)\fC [inline, virtual]\fP"
.PP
This function will allow the main application of any errors that have occured during processing of the script. Implements \fBKScriptClientInterface\fP.
.PP
Definition at line 74 of file scriptmanager.h.
.PP
References scriptError().
.SS "void KScriptManager::warning (const \fBQString\fP & msg)\fC [inline, virtual]\fP"
.PP
This function will allow the main application of any warnings that have occured during the processing of the script. Implements \fBKScriptClientInterface\fP.
.PP
Definition at line 79 of file scriptmanager.h.
.PP
References scriptWarning().
.SS "void KScriptManager::output (const \fBQString\fP & msg)\fC [inline, virtual]\fP"
.PP
This function will allow the main application of any normal output that has occured during the processing of the script. Implements \fBKScriptClientInterface\fP.
.PP
Definition at line 84 of file scriptmanager.h.
.PP
References scriptOutput().
.SS "void KScriptManager::progress (int percent)\fC [inline, virtual]\fP"
.PP
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.Implements \fBKScriptClientInterface\fP.
.PP
Definition at line 91 of file scriptmanager.h.
.PP
References scriptProgress().
.SS "void KScriptManager::done (KScriptClientInterface::Result result, const \fBQVariant\fP & returned)\fC [inline, virtual]\fP"
.PP
This function will allow feedback on completion of the script. It turns the result as a \fBKScriptInteface::Result\fP, and a return value as a \fBQVariant\fPImplements \fBKScriptClientInterface\fP.
.PP
Definition at line 97 of file scriptmanager.h.
.PP
References scriptDone().
.SS "void KScriptManager::runScript (const \fBQString\fP & scriptName, \fBQObject\fP * context = 0, const \fBQVariant\fP & arg = 0)\fC [slot]\fP"
.PP
Run the selected script. Definition at line 84 of file scriptmanager.cpp.
.PP
References QDict< KScriptInterface >::insert(), QDict< KScriptInterface >::remove(), and KMessageBox::sorry().
.SS "void KScriptManager::scriptError (const \fBQString\fP & msg)\fC [signal]\fP"
.PP
Send out a signal of the error message from the current running script. Referenced by error().
.SS "void KScriptManager::scriptWarning (const \fBQString\fP & msg)\fC [signal]\fP"
.PP
Send out a signal of the warning message from the current running script. Referenced by warning().
.SS "void KScriptManager::scriptOutput (const \fBQString\fP & msg)\fC [signal]\fP"
.PP
Send out a signal of the output message from the current running script. Referenced by output().
.SS "void KScriptManager::scriptProgress (int percent)\fC [signal]\fP"
.PP
Send out a signal of the progress of the current running script. Referenced by progress().
.SS "void KScriptManager::scriptDone (KScriptClientInterface::Result result, const \fBQVariant\fP & returned)\fC [signal]\fP"
.PP
Send out a signal of the exit status of the script. Referenced by done().

.SH "Author"
.PP 
Generated automatically by Doxygen for interfaces Library from the source code.
