VR-Forces 4.8 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 /*******************************************************************************
6 ** $RCSfile: DtKeyMappingEditorLogic.h,v $ $Revision: 1.12 $ $State: Exp $
7 *******************************************************************************/
8 
12 
13 #pragma once
14 
15 #include <vrvCoreQt/vrvCoreQt.h>
16 #include <vrvCore/DtKeyMap.h>
17 #include <QtCore/QString>
18 
19 namespace makVrv
20 {
21  class DtDe;
22  class DtKeyMappingEditorWidgetInterface;
23  class DtPersistenceControlsInterface;
24  class DtSelectInstanceWidget;
25  class DtKeyMapManager;
26 
30  {
31  public:
32 
36 
38  virtual ~DtKeyMappingEditorLogic();
39 
41  void editKeyMapping();
42 
44  void addKeyMapping();
45 
47  void removeKeyMapping();
48 
50  void filterChanged( int functionCategory );
51 
53  void selectFunction( const std::string& functionName );
54 
56  void selectKeyMapping( const DtKeyMapping& keyMapping );
57 
59  void selectKeyMap( const std::string& keyMapping );
60 
62  void deselectFunctions();
63 
66  void requestInputCanceled();
67 
70  void requestInputAccepted( const DtKeyMapping& keyMapping, bool isEdit );
71 
75  void requestKeyValidationAccepted( const DtKeyMapping& keyMapping,
76  const DtKeyFunctionNameList& fnList, bool isEdit, bool replace );
77 
78  protected:
79  virtual void setupGui();
80 
81  void setupFilters();
82  void setupAllKeyFunctions();
83  void setupKeyFunctions();
84  void setupBinaryKeyFunctions();
85  void updateAfterMappingChange();
86 
87  std::string keyMappingsToString(
88  const DtKeyMap::MappedKeyList& keyList,
89  bool suppressDirection=false );
90 
91  std::string mapNameFromFileName( const std::string& filename );
92 
93  protected:
95  virtual void slot_currentInstanceChanged(int index, const std::string& keyMap);
96 
98  virtual void slot_keyMapRestored(DtKeyMapManager*, const std::string& map);
99 
101  virtual void onExport();
102 
105  virtual void onExportFilenameChosen(const std::string&);
106 
108  virtual void onImport();
109 
112  virtual void onImportFilenameChosen(const std::string&);
113 
115  virtual void slot_renameInstanceRequested();
116 
118  virtual void slot_newInstanceRequested();
119 
121  virtual void slot_deleteInstanceRequested();
122 
124  virtual QString askForKeyMapName(QString initial, const QString& title) const;
125 
126  protected:
127 
133  int myFilter;
134 
137 
140 
143 
146 
148  std::string myKeyMapName;
149  };
150 }
std::string myCurrentFunctionSelection
The currently selected function in the function list.
Definition: DtKeyMappingEditorLogic.h:136
DtSelectInstanceWidget & mySelectedInstance
Definition: DtKeyMappingEditorLogic.h:131
DtKeyMapping myCurrentKeyMapping
The currently selected key mapping in the key mapping list.
Definition: DtKeyMappingEditorLogic.h:142
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:148
int myFilter
current function filter in use
Definition: DtKeyMappingEditorLogic.h:133
DtDe & myDe
Definition: DtKeyMappingEditorLogic.h:128
Base select instance widget.
Definition: DtSelectInstanceWidget.h:31
std::list< DtKeyMapping * > MappedKeyList
Definition: DtKeyMap.h:319
The reverse key map is a list of these for each function name.
Definition: DtKeyMap.h:249
#define DT_DLL_VRVCOREQT
Definition: vrvCoreQt.h:20
Contains DLL export macros.
A serializable list of function names.
Definition: DtKeyMap.h:40
Abstract interface for controlling persistence of state in a dialog.
Definition: DtPersistenceControlsInterface.h:20
DtKeyMappingEditorWidgetInterface & myInterface
Definition: DtKeyMappingEditorLogic.h:130
a Key Map contains a map of keys to FunctionMapEntrys, as well as a list of functions to execute when...
Definition: DtKeyMap.h:315
The manager for owning key maps.
Definition: DtKeyMapManager.h:32
The logic for the makVrv::DtKeyMappingEditor.
Definition: DtKeyMappingEditorLogic.h:29
bool myCurrentFunctionIsBinary
Indicates if the current function selection is a binary function.
Definition: DtKeyMappingEditorLogic.h:139
DtKeyMap * myKeyMap
pointer to the temporary, workspace key map
Definition: DtKeyMappingEditorLogic.h:145
Abstract interface for instance editor widgets.
Definition: DtKeyMappingEditorWidgetInterface.h:29
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:129

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)