Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef SUIT_ACELL_H
00026 #define SUIT_ACELL_H
00027
00028 #include "SUIT.h"
00029
00030 #include <QMap>
00031 #include <QObject>
00032 #include <QString>
00033
00034 class SUIT_EXPORT SUIT_Accel: public QObject
00035 {
00036 Q_OBJECT
00037
00038 public:
00039 enum Actions {
00040 PanLeft = 1,
00041 PanRight,
00042 PanUp,
00043 PanDown,
00044 ZoomIn,
00045 ZoomOut,
00046 ZoomFit,
00047 RotateLeft,
00048 RotateRight,
00049 RotateUp,
00050 RotateDown,
00051 LastAction
00052 };
00053
00054 public:
00055 static SUIT_Accel* getAccel();
00056
00057 void setActionKey( const int action, const int key, const QString& type );
00058 void unsetActionKey( const int key, const QString& type );
00059
00060 protected:
00061 bool eventFilter( QObject *, QEvent * );
00062
00063 private:
00064 SUIT_Accel();
00065
00066 int getAccelKey( QEvent* );
00067
00068 typedef QMap<int, int> IdActionMap;
00069 typedef QMap<QString, IdActionMap>
00070 ViewerTypeIdActionMap;
00071 ViewerTypeIdActionMap myMap;
00072
00075 QMap<int, bool> myOptMap;
00076
00077 static SUIT_Accel* myself;
00078 };
00079
00080 #endif