#include <scriptguiclient.h>
Public Types | |
| typedef TQPtrList< TDEAction > | List |
Public Slots | |
| KURL | openScriptFile (const TQString &caption=TQString()) |
| bool | loadScriptFile () |
| bool | executeScriptFile () |
| bool | executeScriptFile (const TQString &file) |
| bool | executeScriptAction (ScriptAction::Ptr action) |
| void | showScriptManager () |
Signals | |
| void | collectionChanged (ScriptActionCollection *) |
| void | executionStarted (const Kross::Api::ScriptAction *) |
| void | executionFinished (const Kross::Api::ScriptAction *) |
Public Member Functions | |
| ScriptGUIClient (KXMLGUIClient *guiclient, TQWidget *parent=0) | |
| virtual | ~ScriptGUIClient () |
| bool | hasActionCollection (const TQString &name) |
| ScriptActionCollection * | getActionCollection (const TQString &name) |
| TQMap< TQString, ScriptActionCollection * > | getActionCollections () |
| void | addActionCollection (const TQString &name, ScriptActionCollection *collection) |
| bool | removeActionCollection (const TQString &name) |
| void | reloadInstalledScripts () |
| bool | installScriptPackage (const TQString &scriptpackagefile) |
| bool | uninstallScriptPackage (const TQString &scriptpackagepath) |
| bool | loadScriptConfigFile (const TQString &scriptconfigfile) |
| bool | loadScriptConfigDocument (const TQString &scriptconfigfile, const TQDomDocument &document) |
| virtual void | setXMLFile (const TQString &file, bool merge=false, bool setXMLDoc=true) |
| virtual void | setDOMDocument (const TQDomDocument &document, bool merge=false) |
Public Member Functions inherited from KXMLGUIClient | |
| KXMLGUIClient (KXMLGUIClient *parent) | |
| TDEAction * | action (const char *name) const |
| virtual TDEAction * | action (const TQDomElement &element) const |
| virtual TDEActionCollection * | actionCollection () const |
| virtual TDEInstance * | instance () const |
| virtual TQDomDocument | domDocument () const |
| virtual TQString | xmlFile () const |
| void | setXMLGUIBuildDocument (const TQDomDocument &doc) |
| TQDomDocument | xmlguiBuildDocument () const |
| void | setFactory (KXMLGUIFactory *factory) |
| KXMLGUIFactory * | factory () const |
| KXMLGUIClient * | parentClient () const |
| void | insertChildClient (KXMLGUIClient *child) |
| void | removeChildClient (KXMLGUIClient *child) |
| const TQPtrList< KXMLGUIClient > * | childClients () |
| void | setClientBuilder (KXMLGUIBuilder *builder) |
| KXMLGUIBuilder * | clientBuilder () const |
| void | reloadXML () |
| void | plugActionList (const TQString &name, const TQPtrList< TDEAction > &actionList) |
| void | unplugActionList (const TQString &name) |
| void | beginXMLPlug (TQWidget *) |
| void | endXMLPlug () |
| void | prepareXMLUnplug (TQWidget *) |
Additional Inherited Members | |
Protected Member Functions inherited from KXMLGUIClient | |
| virtual void | setInstance (TDEInstance *instance) |
| virtual void | setXML (const TQString &document, bool merge=false) |
| virtual void | conserveMemory () |
| virtual void | stateChanged (const TQString &newstate, ReverseStateChange reverse=StateNoReverse) |
Detailed Description
The ScriptGUIClient class provides abstract access to scripting code used to extend an applications functionality.
Definition at line 43 of file scriptguiclient.h.
Member Typedef Documentation
◆ List
| typedef TQPtrList<TDEAction> Kross::Api::ScriptGUIClient::List |
Definition at line 54 of file scriptguiclient.h.
Constructor & Destructor Documentation
◆ ScriptGUIClient()
|
explicit |
Constructor.
- Parameters
-
guiclient The KXMLGUIClient this ScriptGUIClient is a child of. parent The parent TQWidget. If defined TQt will handle freeing this ScriptGUIClient instance else the caller has to take care of freeing this instance if not needed any longer.
Definition at line 66 of file scriptguiclient.cpp.
◆ ~ScriptGUIClient()
|
virtual |
Destructor.
Definition at line 95 of file scriptguiclient.cpp.
Member Function Documentation
◆ addActionCollection()
| void ScriptGUIClient::addActionCollection | ( | const TQString & | name, |
| ScriptActionCollection * | collection | ||
| ) |
Add a new ScriptActionCollection with the name name to our map of actioncollections.
Definition at line 118 of file scriptguiclient.cpp.
◆ collectionChanged
|
signal |
Emitted if a ScriptActionCollection instances changed.
◆ executeScriptAction
|
slot |
This method executes the ScriptAction action .
Internaly we just call ScriptAction::activate and redirect the success/failed signals to our internal slots.
Definition at line 362 of file scriptguiclient.cpp.
◆ executeScriptFile [1/2]
|
slot |
A KFileDialog will be displayed to let the user choose the scriptfile that should be executed.
The executed ScriptAction will be added to the ScriptActionCollection of executed scripts.
Definition at line 346 of file scriptguiclient.cpp.
◆ executeScriptFile [2/2]
|
slot |
Execute the scriptfile file .
Internaly we try to use the defined filename to auto-detect the Interpreter which should be used for the execution.
Definition at line 354 of file scriptguiclient.cpp.
◆ executionFinished
|
signal |
This signal is emited when the execution of a script is finished.
◆ executionStarted
|
signal |
This signal is emited when the execution of a script is started.
◆ getActionCollection()
| ScriptActionCollection * ScriptGUIClient::getActionCollection | ( | const TQString & | name | ) |
- Returns
- the ScriptActionCollection which has the name
nameor NULL if there exists no such ScriptActionCollection .
Definition at line 108 of file scriptguiclient.cpp.
◆ getActionCollections()
| TQMap< TQString, ScriptActionCollection * > ScriptGUIClient::getActionCollections | ( | ) |
- Returns
- a map of all avaiable ScriptActionCollection instances this ScriptGUIClient knows about. Per default there are 2 collections avaiable;
- "installedscripts" The installed collection of scripts.
- "loadedscripts" The loaded scripts.
Definition at line 113 of file scriptguiclient.cpp.
◆ hasActionCollection()
| bool ScriptGUIClient::hasActionCollection | ( | const TQString & | name | ) |
- Returns
- true if this ScriptGUIClient has a ScriptActionCollection with the name
nameelse false is returned.
Definition at line 103 of file scriptguiclient.cpp.
◆ installScriptPackage()
| bool ScriptGUIClient::installScriptPackage | ( | const TQString & | scriptpackagefile | ) |
Install the packagefile scriptpackagefile .
Those packagefile should be a tar.gz-archive which will be extracted and to the users script-directory.
Definition at line 148 of file scriptguiclient.cpp.
◆ loadScriptConfigDocument()
| bool ScriptGUIClient::loadScriptConfigDocument | ( | const TQString & | scriptconfigfile, |
| const TQDomDocument & | document | ||
| ) |
Load the document DOM-document from the scriptpackage's XML-configfile scriptconfigfile and add the defined ScriptAction instances to the list of installed scripts.
Definition at line 218 of file scriptguiclient.cpp.
◆ loadScriptConfigFile()
| bool ScriptGUIClient::loadScriptConfigFile | ( | const TQString & | scriptconfigfile | ) |
Load the scriptpackage's configurationfile scriptconfigfile and add the defined ScriptAction instances to the list of installed scripts.
Definition at line 198 of file scriptguiclient.cpp.
◆ loadScriptFile
|
slot |
A KFileDialog will be displayed to let the user choose a scriptfile that should be loaded.
Those loaded ScriptAction will be added to the ScriptActionCollection of loaded scripts.
Definition at line 325 of file scriptguiclient.cpp.
◆ openScriptFile
|
slot |
A KFileDialog will be displayed to let the user choose a scriptfile.
The choosen file will be returned as KURL.
Definition at line 304 of file scriptguiclient.cpp.
◆ reloadInstalledScripts()
| void ScriptGUIClient::reloadInstalledScripts | ( | ) |
Reload the list of installed scripts.
Definition at line 135 of file scriptguiclient.cpp.
◆ removeActionCollection()
| bool ScriptGUIClient::removeActionCollection | ( | const TQString & | name | ) |
Remove the ScriptActionCollection defined with name name.
Definition at line 124 of file scriptguiclient.cpp.
◆ setDOMDocument()
|
virtual |
KXMLGUIClient overloaded method to set the XML DOM-document.
Reimplemented from KXMLGUIClient.
Definition at line 268 of file scriptguiclient.cpp.
◆ setXMLFile()
|
virtual |
KXMLGUIClient overloaded method to set the XML file.
Reimplemented from KXMLGUIClient.
Definition at line 263 of file scriptguiclient.cpp.
◆ showScriptManager
|
slot |
The ScriptManagerGUI dialog will be displayed to let the user manage the scriptfiles.
Definition at line 375 of file scriptguiclient.cpp.
◆ uninstallScriptPackage()
| bool ScriptGUIClient::uninstallScriptPackage | ( | const TQString & | scriptpackagepath | ) |
Uninstall the scriptpackage located in the path scriptpackagepath .
This just deletes the whole directory.
Definition at line 188 of file scriptguiclient.cpp.
The documentation for this class was generated from the following files:

Public Member Functions inherited from