Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members

shortcuts.h

00001 /***************************************************************************
00002                           shortcuts.h  -  defines standart shortcuts and manage them
00003                              -------------------
00004     begin                : Sam, 19 Jul 2003
00005     copyright            : (C) 2003 by Heiko Köhler
00006     email                : heicom@users.sourceforge.net
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef __SHORTCUTS_H__
00019 #define __SHORTCUTS_H__
00020 
00021 #undef slots
00022 #include <Python.h>
00023 #define slots
00024 #include <qptrlist.h>
00025 #include <qstring.h>
00026 #include <qaction.h>
00027 
00028 #include "cute.h"
00029 #include "cutescintilla.h"
00030 
00032 class PyAction : public QAction
00033 {
00034     Q_OBJECT
00035 public:
00037     PyAction( PyObject *function, QObject *parent, const char *name );
00038 protected slots:
00040     void execPyFunction();
00041 private:
00043     PyObject *function;
00044 };
00045 
00047 class Shortcuts
00048 {
00049     public:
00051         static void pairActions(QAction *globalAction, QAction *editAction);
00053         static void synchronizeActions();
00055         static QPtrList<QAction> *globalActions();
00057         static QPtrList<QAction> *globalActionsWithoutEditActions();
00059         static QPtrList<QAction> *editActions();
00061         static QPtrList<QAction> *actions();
00062     protected:
00064         static QPtrList<QAction> *editGlobalActions();
00065     private:
00067         struct ActionPair
00068         {
00070             QAction *globalAction;
00072             QAction *editAction;
00073         };
00075         static QPtrList<ActionPair> actionPairs;
00076 };
00077 
00078 #endif

Generated on Sun May 2 20:02:58 2004 by doxygen 1.3.2