VR-Forces 4.1.1 Class Documentation
DtVrfMenuKeyMapManager.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2013 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
8 
10 
11 #pragma once
12 
15 #include <vrvUtil/signalslib.h>
16 #include <vrvCore/DtDe.h>
17 #include <vrvCore/DtMenuPath.h>
22 
23 #include <QObject>
24 
25 class QEvent;
26 class QAction;
27 class QCheckBox;
28 
29 namespace makVrv
30 {
31  class DtKeyMapManager;
32  class DtKeyMap;
33 }
34 
35 namespace makVrf
36 {
37  class DtAssembledMenu;
38 
44  {
45  Q_OBJECT
46 
47  public:
49  virtual ~DtVrfMenuKeyMapManager();
50 
52  static DtVrfMenuKeyMapManager& instance(makVrv::DtDe& de);
53  static void registerInstance(makVrv::DtDe&, DtVrfMenuKeyMapManager*);
54 
57  virtual void setup();
58 
60  virtual void addKeyboardMenuMapping(const makVrv::DtMenuPath& path);
61 
63  virtual void removeKeyboardMenuMapping(const makVrv::DtMenuPath& path);
64 
66  virtual void setApplyChangesToAllKeymaps(bool);
67  virtual bool applyChangesToAllKeymaps() const;
68 
70  virtual bool isMenuFunction(const std::string& func) const;
71 
72  protected:
74  virtual bool eventFilter(QObject*, QEvent*);
75 
78  virtual std::string menuPathToFunctionName(const makVrv::DtMenuPath&) const;
79 
81  virtual void slot_triggerShortcut(makVrv::DtMenuPath);
82 
85  virtual void setKeyMap(makVrv::DtKeyMapManager*, std::string currentMap);
86 
90  virtual void manageChangeableMenu(const std::string& menuId);
91 
94  virtual void setupChangeableMenus();
95 
97  virtual void preAssembleConfigurableMenu(DtAssembledMenu*);
98 
100  virtual void postAssembleConfigurableMenu(DtAssembledMenu*);
101 
104  virtual int mapPathToKeymapFunctionCategory(const std::string& path);
105 
108  virtual void keyMappingRemoved(makVrv::DtKeyMap*, std::string, makVrv::DtKeyState::KeyType,
110 
113  virtual void keyMappingModified(makVrv::DtKeyMap*, std::string, makVrv::DtKeyState::KeyType,
115 
117  virtual void setupKeyMappingFor(const std::string& path, QAction* action, makVrv::DtKeyMap* map);
118 
121  virtual void resetShortcut(makVrv::DtKeyMap*, std::string);
122 
123  protected:
126 
127  typedef std::map<std::string, std::string> FunctionToPathMap;
129 
130  typedef std::map<std::string, std::string> PathToFunctionMap;
132 
133  typedef std::map<std::string, int> FunctionCategoryMap;
135 
137  };
138 
141  {
142  public:
144  DtVrfKeyMappingEditorPage(makVrv::DtDe& de, QWidget* parent, Qt::WindowFlags f);
145 
147  virtual ~DtVrfKeyMappingEditorPage();
148  };
149 
152 
155  {
156  Q_OBJECT
157 
158  public:
160  DtVrfKeyMappingEditorWidget( makVrv::DtDe& de, QWidget* parent, Qt::WindowFlags flags = 0);
161 
163  virtual ~DtVrfKeyMappingEditorWidget();
164 
165  protected slots:
166  virtual void on_applyChangesToAllKeymapsChanged();
167 
172  virtual void requestInput( const std::string functionName,
173  const makVrv::DtKeyMapping& keyMapping, bool isBinary );
174  virtual void requestInput( const std::string functionName, bool isBinary );
175 
176  protected:
179  };
180 
182  {
183  public:
184 
186  DtVrfRequestKeyMapKeyDialog( QWidget* parent = 0, Qt::WindowFlags flags = Qt::Tool | Qt::SubWindow );
187 
189  virtual ~DtVrfRequestKeyMapKeyDialog();
190 
192  void show( std::string functionName, bool isBinary );
193 
195  void show( std::string functionName, const makVrv::DtKeyMapping& keyMapping,
196  bool isBinary );
197  };
198 }

Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)