kexi

KexiUserAction Class Reference

#include <kexiuseraction.h>

Inherits KAction.

List of all members.


Detailed Description

action that can be defined by a user for a special scope e.g. main, form ... the actions can have some predefined Methods which are described in KexiUserActionMethod e.g. OpenObject, ExecuteScript ... those methods take different arguments also described in KexiUserActionMethod

Definition at line 19 of file kexiuseraction.h.


Public Types

enum  Methods {
  MethodNone = 0, OpenObject = 1, CloseObject = 2, DeleteObject = 3,
  ExecuteScript = 4, ExitKexi = 5, LastMethod = 6
}
enum  ArgTypes {
  String = 0, Integer = 1, Bool = 2, KexiPart = 3,
  KexiItem = 4
}

Public Member Functions

 KexiUserAction (KexiMainWindow *context, KActionCollection *parent, const QString &name, const QString &text, const QString &pixmap)
void setMethod (int method, Arguments args)

Static Public Member Functions

static KexiUserActionfromCurrentRecord (KexiMainWindow *context, KActionCollection *parent, KexiDB::Cursor *c)

Protected Slots

void execute ()

Member Enumeration Documentation

bytecode of available methods

Definition at line 25 of file kexiuseraction.h.

argument types

Definition at line 38 of file kexiuseraction.h.


Constructor & Destructor Documentation

KexiUserAction::KexiUserAction ( KexiMainWindow context,
KActionCollection *  parent,
const QString &  name,
const QString &  text,
const QString &  pixmap 
)

constructs an action

Note:
methods are associated using setMethod()

Definition at line 14 of file kexiuseraction.cpp.


Member Function Documentation

void KexiUserAction::setMethod ( int  method,
Arguments  args 
)

sets execution information associated with this action this will mostly look like

            KexiUserAction *action = new KexiUserAction(...);
            Arguments arg;
            arg.append(QVariant("kexi/form"));
            arg.append(QVariant("main"));
            action->setMethod(KexiUserAction::OpenAction, arg);

Definition at line 23 of file kexiuseraction.cpp.

KexiUserAction * KexiUserAction::fromCurrentRecord ( KexiMainWindow context,
KActionCollection *  parent,
KexiDB::Cursor c 
) [static]

creates a KexiUserAction from current record in c mostly needed for creation from kexi__useractions table

Definition at line 62 of file kexiuseraction.cpp.

void KexiUserAction::execute (  )  [protected, slot]

actually executes the associated method

Note:
KexiUserAction automatically connects KAction::activated() to KexiUserAction::execute()

Definition at line 30 of file kexiuseraction.cpp.


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