kexi

KoMacro::Action Class Referenceabstract

#include <action.h>

Inheritance diagram for KoMacro::Action:
KexiMacro::KexiAction KexiMacro::DataTableAction KexiMacro::ExecuteAction KexiMacro::MessageAction KexiMacro::NavigateAction KexiMacro::OpenAction

Public Types

typedef TQMap< TQString, TDESharedPtr< Action > > Map

Public Slots

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

Public Member Functions

 Action (const TQString &name, const TQString &text=TQString())
virtual ~Action ()
virtual const TQString toString () const
const TQString name () const
void setName (const TQString &name)
const TQString text () const
void setText (const TQString &text)
const TQString comment () const
void setComment (const TQString &comment)
bool hasVariable (const TQString &name) const
TDESharedPtr< Variable > variable (const TQString &name) const
Variable::Map variables () const
TQStringList variableNames () const
void setVariable (TDESharedPtr< Variable > variable)
void setVariable (const TQString &name, const TQString &text, const TQVariant &variant)
void removeVariable (const TQString &name)
virtual bool notifyUpdated (const TDESharedPtr< MacroItem > &macroitem, const TQString &name)

Detailed Description

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

Definition at line 38 of file action.h.

Member Typedef Documentation

◆ Map

typedef TQMap<TQString, TDESharedPtr<Action> > KoMacro::Action::Map

Property to get/set the name.

Property to get/set the text. Property to get/set the comment. Shared pointer to implement reference-counting.

Definition at line 59 of file action.h.

Constructor & Destructor Documentation

◆ Action()

Action::Action ( const TQString & name,
const TQString & text = TQString() )
explicit

Constructor.

Parameters
nameThe unique name this Action has.
textThe i18n-caption text this Action has.

Definition at line 69 of file action.cpp.

◆ ~Action()

Action::~Action ( )
virtual

Destructor.

Definition at line 82 of file action.cpp.

Member Function Documentation

◆ activate

virtual void KoMacro::Action::activate ( TDESharedPtr< Context > context)
pure virtualslot

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

◆ comment()

const TQString Action::comment ( ) const
Returns
the comment associated with this action.

Definition at line 115 of file action.cpp.

◆ hasVariable()

bool Action::hasVariable ( const TQString & 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.

◆ name()

const TQString Action::name ( ) const

The name this Action has.

Definition at line 95 of file action.cpp.

◆ notifyUpdated()

virtual bool KoMacro::Action::notifyUpdated ( const TDESharedPtr< MacroItem > & macroitem,
const TQString & name )
inlinevirtual

This function is called, when the KoMacro::Variable with name name used within the KoMacro::MacroItem macroitem got changed.

Parameters
macroitemThe KoMacro::MacroItem instance where the variable defined with name is located in.
nameThe name the KoMacro::Variable has.
Returns
true if the update was successfully else false is returned.

Definition at line 165 of file action.h.

◆ removeVariable()

void Action::removeVariable ( const TQString & name)

Remove the variable defined with name .

If there exists no such variable, nothing is done.

Definition at line 162 of file action.cpp.

◆ setComment()

void Action::setComment ( const TQString & comment)

Set the comment associated with this action.

Definition at line 120 of file action.cpp.

◆ setName()

void Action::setName ( const TQString & name)

Set the name of the Action to name .

Definition at line 100 of file action.cpp.

◆ setText()

void Action::setText ( const TQString & text)

Set the i18n-caption text this Action has.

Definition at line 110 of file action.cpp.

◆ setVariable() [1/2]

void Action::setVariable ( const TQString & name,
const TQString & text,
const TQVariant & variant )

Set the variable.

Parameters
nameThe name the variable should have.
textThe i18n-caption used for display.
variantThe TQVariant value.

Definition at line 154 of file action.cpp.

◆ setVariable() [2/2]

void Action::setVariable ( TDESharedPtr< Variable > variable)

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

Definition at line 145 of file action.cpp.

◆ text()

const TQString Action::text ( ) const
Returns
the i18n-caption text this Action has.

Definition at line 105 of file action.cpp.

◆ toString()

const TQString Action::toString ( ) const
virtual
Returns
a string representation of the functionality this action provides.

Definition at line 90 of file action.cpp.

◆ variable()

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

◆ variableNames()

TQStringList Action::variableNames ( ) const
Returns
a list of variablenames this Action provides.s

Definition at line 140 of file action.cpp.

◆ variables()

Variable::Map Action::variables ( ) const
Returns
the map of variables this Action provides.

Definition at line 135 of file action.cpp.


The documentation for this class was generated from the following files: