VR-Forces Developer's Guide
 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) 2026 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvCoreQt/vrvCoreQt.h>
13 #include <vrvCore/DtKeyMap.h>
15 #include <QtCore/QString>
16 
17 namespace makVrv
18 {
19  class DtDe;
20  class DtKeyMappingEditorWidgetInterface;
21  class DtPersistenceControlsInterface;
22  class DtSelectInstanceWidget;
23  class DtKeyMapManager;
24 
28  {
29  public:
30 
34 
36  virtual ~DtKeyMappingEditorLogic();
37 
39  void editKeyMapping();
40 
42  void addKeyMapping();
43 
45  void removeKeyMapping();
46 
48  void filterChanged( int functionCategory );
49 
51  void selectFunction( const std::string& functionName );
52 
54  void selectKeyMapping( const DtKeyMapping& keyMapping );
55 
57  void selectKeyMap( const std::string& keyMapping );
58 
60  void deselectFunctions();
61 
64  void requestInputCanceled();
65 
68  void requestInputAccepted( const DtKeyMapping& keyMapping, bool isEdit );
69 
73  void requestKeyValidationAccepted( const DtKeyMapping& keyMapping,
74  const DtKeyFunctionNameList& fnList, bool isEdit, bool replace );
75 
76  protected:
77  virtual void setupGui();
78 
79  void setupFilters();
80  void setupAllKeyFunctions();
81  void setupKeyFunctions();
82  void setupBinaryKeyFunctions();
83  void updateAfterMappingChange();
84 
85  std::string keyMappingsToString(
86  const DtKeyMap::MappedKeyList& keyList,
87  bool suppressDirection=false );
88 
89  std::string mapNameFromFileName( const std::string& filename );
90 
91  protected:
93  virtual void slot_currentInstanceChanged(int index, const std::string& keyMap);
94 
96  virtual void slot_keyMapRestored(DtKeyMapManager*, const std::string& map);
97 
99  virtual void onExport();
100 
103  virtual void onExportFilenameChosen(const std::string&);
104 
106  virtual void onImport();
107 
110  virtual void onImportFilenameChosen(const std::string&);
111 
113  virtual void slot_renameInstanceRequested();
114 
116  virtual void slot_newInstanceRequested();
117 
119  virtual void slot_deleteInstanceRequested();
120 
122  virtual QString askForKeyMapName(QString initial, const QString& title) const;
123 
124  protected:
125 
131  int myFilter;
132 
135 
138 
141 
144 
146  std::string myKeyMapName;
147 
150  };
151 }
std::string myCurrentFunctionSelection
The currently selected function in the function list.
Definition: DtKeyMappingEditorLogic.h:134
DtSelectInstanceWidget & mySelectedInstance
Definition: DtKeyMappingEditorLogic.h:129
DtKeyMapping myCurrentKeyMapping
The currently selected key mapping in the key mapping list.
Definition: DtKeyMappingEditorLogic.h:140
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:146
int myFilter
current function filter in use
Definition: DtKeyMappingEditorLogic.h:131
DtDe & myDe
Definition: DtKeyMappingEditorLogic.h:126
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. There is such a list associated with each key/modifier combo f...
Definition: DtKeyMap.h:37
Abstract interface for controlling persistence of state in a dialog.
Definition: DtPersistenceControlsInterface.h:20
DtKeyMappingEditorWidgetInterface & myInterface
Definition: DtKeyMappingEditorLogic.h:128
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:31
The logic for the makVrv::DtKeyMappingEditor.
Definition: DtKeyMappingEditorLogic.h:27
bool myCurrentFunctionIsBinary
Indicates if the current function selection is a binary function.
Definition: DtKeyMappingEditorLogic.h:137
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
DtKeyMap * myKeyMap
pointer to the temporary, workspace key map
Definition: DtKeyMappingEditorLogic.h:143
Base class to provide boost signal/slot management.
Abstract interface for instance editor widgets.
Definition: DtKeyMappingEditorWidgetInterface.h:26
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:76
Contains makVrv::DtKeyMap and related classes.
DtSignalConnectionManager myConnections
Auto-disconnects on destruction; avoids singleton lookups in the DTOR.
Definition: DtKeyMappingEditorLogic.h:149
DtPersistenceControlsInterface & myToolbar
Definition: DtKeyMappingEditorLogic.h:127

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)