.TH "KScriptManager" kde3 "11 Jun 2005" "Version Version 3.4.1" "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
.in -1c
.SS "Signals"

.in +1c
.ti -1c
.RI "void \fBscriptError\fP (const \fBQString\fP &msg)"
.br
.ti -1c
.RI "void \fBscriptWarning\fP (const \fBQString\fP &msg)"
.br
.ti -1c
.RI "void \fBscriptOutput\fP (const \fBQString\fP &msg)"
.br
.ti -1c
.RI "void \fBscriptProgress\fP (int percent)"
.br
.ti -1c
.RI "void \fBscriptDone\fP (KScriptClientInterface::Result result, const \fBQVariant\fP &returned)"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKScriptManager\fP (\fBQObject\fP *\fBparent\fP, const char *\fBname\fP)"
.br
.ti -1c
.RI "virtual \fB~KScriptManager\fP ()"
.br
.ti -1c
.RI "bool \fBaddScript\fP (const \fBQString\fP &scriptDesktopFile)"
.br
.ti -1c
.RI "bool \fBremoveScript\fP (const \fBQString\fP &scriptName)"
.br
.ti -1c
.RI "\fBQStringList\fP \fBscripts\fP ()"
.br
.ti -1c
.RI "void \fBclear\fP ()"
.br
.ti -1c
.RI "void \fBerror\fP (const \fBQString\fP &msg)"
.br
.ti -1c
.RI "void \fBwarning\fP (const \fBQString\fP &msg)"
.br
.ti -1c
.RI "void \fBoutput\fP (const \fBQString\fP &msg)"
.br
.ti -1c
.RI "void \fBprogress\fP (int percent)"
.br
.ti -1c
.RI "void \fBdone\fP (KScriptClientInterface::Result result, const \fBQVariant\fP &returned)"
.br
.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
.SS "Friends"

.in +1c
.ti -1c
.RI "class \fBKScriptInterface\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 39 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. 
.PP

.PP
Definition at line 28 of file scriptmanager.cpp.
.SS "KScriptManager::~\fBKScriptManager\fP ()\fC [virtual]\fP"
.PP
Destroy the current script engine. 
.PP

.PP
Definition at line 33 of file scriptmanager.cpp.
.PP
References QDict::setAutoDelete().
.SH "Member Function Documentation"
.PP 
.SS "bool KScriptManager::addScript (const \fBQString\fP & scriptDesktopFile)"
.PP
Add a new script instance to the script engine. 
.PP
This should be the full name and path to the desktop file.
.PP
Definition at line 39 of file scriptmanager.cpp.
.PP
References QDict::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. 
.PP
\fBReturns:\fP
.RS 4
the success of the operation.
.RE
.PP

.PP
Definition at line 61 of file scriptmanager.cpp.
.PP
References QDict::remove().
.SS "\fBQStringList\fP KScriptManager::scripts ()"
.PP
Access the names of script instances from the script engine. 
.PP
\fBReturns:\fP
.RS 4
a \fBQStringList\fP of the current scripts.
.RE
.PP

.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. 
.PP
Definition at line 79 of file scriptmanager.cpp.
.PP
References QDict::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 occurred during processing of the script. 
.PP

.PP
Implements \fBKScriptClientInterface\fP.
.PP
Definition at line 76 of file scriptmanager.h.
.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 occurred during the processing of the script. 
.PP

.PP
Implements \fBKScriptClientInterface\fP.
.PP
Definition at line 81 of file scriptmanager.h.
.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 occurred during the processing of the script. 
.PP

.PP
Implements \fBKScriptClientInterface\fP.
.PP
Definition at line 86 of file scriptmanager.h.
.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. 
.PP
This is very useful when a script is processing files or doing some long operation that is of a known duration.
.PP
Implements \fBKScriptClientInterface\fP.
.PP
Definition at line 93 of file scriptmanager.h.
.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. 
.PP
It turns the result as a KScriptInteface::Result, and a return value as a \fBQVariant\fP
.PP
Implements \fBKScriptClientInterface\fP.
.PP
Definition at line 99 of file scriptmanager.h.
.SS "void KScriptManager::runScript (const \fBQString\fP & scriptName, \fBQObject\fP * context = \fC0\fP, const \fBQVariant\fP & arg = \fC0\fP)\fC [slot]\fP"
.PP
Run the selected script. 
.PP
Definition at line 84 of file scriptmanager.cpp.
.PP
References endl(), QDict::insert(), kdDebug(), QDict::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. 
.PP

.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. 
.PP

.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. 
.PP

.SS "void KScriptManager::scriptProgress (int percent)\fC [signal]\fP"
.PP
Send out a signal of the progress of the current running script. 
.PP

.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. 
.PP


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