• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • interfaces
 

interfaces

Public Slots | Signals | Public Member Functions | Protected Attributes | Friends | List of all members
KScriptManager Class Reference

#include <scriptmanager.h>

Inheritance diagram for KScriptManager:
KScriptClientInterface

Public Slots

void runScript (const TQString &scriptName, TQObject *context=0, const TQVariant &arg=0)
 

Signals

void scriptError (const TQString &msg)
 
void scriptWarning (const TQString &msg)
 
void scriptOutput (const TQString &msg)
 
void scriptProgress (int percent)
 
void scriptDone (KScriptClientInterface::Result result, const TQVariant &returned)
 

Public Member Functions

 KScriptManager (TQObject *parent, const char *name)
 
virtual ~KScriptManager ()
 
bool addScript (const TQString &scriptDesktopFile)
 
bool removeScript (const TQString &scriptName)
 
TQStringList scripts ()
 
void clear ()
 
void error (const TQString &msg)
 
void warning (const TQString &msg)
 
void output (const TQString &msg)
 
void progress (int percent)
 
void done (KScriptClientInterface::Result result, const TQVariant &returned)
 
virtual void error (const TQString &msg)=0
 
virtual void warning (const TQString &msg)=0
 
virtual void output (const TQString &msg)=0
 
virtual void progress (int percent)=0
 
virtual void done (KScriptClientInterface::Result result, const TQVariant &returned)=0
 

Protected Attributes

TQDict< ScriptInfo > m_scripts
 
TQDict< KScriptInterface > m_scriptCache
 
TQString m_currentScript
 

Friends

class KScriptInterface
 

Additional Inherited Members

- Public Types inherited from KScriptClientInterface
enum  Result { ResultSuccess , ResultFailure , ResultContinue , ResultBreak }
 

Detailed Description

This class is the base for all script engines.

Author
Ian Reinhart Geiser geise.nosp@m.ri@k.nosp@m.de.or.nosp@m.g

Definition at line 39 of file scriptmanager.h.

Constructor & Destructor Documentation

◆ KScriptManager()

KScriptManager::KScriptManager ( TQObject *  parent,
const char *  name 
)

Create a new instance of the script engine.

Definition at line 28 of file scriptmanager.cpp.

◆ ~KScriptManager()

KScriptManager::~KScriptManager ( )
virtual

Destroy the current script engine.

Definition at line 33 of file scriptmanager.cpp.

Member Function Documentation

◆ addScript()

bool KScriptManager::addScript ( const TQString &  scriptDesktopFile)

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.

◆ clear()

void KScriptManager::clear ( )

Clear all script intstances in memory.

Definition at line 79 of file scriptmanager.cpp.

◆ done()

void KScriptManager::done ( KScriptClientInterface::Result  result,
const TQVariant &  returned 
)
inlinevirtual

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

Implements KScriptClientInterface.

Definition at line 99 of file scriptmanager.h.

◆ error()

void KScriptManager::error ( const TQString &  msg)
inlinevirtual

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

Implements KScriptClientInterface.

Definition at line 76 of file scriptmanager.h.

◆ output()

void KScriptManager::output ( const TQString &  msg)
inlinevirtual

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

Implements KScriptClientInterface.

Definition at line 86 of file scriptmanager.h.

◆ progress()

void KScriptManager::progress ( int  percent)
inlinevirtual

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

Definition at line 93 of file scriptmanager.h.

◆ removeScript()

bool KScriptManager::removeScript ( const TQString &  scriptName)

Remove a script instance from the script engine.

Returns
the success of the operation.

Definition at line 61 of file scriptmanager.cpp.

◆ runScript

void KScriptManager::runScript ( const TQString &  scriptName,
TQObject *  context = 0,
const TQVariant &  arg = 0 
)
slot

Run the selected script.

Definition at line 84 of file scriptmanager.cpp.

◆ scriptDone

void KScriptManager::scriptDone ( KScriptClientInterface::Result  result,
const TQVariant &  returned 
)
signal

Send out a signal of the exit status of the script.

◆ scriptError

void KScriptManager::scriptError ( const TQString &  msg)
signal

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

◆ scriptOutput

void KScriptManager::scriptOutput ( const TQString &  msg)
signal

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

◆ scriptProgress

void KScriptManager::scriptProgress ( int  percent)
signal

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

◆ scripts()

TQStringList KScriptManager::scripts ( )

Access the names of script instances from the script engine.

Returns
a TQStringList of the current scripts.

Definition at line 67 of file scriptmanager.cpp.

◆ scriptWarning

void KScriptManager::scriptWarning ( const TQString &  msg)
signal

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

◆ warning()

void KScriptManager::warning ( const TQString &  msg)
inlinevirtual

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

Implements KScriptClientInterface.

Definition at line 81 of file scriptmanager.h.

Friends And Related Function Documentation

◆ KScriptInterface

friend class KScriptInterface
friend

Definition at line 42 of file scriptmanager.h.

Member Data Documentation

◆ m_currentScript

TQString KScriptManager::m_currentScript
protected

Definition at line 136 of file scriptmanager.h.

◆ m_scriptCache

TQDict<KScriptInterface> KScriptManager::m_scriptCache
protected

Definition at line 134 of file scriptmanager.h.

◆ m_scripts

TQDict<ScriptInfo> KScriptManager::m_scripts
protected

Definition at line 133 of file scriptmanager.h.


The documentation for this class was generated from the following files:
  • scriptmanager.h
  • scriptmanager.cpp

interfaces

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

interfaces

Skip menu "interfaces"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for interfaces by doxygen 1.9.4
This website is maintained by Timothy Pearson.