kexi

#include <kexiuseraction.h>

Inherits TDEAction.

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, TDEActionCollection *parent, const TQString &name, const TQString &text, const TQString &pixmap)
 
void setMethod (int method, Arguments args)
 

Static Public Member Functions

static KexiUserAction * fromCurrentRecord (KexiMainWindow *context, TDEActionCollection *parent, KexiDB::Cursor *c)
 

Protected Slots

void execute ()
 

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.

Member Enumeration Documentation

◆ ArgTypes

argument types

Definition at line 39 of file kexiuseraction.h.

◆ Methods

bytecode of available methods

Definition at line 26 of file kexiuseraction.h.

Constructor & Destructor Documentation

◆ KexiUserAction()

KexiUserAction::KexiUserAction ( KexiMainWindow *  context,
TDEActionCollection *  parent,
const TQString &  name,
const TQString &  text,
const TQString &  pixmap 
)

constructs an action

Note
methods are associated using setMethod()

Definition at line 14 of file kexiuseraction.cpp.

◆ ~KexiUserAction()

KexiUserAction::~KexiUserAction ( )

Definition at line 103 of file kexiuseraction.cpp.

Member Function Documentation

◆ execute

void KexiUserAction::execute ( )
protectedslot

actually executes the associated method

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

Definition at line 30 of file kexiuseraction.cpp.

◆ fromCurrentRecord()

KexiUserAction * KexiUserAction::fromCurrentRecord ( KexiMainWindow *  context,
TDEActionCollection *  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.

◆ setMethod()

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(TQVariant("kexi/form"));
arg.append(TQVariant("main"));
action->setMethod(KexiUserAction::OpenAction, arg);
void setMethod(int method, Arguments args)

Definition at line 23 of file kexiuseraction.cpp.


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