#include <action.h>
Public Types | |
| typedef TQMap< TQString, TDESharedPtr< Action > > | Map |
Public Slots | |
| virtual void | activate (TDESharedPtr< Context > context)=0 |
Public Member Functions | |
| Action (const TQString &name, const TQString &text=TQString()) | |
| virtual | ~Action () |
| virtual const TQString | toString () const |
| const TQString | name () const |
| void | setName (const TQString &name) |
| const TQString | text () const |
| void | setText (const TQString &text) |
| const TQString | comment () const |
| void | setComment (const TQString &comment) |
| bool | hasVariable (const TQString &name) const |
| TDESharedPtr< Variable > | variable (const TQString &name) const |
| Variable::Map | variables () const |
| TQStringList | variableNames () const |
| void | setVariable (TDESharedPtr< Variable > variable) |
| void | setVariable (const TQString &name, const TQString &text, const TQVariant &variant) |
| void | removeVariable (const TQString &name) |
| virtual bool | notifyUpdated (const TDESharedPtr< MacroItem > ¯oitem, const TQString &name) |
Detailed Description
The Action class extendes TDEAction to implement some additional functionality TDEAction doesn't provide.
Member Typedef Documentation
◆ Map
| typedef TQMap<TQString, TDESharedPtr<Action> > KoMacro::Action::Map |
Constructor & Destructor Documentation
◆ Action()
|
explicit |
Constructor.
Definition at line 69 of file action.cpp.
◆ ~Action()
|
virtual |
Destructor.
Definition at line 82 of file action.cpp.
Member Function Documentation
◆ activate
|
pure virtualslot |
Called if the Action should be executed within the defined context .
◆ comment()
| const TQString Action::comment | ( | ) | const |
- Returns
- the comment associated with this action.
Definition at line 115 of file action.cpp.
◆ hasVariable()
| bool Action::hasVariable | ( | const TQString & | name | ) | const |
- Returns
- true if there exists a variable with the name
nameelse false is returned.
Definition at line 125 of file action.cpp.
◆ name()
| const TQString Action::name | ( | ) | const |
The name this Action has.
Definition at line 95 of file action.cpp.
◆ notifyUpdated()
|
inlinevirtual |
This function is called, when the KoMacro::Variable with name name used within the KoMacro::MacroItem macroitem got changed.
- Parameters
-
macroitem The KoMacro::MacroItem instance where the variable defined with nameis located in.name The name the KoMacro::Variable has.
- Returns
- true if the update was successfully else false is returned.
◆ removeVariable()
| void Action::removeVariable | ( | const TQString & | name | ) |
Remove the variable defined with name .
If there exists no such variable, nothing is done.
Definition at line 162 of file action.cpp.
◆ setComment()
| void Action::setComment | ( | const TQString & | comment | ) |
Set the comment associated with this action.
Definition at line 120 of file action.cpp.
◆ setName()
| void Action::setName | ( | const TQString & | name | ) |
Set the name of the Action to name .
Definition at line 100 of file action.cpp.
◆ setText()
| void Action::setText | ( | const TQString & | text | ) |
Set the i18n-caption text this Action has.
Definition at line 110 of file action.cpp.
◆ setVariable() [1/2]
| void Action::setVariable | ( | const TQString & | name, |
| const TQString & | text, | ||
| const TQVariant & | variant ) |
Set the variable.
- Parameters
-
name The name the variable should have. text The i18n-caption used for display. variant The TQVariant value.
Definition at line 154 of file action.cpp.
◆ setVariable() [2/2]
| void Action::setVariable | ( | TDESharedPtr< Variable > | variable | ) |
Append the Variable variable to list of variables this Action provides.
Definition at line 145 of file action.cpp.
◆ text()
| const TQString Action::text | ( | ) | const |
- Returns
- the i18n-caption text this Action has.
Definition at line 105 of file action.cpp.
◆ toString()
|
virtual |
- Returns
- a string representation of the functionality this action provides.
Definition at line 90 of file action.cpp.
◆ variable()
| TDESharedPtr< Variable > Action::variable | ( | const TQString & | name | ) | const |
- Returns
- the variable Variable defined for the name
name. If there exists no Variable with such a name, NULL is returned.
Definition at line 130 of file action.cpp.
◆ variableNames()
| TQStringList Action::variableNames | ( | ) | const |
- Returns
- a list of variablenames this Action provides.s
Definition at line 140 of file action.cpp.
◆ variables()
| Variable::Map Action::variables | ( | ) | const |
- Returns
- the map of variables this Action provides.
Definition at line 135 of file action.cpp.
The documentation for this class was generated from the following files:
