VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtKeyMappingEditorLogic.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2009 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvCoreQt/vrvCoreQt.h>
13 #include <vrvCore/DtKeyMap.h>
14 #include <QtCore/QString>
15 
16 namespace makVrv
17 {
18  class DtDe;
19  class DtKeyMappingEditorWidgetInterface;
20  class DtPersistenceControlsInterface;
21  class DtSelectInstanceWidget;
22  class DtKeyMapManager;
23 
27  {
28  public:
29 
33 
35  virtual ~DtKeyMappingEditorLogic();
36 
38  void editKeyMapping();
39 
41  void addKeyMapping();
42 
44  void removeKeyMapping();
45 
47  void filterChanged( int functionCategory );
48 
50  void selectFunction( const std::string& functionName );
51 
53  void selectKeyMapping( const DtKeyMapping& keyMapping );
54 
56  void selectKeyMap( const std::string& keyMapping );
57 
59  void deselectFunctions();
60 
63  void requestInputCanceled();
64 
67  void requestInputAccepted( const DtKeyMapping& keyMapping, bool isEdit );
68 
72  void requestKeyValidationAccepted( const DtKeyMapping& keyMapping,
73  const DtKeyFunctionNameList& fnList, bool isEdit, bool replace );
74 
75  protected:
76  virtual void setupGui();
77 
78  void setupFilters();
79  void setupAllKeyFunctions();
80  void setupKeyFunctions();
81  void setupBinaryKeyFunctions();
82  void updateAfterMappingChange();
83 
84  std::string keyMappingsToString(
85  const DtKeyMap::MappedKeyList& keyList,
86  bool suppressDirection=false );
87 
88  std::string mapNameFromFileName( const std::string& filename );
89 
90  protected:
92  virtual void slot_currentInstanceChanged(int index, const std::string& keyMap);
93 
95  virtual void slot_keyMapRestored(DtKeyMapManager*, const std::string& map);
96 
98  virtual void onExport();
99 
102  virtual void onExportFilenameChosen(const std::string&);
103 
105  virtual void onImport();
106 
109  virtual void onImportFilenameChosen(const std::string&);
110 
112  virtual void slot_renameInstanceRequested();
113 
115  virtual void slot_newInstanceRequested();
116 
118  virtual void slot_deleteInstanceRequested();
119 
121  virtual QString askForKeyMapName(QString initial, const QString& title) const;
122 
123  protected:
124 
130  int myFilter;
131 
134 
137 
140 
143 
145  std::string myKeyMapName;
146  };
147 }
std::string myCurrentFunctionSelection
The currently selected function in the function list.
Definition: DtKeyMappingEditorLogic.h:133
DtSelectInstanceWidget & mySelectedInstance
Definition: DtKeyMappingEditorLogic.h:128
DtKeyMapping myCurrentKeyMapping
The currently selected key mapping in the key mapping list.
Definition: DtKeyMappingEditorLogic.h:139
std::string myKeyMapName
This is the name of the map we&#39;re editing. If &quot;&quot;, this is a new map.
Definition: DtKeyMappingEditorLogic.h:145
int myFilter
current function filter in use
Definition: DtKeyMappingEditorLogic.h:130
DtDe & myDe
Definition: DtKeyMappingEditorLogic.h:125
Base select instance widget.
Definition: DtSelectInstanceWidget.h:28
std::list< DtKeyMapping * > MappedKeyList
Definition: DtKeyMap.h:316
The reverse key map is a list of these for each function name.
Definition: DtKeyMap.h:246
#define DT_DLL_VRVCOREQT
Definition: vrvCoreQt.h:20
Contains DLL export macros.
A serializable list of function names.
Definition: DtKeyMap.h:37
Abstract interface for controlling persistence of state in a dialog.
Definition: DtPersistenceControlsInterface.h:20
DtKeyMappingEditorWidgetInterface & myInterface
Definition: DtKeyMappingEditorLogic.h:127
a Key Map contains a map of keys to FunctionMapEntrys, as well as a list of functions to execute when...
Definition: DtKeyMap.h:312
The manager for owning key maps.
Definition: DtKeyMapManager.h:32
The logic for the makVrv::DtKeyMappingEditor.
Definition: DtKeyMappingEditorLogic.h:26
bool myCurrentFunctionIsBinary
Indicates if the current function selection is a binary function.
Definition: DtKeyMappingEditorLogic.h:136
DtKeyMap * myKeyMap
pointer to the temporary, workspace key map
Definition: DtKeyMappingEditorLogic.h:142
Abstract interface for instance editor widgets.
Definition: DtKeyMappingEditorWidgetInterface.h:26
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
Contains makVrv::DtKeyMap and related classes.
DtPersistenceControlsInterface & myToolbar
Definition: DtKeyMappingEditorLogic.h:126

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)