#include <scriptaction.h>
Public Types | |
| typedef TDESharedPtr< ScriptAction > | Ptr |
Public Types inherited from TDEAction | |
| enum | ActivationReason |
Public Types inherited from Kross::Api::ScriptContainer | |
| typedef TDESharedPtr< ScriptContainer > | Ptr |
Public Types inherited from Kross::Api::MainModule | |
| typedef TDESharedPtr< MainModule > | Ptr |
Public Types inherited from Kross::Api::Module | |
| typedef TDESharedPtr< Module > | Ptr |
Public Types inherited from Kross::Api::Class< Module > | |
| typedef TDESharedPtr< Module > | Ptr |
Public Types inherited from Kross::Api::Callable | |
| typedef TDESharedPtr< Callable > | Ptr |
Public Types inherited from Kross::Api::Object | |
| typedef TDESharedPtr< Object > | Ptr |
Public Slots | |
| virtual void | activate () |
| void | finalize () |
Public Slots inherited from TDEAction | |
| virtual void | setText (const TQString &text) |
| virtual bool | setShortcut (const TDEShortcut &) |
| virtual void | setWhatsThis (const TQString &text) |
| virtual void | setToolTip (const TQString &) |
| virtual void | setIconSet (const TQIconSet &iconSet) |
| virtual void | setEnabled (bool enable) |
| void | setDisabled (bool disable) |
| virtual void | setShortcutConfigurable (bool) |
| virtual void | activate () |
Signals | |
| void | activated (const Kross::Api::ScriptAction *) |
| void | success () |
| void | failed (const TQString &errormessage, const TQString &tracedetails) |
Signals inherited from TDEAction | |
| void | activated () |
| void | activated (TDEAction::ActivationReason reason, TQt::ButtonState state) |
Public Member Functions | |
| ScriptAction (const TQString &file) | |
| ScriptAction (const TQString &scriptconfigfile, const TQDomElement &element) | |
| virtual | ~ScriptAction () |
| int | version () const |
| const TQString | getDescription () const |
| void | setDescription (const TQString &description) |
| void | setInterpreterName (const TQString &name) |
| const TQString | getPackagePath () const |
| const TQStringList & | getLogs () const |
| void | attach (ScriptActionCollection *collection) |
| void | detach (ScriptActionCollection *collection) |
| void | detachAll () |
Public Member Functions inherited from TDEAction | |
| TDEAction (const TQString &text, const TDEShortcut &cut, const TQObject *receiver, const char *slot, TDEActionCollection *parent, const char *name) | |
| TDEAction (const TQString &text, const TQIconSet &pix, const TDEShortcut &cut, const TQObject *receiver, const char *slot, TDEActionCollection *parent, const char *name) | |
| TDEAction (const TQString &text, const TQString &pix, const TDEShortcut &cut, const TQObject *receiver, const char *slot, TDEActionCollection *parent, const char *name) | |
| TDEAction (const KGuiItem &item, const TDEShortcut &cut, const TQObject *receiver, const char *slot, TDEActionCollection *parent, const char *name) | |
| TDEAction (const TQString &text, const TDEShortcut &cut=TDEShortcut(), TQObject *parent=0, const char *name=0) | |
| TDEAction (const TQString &text, const TDEShortcut &cut, const TQObject *receiver, const char *slot, TQObject *parent, const char *name=0) | |
| TDEAction (const TQString &text, const TQIconSet &pix, const TDEShortcut &cut=TDEShortcut(), TQObject *parent=0, const char *name=0) | |
| TDEAction (const TQString &text, const TQString &pix, const TDEShortcut &cut=TDEShortcut(), TQObject *parent=0, const char *name=0) | |
| TDEAction (const TQString &text, const TQIconSet &pix, const TDEShortcut &cut, const TQObject *receiver, const char *slot, TQObject *parent, const char *name=0) | |
| TDEAction (const TQString &text, const TQString &pix, const TDEShortcut &cut, const TQObject *receiver, const char *slot, TQObject *parent, const char *name=0) | |
| TDEAction (TQObject *parent=0, const char *name=0) | |
| virtual int | plug (TQWidget *widget, int index=-1) |
| virtual void | plugAccel (TDEAccel *accel, bool configurable=true) TDE_DEPRECATED |
| virtual void | unplug (TQWidget *w) |
| virtual void | unplugAccel () TDE_DEPRECATED |
| virtual bool | isPlugged () const |
| bool | isPlugged (const TQWidget *container) const |
| virtual bool | isPlugged (const TQWidget *container, int id) const |
| virtual bool | isPlugged (const TQWidget *container, const TQWidget *_representative) const |
| uint | tdeaccelCount () const |
| virtual TQString | text () const |
| virtual const TDEShortcut & | shortcut () const |
| virtual const TDEShortcut & | shortcutDefault () const |
| virtual bool | isEnabled () const |
| virtual bool | isShortcutConfigurable () const |
| virtual TQString | whatsThis () const |
| virtual TQString | toolTip () const |
| virtual TQIconSet | iconSet (TDEIcon::Group group, int size=0) const |
| TQIconSet | iconSet () const |
| int | accel () const TDE_DEPRECATED |
| void | setAccel (int key) TDE_DEPRECATED |
| void | setStatusText (const TQString &text) |
| int | menuId (int i) |
Public Member Functions inherited from Kross::Api::ScriptContainer | |
| virtual | ~ScriptContainer () |
| const TQString | getName () const |
| void | setName (const TQString &name) |
| TQString | getCode () const |
| void | setCode (const TQString &code) |
| TQString | getInterpreterName () const |
| void | setInterpreterName (const TQString &interpretername) |
| TQString | getFile () const |
| void | setFile (const TQString &scriptfile) |
| TQStringVariantMap & | getOptions () |
| TQVariant | getOption (const TQString name, TQVariant defaultvalue=TQVariant(), bool recursive=false) |
| bool | setOption (const TQString name, const TQVariant &value) |
| Object::Ptr | execute () |
| const TQStringList | getFunctionNames () |
| TDESharedPtr< Object > | callFunction (const TQString &functionname, TDESharedPtr< List > arguments=0) |
| TQStringList | getClassNames () |
| TDESharedPtr< Object > | classInstance (const TQString &classname) |
| bool | initialize () |
| void | finalize () |
Public Member Functions inherited from Kross::Api::MainModule | |
| MainModule (const TQString &name) | |
| virtual | ~MainModule () |
| virtual const TQString | getClassName () const |
| bool | hadException () |
| Exception::Ptr | getException () |
| void | setException (Exception::Ptr exception) |
| EventSignal::Ptr | addSignal (const TQString &name, TQObject *sender, TQCString signal) |
| EventSlot::Ptr | addSlot (const TQString &name, TQObject *receiver, TQCString slot) |
| QtObject::Ptr | addTQObject (TQObject *object, const TQString &name=TQString()) |
| EventAction::Ptr | addTDEAction (TDEAction *action, const TQString &name=TQString()) |
Public Member Functions inherited from Kross::Api::Module | |
| Module (const TQString &name) | |
| virtual | ~Module () |
| virtual Kross::Api::Object::Ptr | get (const TQString &, void *=0) |
Public Member Functions inherited from Kross::Api::Class< Module > | |
| Class (const TQString &name) | |
| virtual | ~Class () |
| operator Module * () | |
Public Member Functions inherited from Kross::Api::Event< T > | |
| Event (const TQString &name) | |
| virtual | ~Event () |
| void | addFunction (const TQString &name, FunctionPtr function) |
| void | addFunction (const TQString &name, Function *function) |
| template<class RETURNOBJ , class ARG1OBJ , class ARG2OBJ , class ARG3OBJ , class ARG4OBJ , class INSTANCE , typename METHOD > | |
| void | addFunction4 (const TQString &name, INSTANCE *instance, METHOD method, ARG1OBJ *arg1=0, ARG2OBJ *arg2=0, ARG3OBJ *arg3=0, ARG4OBJ *arg4=0) |
| template<class RETURNOBJ , class ARG1OBJ , class ARG2OBJ , class ARG3OBJ , class INSTANCE , typename METHOD > | |
| void | addFunction3 (const TQString &name, INSTANCE *instance, METHOD method, ARG1OBJ *arg1=0, ARG2OBJ *arg2=0, ARG3OBJ *arg3=0) |
| template<class RETURNOBJ , class ARG1OBJ , class ARG2OBJ , class INSTANCE , typename METHOD > | |
| void | addFunction2 (const TQString &name, INSTANCE *instance, METHOD method, ARG1OBJ *arg1=0, ARG2OBJ *arg2=0) |
| template<class RETURNOBJ , class ARG1OBJ , class INSTANCE , typename METHOD > | |
| void | addFunction1 (const TQString &name, INSTANCE *instance, METHOD method, ARG1OBJ *arg1=0) |
| template<class RETURNOBJ , class INSTANCE , typename METHOD > | |
| void | addFunction0 (const TQString &name, INSTANCE *instance, METHOD method) |
| bool | isAFunction (const TQString &name) const |
| virtual Object::Ptr | call (const TQString &name, List::Ptr arguments) |
Public Member Functions inherited from Kross::Api::Callable | |
| Callable (const TQString &name) | |
| virtual | ~Callable () |
| const TQString | getName () const |
| bool | hasChild (const TQString &name) const |
| Object::Ptr | getChild (const TQString &name) const |
| TQMap< TQString, Object::Ptr > | getChildren () const |
| bool | addChild (const TQString &name, Object *object) |
| bool | addChild (Callable *object) |
| void | removeChild (const TQString &name) |
| void | removeAllChildren () |
Public Member Functions inherited from Kross::Api::Object | |
| Object () | |
| virtual | ~Object () |
| virtual const TQString | toString () |
| virtual Object::Ptr | call (const TQString &name, TDESharedPtr< List > arguments) |
| virtual TQStringList | getCalls () |
Additional Inherited Members | |
Static Public Member Functions inherited from TDEAction | |
| static int | getToolButtonID () |
Static Public Member Functions inherited from Kross::Api::Class< Module > | |
| static Object::Ptr | toObject (TYPE t) |
Static Public Member Functions inherited from Kross::Api::Object | |
| template<class T > | |
| static T * | fromObject (Object::Ptr object) |
| template<typename TYPE > | |
| static Object::Ptr | toObject (TYPE t) |
Protected Slots inherited from TDEAction | |
| void | slotPopupActivated () |
| void | slotButtonClicked (int, TQt::ButtonState state) |
Protected Member Functions inherited from TDEAction | |
| const KGuiItem & | guiItem () const |
Protected Member Functions inherited from Kross::Api::ScriptContainer | |
| ScriptContainer (const TQString &name=TQString()) | |
Detailed Description
A ScriptAction extends a TDEAction by providing a wrapper around a ScriptContainer to execute scripting code on activation.
Definition at line 39 of file scriptaction.h.
Member Typedef Documentation
◆ Ptr
| typedef TDESharedPtr<ScriptAction> Kross::Api::ScriptAction::Ptr |
The name of the interpreter used to execute the scripting code.
The scripting code which should be executed. The scriptfile which should be executed. The description for this ScriptAction . Shared pointer to implement reference-counting.
Definition at line 61 of file scriptaction.h.
Constructor & Destructor Documentation
◆ ScriptAction() [1/2]
|
explicit |
A list of ScriptAction instances.
Constructor.
- Parameters
-
file The KURL scriptfile this ScriptAction points to.
Definition at line 85 of file scriptaction.cpp.
◆ ScriptAction() [2/2]
|
explicit |
Constructor.
- Parameters
-
scriptconfigfile The XML-configurationfile the DOM-element was readed from. element The TQDomElement which will be used to setup the ScriptAction attributes.
Definition at line 104 of file scriptaction.cpp.
◆ ~ScriptAction()
|
virtual |
Destructor.
Definition at line 170 of file scriptaction.cpp.
Member Function Documentation
◆ activate
|
virtualslot |
If the ScriptAction got activated the ScriptContainer got executed.
Once this slot got executed it will emit a success() or failed() signal.
Definition at line 225 of file scriptaction.cpp.
◆ activated
|
signal |
This signal got emitted when this action is emitted before execution.
◆ attach()
| void ScriptAction::attach | ( | ScriptActionCollection * | collection | ) |
Attach this ScriptAction to the ScriptActionCollection collection .
Definition at line 209 of file scriptaction.cpp.
◆ detach()
| void ScriptAction::detach | ( | ScriptActionCollection * | collection | ) |
Detach this ScriptAction from the ScriptActionCollection collection .
Definition at line 214 of file scriptaction.cpp.
◆ detachAll()
| void ScriptAction::detachAll | ( | ) |
Detach this ScriptAction from all ScriptActionCollection instance his ScriptAction is attached to.
Definition at line 219 of file scriptaction.cpp.
◆ failed
|
signal |
This signal got emitted after the try to execute this ScriptAction failed.
The errormessage contains the error message.
◆ finalize
|
slot |
This slot finalizes the ScriptContainer and tries to clean any still running script.
Definition at line 242 of file scriptaction.cpp.
◆ getDescription()
| const TQString ScriptAction::getDescription | ( | ) | const |
- Returns
- the description for this ScriptAction has.
Definition at line 181 of file scriptaction.cpp.
◆ getLogs()
| const TQStringList & ScriptAction::getLogs | ( | ) | const |
- Returns
- a list of all kind of logs this ScriptAction does remember.
Definition at line 204 of file scriptaction.cpp.
◆ getPackagePath()
| const TQString ScriptAction::getPackagePath | ( | ) | const |
- Returns
- the path of the package this ScriptAction belongs to or TQString() if it doesn't belong to any package.
Definition at line 199 of file scriptaction.cpp.
◆ setDescription()
| void ScriptAction::setDescription | ( | const TQString & | description | ) |
Set the description description for this ScriptAction .
Definition at line 186 of file scriptaction.cpp.
◆ setInterpreterName()
| void ScriptAction::setInterpreterName | ( | const TQString & | name | ) |
Set the name of the interpreter which will be used on activation to execute the scripting code.
- Parameters
-
name The name of the Interpreter . This could be e.g. "python".
Definition at line 193 of file scriptaction.cpp.
◆ success
|
signal |
This signal got emitted after this ScriptAction got executed successfully.
◆ version()
| int ScriptAction::version | ( | ) | const |
- Returns
- the version this script has. Versions are used to be able to manage different versions of the same script. The version is 0 by default if not defined to something else in the rc-file.
Definition at line 176 of file scriptaction.cpp.
The documentation for this class was generated from the following files:

Public Types inherited from