kexi
kexiuseraction.h00001 #ifndef KEXIUSERACTION_H
00002 #define KEXIUSERACTION_H
00003
00004 #include <kaction.h>
00005
00006 #include "kexiuseractionmethod.h"
00007
00008 namespace KexiDB
00009 {
00010 class Cursor;
00011 }
00012 class KexiMainWindow;
00013 typedef QValueVector<QVariant> Arguments;
00014
00019 class KEXICORE_EXPORT KexiUserAction : public KAction
00020 {
00021 Q_OBJECT
00022
00023 public:
00025 enum Methods
00026 {
00027 MethodNone = 0,
00028 OpenObject = 1,
00029 CloseObject = 2,
00030 DeleteObject = 3,
00031 ExecuteScript = 4,
00032 ExitKexi = 5,
00033
00034 LastMethod = 6
00035 };
00036
00038 enum ArgTypes
00039 {
00040 String = 0,
00041 Integer = 1,
00042 Bool = 2,
00043 KexiPart = 3,
00044 KexiItem = 4
00045 };
00046
00050 KexiUserAction(KexiMainWindow *context, KActionCollection *parent, const QString &name, const QString &text, const QString &pixmap);
00051 ~KexiUserAction();
00052
00062 void setMethod(int method, Arguments args);
00063
00066 static KexiUserAction *fromCurrentRecord(KexiMainWindow *context, KActionCollection *parent, KexiDB::Cursor *c);
00067
00068 protected slots:
00072 void execute();
00073
00074 private:
00075 KexiMainWindow *m_win;
00076 int m_method;
00077 Arguments m_args;
00078 };
00079
00080 #endif
00081
|