kexi

KoMacro::Action Class Reference

#include <action.h>

Inheritance diagram for KoMacro::Action:

KexiMacro::KexiAction KexiMacro::DataTableAction KexiMacro::ExecuteAction KexiMacro::MessageAction KexiMacro::NavigateAction KexiMacro::OpenAction List of all members.

Detailed Description

The Action class extendes KAction to implement some additional functionality KAction doesn't provide.

Definition at line 38 of file action.h.


Public Types

typedef QMap< QString, KSharedPtr<
Action > > 
Map

Public Slots

virtual void activate (KSharedPtr< Context > context)=0

Public Member Functions

 Action (const QString &name, const QString &text=QString::null)
virtual ~Action ()
virtual const QString toString () const
const QString name () const
void setName (const QString &name)
const QString text () const
void setText (const QString &text)
const QString comment () const
void setComment (const QString &comment)
bool hasVariable (const QString &name) const
KSharedPtr< Variablevariable (const QString &name) const
Variable::Map variables () const
QStringList variableNames () const
void setVariable (KSharedPtr< Variable > variable)
void setVariable (const QString &name, const QString &text, const QVariant &variant)
void removeVariable (const QString &name)
virtual bool notifyUpdated (const KSharedPtr< MacroItem > &macroitem, const QString &name)

Properties

QString name []
QString text []
QString comment []

Member Typedef Documentation

typedef QMap<QString, KSharedPtr<Action> > KoMacro::Action::Map

Shared pointer to implement reference-counting.

Definition at line 58 of file action.h.


Constructor & Destructor Documentation

Action::Action ( const QString &  name,
const QString &  text = QString::null 
) [explicit]

Constructor.

Parameters:
name The unique name this Action has.
text The i18n-caption text this Action has.

Definition at line 69 of file action.cpp.

Action::~Action (  )  [virtual]

Destructor.

Definition at line 82 of file action.cpp.


Member Function Documentation

const QString Action::toString (  )  const [virtual]

Returns:
a string representation of the functionality this action provides.

Definition at line 90 of file action.cpp.

const QString KoMacro::Action::name (  )  const

The name this Action has.

void Action::setName ( const QString &  name  ) 

Set the name of the Action to name .

Definition at line 100 of file action.cpp.

const QString KoMacro::Action::text (  )  const

Returns:
the i18n-caption text this Action has.

void Action::setText ( const QString &  text  ) 

Set the i18n-caption text this Action has.

Definition at line 110 of file action.cpp.

const QString KoMacro::Action::comment (  )  const

Returns:
the comment associated with this action.

void Action::setComment ( const QString &  comment  ) 

Set the comment associated with this action.

Definition at line 120 of file action.cpp.

bool Action::hasVariable ( const QString &  name  )  const

Returns:
true if there exists a variable with the name name else false is returned.

Definition at line 125 of file action.cpp.

KSharedPtr< Variable > Action::variable ( const QString &  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.

Variable::Map Action::variables (  )  const

Returns:
the map of variables this Action provides.

Definition at line 135 of file action.cpp.

QStringList Action::variableNames (  )  const

Returns:
a list of variablenames this Action provides.s

Definition at line 140 of file action.cpp.

void Action::setVariable ( KSharedPtr< Variable variable  ) 

Append the Variable variable to list of variables this Action provides.

Definition at line 145 of file action.cpp.

void Action::setVariable ( const QString &  name,
const QString &  text,
const QVariant &  variant 
)

Set the variable.

Parameters:
name The name the variable should have.
text The i18n-caption used for display.
variant The QVariant value.

Definition at line 154 of file action.cpp.

void Action::removeVariable ( const QString &  name  ) 

Remove the variable defined with name .

If there exists no such variable, nothing is done.

Definition at line 162 of file action.cpp.

virtual bool KoMacro::Action::notifyUpdated ( const KSharedPtr< MacroItem > &  macroitem,
const QString &  name 
) [inline, virtual]

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 name is located in.
name The name the KoMacro::Variable has.
Returns:
true if the update was successfully else false is returned.

Definition at line 164 of file action.h.

virtual void KoMacro::Action::activate ( KSharedPtr< Context context  )  [pure virtual, slot]

Called if the Action should be executed within the defined context .

Implemented in KexiMacro::DataTableAction, KexiMacro::ExecuteAction, KexiMacro::MessageAction, KexiMacro::NavigateAction, and KexiMacro::OpenAction.


Property Documentation

const QString Action::name [read, write]

Property to get/set the name.

Definition at line 45 of file action.h.

const QString Action::text [read, write]

Property to get/set the text.

Definition at line 48 of file action.h.

const QString Action::comment [read, write]

Property to get/set the comment.

Definition at line 51 of file action.h.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys