Salome HOME
Fix for bug 10438: Crash during Explode on Blocks operation (Global selection on...
[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 <qstring.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   enum Actions { 
23     PanLeft = 1, 
24     PanRight, 
25     PanUp, 
26     PanDown, 
27     ZoomIn, 
28     ZoomOut, 
29     ZoomFit, 
30     RotateLeft, 
31     RotateRight, 
32     RotateUp, 
33     RotateDown, 
34     LastAction 
35   };
36
37 public:
38   SUIT_Accel( SUIT_Desktop* theDesktop );
39   virtual ~SUIT_Accel();
40
41   void setActionKey( const int action, const int key, const QString& type );
42
43 protected slots:
44   void onActivated( int );
45
46 private:
47   QAccel* myAccel; 
48   SUIT_Desktop* myDesktop;
49
50   typedef QMap<int, int> IdActionMap; // internal_id - to - action map
51   typedef QMap<QString, IdActionMap> ViewerTypeIdActionMap; // viewer_type - to - IdActionMap
52   ViewerTypeIdActionMap myMap;
53 };
54
55 #endif