kexi

KoMacro::MacroItem Class Reference

#include <macroitem.h>

List of all members.


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< Actionaction () const
void setAction (KSharedPtr< Action > action)
QVariant variant (const QString &name, bool checkaction=false) const
KSharedPtr< Variablevariable (const QString &name, bool checkaction=false) const
QMap< QString, KSharedPtr<
Variable > > 
variables () const
bool setVariant (const QString &name, const QVariant &variant)
KSharedPtr< VariableaddVariable (const QString &name, const QVariant &variant)

Member Typedef Documentation

typedef QValueList<KSharedPtr<MacroItem > > KoMacro::MacroItem::List

A list of MacroItem instances.

Definition at line 54 of file macroitem.h.


Constructor & Destructor Documentation

MacroItem::MacroItem (  )  [explicit]

Constructor.

Definition at line 111 of file macroitem.cpp.

MacroItem::~MacroItem (  ) 

Destructor.

Definition at line 117 of file macroitem.cpp.


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

Returns:
the Action this MacroItem points to.

This method will return NULL if there is no Action defined yet else the returned Action will be used to implement the execution.

Definition at line 132 of file macroitem.cpp.

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

Returns:
a map of Variable instances.

Definition at line 157 of file macroitem.cpp.

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:
KDE Home | KDE Accessibility Home | Description of Access Keys