#include <macroitem.h>
Public Types | |
| typedef TQValueList< TDESharedPtr< MacroItem > > | List |
Public Member Functions | |
| MacroItem () | |
| ~MacroItem () | |
| TQString | comment () const |
| void | setComment (const TQString &comment) |
| TDESharedPtr< Action > | action () const |
| void | setAction (TDESharedPtr< Action > action) |
| TQVariant | variant (const TQString &name, bool checkaction=false) const |
| TDESharedPtr< Variable > | variable (const TQString &name, bool checkaction=false) const |
| TQMap< TQString, TDESharedPtr< Variable > > | variables () const |
| bool | setVariant (const TQString &name, const TQVariant &variant) |
| TDESharedPtr< Variable > | addVariable (const TQString &name, const TQVariant &variant) |
Detailed Description
The MacroItem class is an item in a Macro and represents one single execution step.
Each MacroItem points to 0..1 Action instances which implement the execution. So, the MacroItem provides a simple state-pattern on the one hand (depending on the for this MacroItem choosen Action implementation) and holds the by the user defined modifications like e.g. the comment on the other hand.
Definition at line 46 of file macroitem.h.
Member Typedef Documentation
◆ List
| typedef TQValueList<TDESharedPtr<MacroItem > > KoMacro::MacroItem::List |
A list of MacroItem instances.
Definition at line 54 of file macroitem.h.
Constructor & Destructor Documentation
◆ MacroItem()
|
explicit |
Constructor.
Definition at line 111 of file macroitem.cpp.
◆ ~MacroItem()
| MacroItem::~MacroItem | ( | ) |
Destructor.
Definition at line 117 of file macroitem.cpp.
Member Function Documentation
◆ action()
| TDESharedPtr< Action > MacroItem::action | ( | ) | const |
◆ addVariable()
| TDESharedPtr< Variable > MacroItem::addVariable | ( | const TQString & | name, |
| const TQVariant & | variant ) |
Add a new variable with the vaiablename.
- Parameters
-
name and the given TQVariant@param variant to our MacroItem instance.
Definition at line 204 of file macroitem.cpp.
◆ comment()
| TQString MacroItem::comment | ( | ) | const |
- Returns
- the comment defined by the user for this MacroItem .
Definition at line 122 of file macroitem.cpp.
◆ setAction()
| void MacroItem::setAction | ( | TDESharedPtr< Action > | action | ) |
Set the Action.
- Parameters
-
action this MacroItem points to.
Definition at line 137 of file macroitem.cpp.
◆ setComment()
| void MacroItem::setComment | ( | const TQString & | comment | ) |
Set the comment.
- Parameters
-
comment defined by the user for this MacroItem .
Definition at line 127 of file macroitem.cpp.
◆ setVariant()
| bool MacroItem::setVariant | ( | const TQString & | name, |
| const TQVariant & | variant ) |
Set the TQVariant.
- Parameters
-
variant as variable with the variablename name .
- Returns
- a bool for successfull setting.
Definition at line 162 of file macroitem.cpp.
◆ variable()
| TDESharedPtr< Variable > MacroItem::variable | ( | const TQString & | name, |
| bool | checkaction = false ) const |
- Returns
- the Variable instance identified with the name
- Parameters
-
name . If this MacroItem doesn't have a Variable with that name NULL is returned. If the boolean value checkaction is true, we also look if our Action may know about such a name in the case this MacroItem doesn't have such a name.
Definition at line 148 of file macroitem.cpp.
◆ variables()
| Variable::Map MacroItem::variables | ( | ) | const |
- Returns
- a map of Variable instances.
Definition at line 157 of file macroitem.cpp.
◆ variant()
| TQVariant MacroItem::variant | ( | const TQString & | name, |
| bool | checkaction = false ) const |
- Returns
- Variant from the Variable identified with the name
- Parameters
-
name . If this MacroItem doesn't have a Variable with that name NULL is returned. If the boolean value checkaction is true, we also look if our Action may know about such a name in the case this MacroItem doesn't have such a name.
Definition at line 142 of file macroitem.cpp.
The documentation for this class was generated from the following files:
