kexi
KoMacro::MacroItem Class Reference
#include <macroitem.h>
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.
Public Types | |
typedef QValueList< KSharedPtr< MacroItem > > | List |
Public Member Functions | |
MacroItem () | |
~MacroItem () | |
QString | comment () const |
void | setComment (const QString &comment) |
KSharedPtr< Action > | action () const |
void | setAction (KSharedPtr< Action > action) |
QVariant | variant (const QString &name, bool checkaction=false) const |
KSharedPtr< Variable > | variable (const QString &name, bool checkaction=false) const |
QMap< QString, KSharedPtr< Variable > > | variables () const |
bool | setVariant (const QString &name, const QVariant &variant) |
KSharedPtr< Variable > | addVariable (const QString &name, const QVariant &variant) |
Member Typedef Documentation
typedef QValueList<KSharedPtr<MacroItem > > KoMacro::MacroItem::List |
Constructor & Destructor Documentation
MacroItem::MacroItem | ( | ) | [explicit] |
MacroItem::~MacroItem | ( | ) |
Member Function Documentation
QString MacroItem::comment | ( | ) | const |
- Returns:
- the comment defined by the user for this MacroItem .
Definition at line 122 of file macroitem.cpp.
void MacroItem::setComment | ( | const QString & | comment | ) |
Set the comment.
- Parameters:
-
comment defined by the user for this MacroItem .
Definition at line 127 of file macroitem.cpp.
KSharedPtr< Action > MacroItem::action | ( | ) | const |
void MacroItem::setAction | ( | KSharedPtr< Action > | action | ) |
Set the Action.
- Parameters:
-
action this MacroItem points to.
Definition at line 137 of file macroitem.cpp.
QVariant MacroItem::variant | ( | const QString & | 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.
KSharedPtr< Variable > MacroItem::variable | ( | const QString & | 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.
Variable::Map MacroItem::variables | ( | ) | const |
bool MacroItem::setVariant | ( | const QString & | name, | |
const QVariant & | variant | |||
) |
Set the QVariant.
- Parameters:
-
variant as variable with the variablename name .
- Returns:
- a bool for successfull setting.
Definition at line 162 of file macroitem.cpp.
KSharedPtr< Variable > MacroItem::addVariable | ( | const QString & | name, | |
const QVariant & | variant | |||
) |
Add a new variable with the vaiablename.
- Parameters:
-
name and the given QVariant variant to our MacroItem instance.
Definition at line 204 of file macroitem.cpp.
The documentation for this class was generated from the following files: