Salome HOME
0c72053da913f40f105a395c88f1b38da0e96bb1
[modules/gui.git] / src / SUIT / SUIT_Accel.h
1 // SUIT_Accel.h: interface for the SUIT_Accel class.
2 //
3 //////////////////////////////////////////////////////////////////////
4
5 #ifndef SUIT_Accel_h 
6 #define SUIT_Accel_h
7
8 #include "SUIT.h"
9
10 #include <qobject.h>
11 #include <qstringlist.h>
12 #include <qmap.h>
13
14 class QAccel;
15 class SUIT_Desktop;
16
17 class SUIT_EXPORT SUIT_Accel: public QObject
18 {
19   Q_OBJECT
20
21 public:
22   SUIT_Accel( SUIT_Desktop* theDesktop );
23   virtual ~SUIT_Accel();
24
25   enum Actions { PanLeft = 1, PanRight, PanUp, PanDown, ZoomIn, ZoomOut, ZoomFit, RotateLeft, RotateRight, RotateUp, RotateDown, UserAction };
26   void setActionKey( const int action, const int key, const QString& type );
27
28 protected slots:
29   void onActivated( int );
30
31 private:
32   QAccel* myAccel; 
33   SUIT_Desktop* myDesktop;
34
35   typedef QMap<int, int> KeyActionMap; // key-to-action map
36   typedef QMap<int, QStringList> ActionViewerTypesMap; // key=action id
37   KeyActionMap myKeyActionMap;
38   ActionViewerTypesMap myActionViewerTypesMap;
39 };
40
41 #endif