Kexi API Documentation (2.0 alpha)

KoMacro::MacroItem Class Reference

#include <macroitem.h>

Inheritance diagram for KoMacro::MacroItem:

KShared 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
 A list of MacroItem instances.

Public Member Functions

 MacroItem ()
 Constructor.
 ~MacroItem ()
 Destructor.
QString comment () const
void setComment (const QString &comment)
 Set the comment.
KSharedPtr< Actionaction () const
void setAction (KSharedPtr< Action > action)
 Set the 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)
 Set the QVariant.
KSharedPtr< VariableaddVariable (const QString &name, const QVariant &variant)
 Add a new variable with the vaiablename.


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

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.

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.

References setVariant(), and variable().

QString MacroItem::comment  )  const
 

Returns:
the comment defined by the user for this MacroItem .

Definition at line 122 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.

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.

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.

References variable().

Referenced by addVariable().

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.

Referenced by addVariable(), setVariant(), and variant().

Variable::Map MacroItem::variables  )  const
 

Returns:
a map of Variable instances.

Definition at line 157 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.

References variable().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for Kexi 2.0 alpha.
Documentation copyright © 2002-2007 the Kexi Team.
Generated on Tue Apr 1 20:51:02 2008 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003