00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __SHORTCUTS_H__
00019 #define __SHORTCUTS_H__
00020
00021 #include <qptrlist.h>
00022 #include <qstring.h>
00023 #include <qaction.h>
00024 #include <Python.h>
00025
00026 #include "cute.h"
00027 #include "cutescintilla.h"
00028
00030 class PyAction : public QAction
00031 {
00032 Q_OBJECT
00033 public:
00035 PyAction( PyObject *function, QObject *parent, const char *name );
00036 protected slots:
00038 void execPyFunction();
00039 private:
00041 PyObject *function;
00042 };
00043
00045 class Shortcuts
00046 {
00047 public:
00049 static void pairActions(QAction *globalAction, QAction *editAction);
00051 static void synchronizeActions();
00053 static QPtrList<QAction> *globalActions();
00055 static QPtrList<QAction> *globalActionsWithoutEditActions();
00057 static QPtrList<QAction> *editActions();
00059 static QPtrList<QAction> *actions();
00060 protected:
00062 static QPtrList<QAction> *editGlobalActions();
00063 private:
00065 struct ActionPair
00066 {
00068 QAction *globalAction;
00070 QAction *editAction;
00071 };
00073 static QPtrList<ActionPair> actionPairs;
00074 };
00075
00076 #endif