VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtCockpitMappingEditorLogic.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2020 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
14 #include <QtCore/QStringList>
15 #include <vlpi/entityType.h>
16 
17 namespace makVrv
18 {
19  class DtDe;
20  class DtEntityMappingEditorInterface;
21  class DtEntityTypeMapEditorInterface;
22  class DtEntityTypeMapper;
23  class DtModelDefinition;
24  class DtMultiMapEditorInterface;
25  class DtPersistenceControlsInterface;
26  class DtSettingsChangeObject;
27  class DtSharedSimulationSettingsManager;
28  class DtSharedCockpitSettingsManager;
29  class DtSharedCockpitSettings;
30  class DtSharedCockpitTypeMapper;
31  class DtUnicode;
32  class DtPage;
33 
37  {
38  public:
41  const std::string& definitionSchema,
42  DtEntityMappingEditorInterface& editorInterface,
43  DtEntityTypeMapEditorInterface& entityTypeMapInterface,
44  DtMultiMapEditorInterface& mapInterface,
45  DtPersistenceControlsInterface& toolbarInterface,
46  DtPage* page = 0);
47 
48  virtual ~DtCockpitMappingEditorLogic();
49 
50  virtual void rebuildDefinitions();
51 
53  const DtEntityTypeMapper& currentMapper( const DtReadSettingsLock<DtSharedCockpitSettings>& settings) const;
54 
55  virtual void on_modelDefinitionAdded( const DtModelDefinition& definition );
56  virtual void on_modelDefinitionToBeDestroyed( const DtModelDefinition& definition );
57  virtual void modelDefinitionChanged(const DtSettingsChangeObject*);
58 
60  virtual void checkIfModified();
61 
62  protected:
63 
64  void updatePossibleValues();
65 
68  void on_changeFilePath();
69 
70  void updateSettings();
71 
72  void refreshPage();
73 
76  void reloadFileLocationBar();
77 
78  void buildFiltersFromDefinitions();
79 
80  virtual void on_addValue(const std::string& name,
81  const std::string& value, int index);
82  virtual void on_changeValue(const std::string& name,
83  const std::string& oldValue,const std::string& value, int index);
84  virtual void on_deleteValue(const std::vector<std::string>& name,
85  const std::vector<std::string>& value);
86  virtual void on_renameValue(const std::string& oldName,
87  const std::string& value,const std::string& newName);
88  virtual void on_itemSelected(const std::string& itemName);
89 
90  virtual void on_import();
91  virtual void on_merge();
92  virtual void on_export();
93  virtual void on_exportSelected();
94  virtual void on_importFilePathChosen(const std::string& filePath);
95  virtual void on_mergeFilePathChosen(const std::string& filePath);
96  virtual void on_exportFilePathChosen(const std::string& filePath);
97  virtual void on_exportSelectedFilePathChosen(const std::string& filePath);
98  virtual void on_filterChanged(const DtUnicode& filter);
99  virtual void on_lookupChanged(bool filterByType, const std::string& filter);
100  virtual void on_resetFilters();
101 
102  void entityTypeMappingsRestored(const DtSettingsBackup* s);
103 
104  void askForNewElementDefinitionForEntityType(std::string entType);
105 
106  protected:
114  QStringList myDefinitions;
115  std::string myDefinitionSchema;
116  DtEntityType myLookupType;
117  DtSharedCockpitTypeMapper* myMapperObject;
119  };
120 } //makVrv::
#define DT_DLL_VRVGLSTUDIO_QT
Definition: DtGlStudioQt.h:21
a read settings lock on a setting object.
Definition: DtReadSettingsLock.h:51
A unicode string.
Definition: DtUnicode.h:33
DtPersistenceControlsInterface & myToolbarInterface
Definition: DtCockpitMappingEditorLogic.h:113
Logic for editing mappings from entities to cockpits.
Definition: DtCockpitMappingEditorLogic.h:36
Contains makVrv::DtSharedCockpitSettings class.
An EntityType to Definition mapper.
Definition: DtEntityTypeMapper.h:33
DtMultiMapEditorInterface & myMapInterface
Definition: DtCockpitMappingEditorLogic.h:112
DtDe & myDe
Definition: DtCockpitMappingEditorLogic.h:107
Abstract interface for controlling persistence of state in a dialog.
Definition: DtPersistenceControlsInterface.h:20
A model definition Interaction any number of named parameters, and also can be used to store cached d...
Definition: DtModelDefinition.h:33
DtSharedSimulationSettingsManager & myManager
Definition: DtCockpitMappingEditorLogic.h:109
QStringList myDefinitions
Definition: DtCockpitMappingEditorLogic.h:114
DtSharedCockpitTypeMapper * myMapperObject
Definition: DtCockpitMappingEditorLogic.h:117
Interface of the makVrv::DtMultiMapEditorWidget for the makVrv::DtMultiMapEditorLogic.
Definition: DtMultiMapEditorInterface.h:21
DtPage * myPage
Definition: DtCockpitMappingEditorLogic.h:118
DtSignalConnectionManager myConnections
Definition: DtCockpitMappingEditorLogic.h:108
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:24
The page is a single widget component which is viewed in a page collection.
Definition: DtPage.h:30
Provides a method of doign settings backup.
Definition: DtSettingsBackup.h:26
a write settings lock on a setting object.
Definition: DtWriteSettingsLock.h:50
An abstract interface for the DtEntityTypeMapEditorWidget.
Definition: DtEntityTypeMapEditorInterface.h:19
std::string myDefinitionSchema
Definition: DtCockpitMappingEditorLogic.h:115
Base class to provide boost signal/slot management.
makVrv::DtSettingsChangeObject is a base class for all settings change objects
Definition: DtSettingsChangeManager.h:34
DtEntityTypeMapEditorInterface & myEntityTypeMapInterface
Definition: DtCockpitMappingEditorLogic.h:111
The shared settings manager handles low level access to the settings.
Definition: DtSharedSimulationSettingsManager.h:46
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
DtEntityType myLookupType
Definition: DtCockpitMappingEditorLogic.h:116
DtEntityMappingEditorInterface & myEditorInterface
Definition: DtCockpitMappingEditorLogic.h:110
This DtEntityMappingEditorInterface provides a generic interface for common entity type editing opera...
Definition: DtEntityMappingEditorInterface.h:21

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)