kexi
KoMacro::Action Class Reference
#include <action.h>
Inheritance diagram for KoMacro::Action:

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< Variable > | variable (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 > ¯oitem, const QString &name) |
Properties | |
QString | name [] |
QString | text [] |
QString | comment [] |
Member Typedef Documentation
typedef QMap<QString, KSharedPtr<Action> > KoMacro::Action::Map |
Constructor & Destructor Documentation
Action::Action | ( | const QString & | name, | |
const QString & | text = QString::null | |||
) | [explicit] |
Action::~Action | ( | ) | [virtual] |
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 | ) |
const QString KoMacro::Action::text | ( | ) | const |
void Action::setText | ( | const QString & | text | ) |
const QString KoMacro::Action::comment | ( | ) | const |
- Returns:
- the comment associated with this action.
void Action::setComment | ( | const QString & | comment | ) |
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 |
QStringList Action::variableNames | ( | ) | const |
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.
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] |
const QString Action::text [read, write] |
const QString Action::comment [read, write] |
The documentation for this class was generated from the following files: