VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtObserverSettingsLogic.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
11 
12 #include <vrvCoreQt/vrvCoreQt.h>
14 
15 namespace makVrv
16 {
17  class DtDe;
18  class DtObserverSettingsInterface;
19  class DtPersistenceControlsInterface;
20  class DtSettingsBackup;
21  class DtInputDriver;
22  class DtObserver;
23  class DtSensor;
24 
28  {
29  public:
30 
33  DtObserverSettingsInterface* observerModeEditorIf );
34 
36  virtual ~DtObserverSettingsLogic();
37 
39  virtual void setSelectedObserver( const std::string& observerName );
40 
42  virtual void setSelectedObserverMode( const std::string& ObserverModeName );
43 
44  virtual void modelSetChanged( int modelSet );
45  virtual void sensorChanged( const std::string& sensor);
46  virtual void keyMapChanged( const std::string& keyMap );
47  virtual void projectionChanged( const std::string& projection );
48  virtual void settingChanged( int settingKey, bool value );
49 
52  virtual void northTypeChanged(DtObserverObject::NorthType northType);
53 
55  virtual void setModelScaleFactor( int factor );
56 
58  virtual void setModelScaleType(const std::string& type);
59 
61  virtual void setMaxModelScaleFactor( double maxScaleFactor );
62 
64  virtual void setLinearSpeedGain( int gain );
65 
67  virtual void setRotationSpeedGain( int gain );
68 
70  virtual void setOrbitSpeedGain( int gain );
71 
73  virtual void setSpeedScalingMode(
75 
77  virtual void setSpeedScalingMslModeOffset(double offset);
78 
80  virtual void setCameraShakeIntensity(double intensity);
81 
83  virtual void setCameraShakeEnabled(bool enabled);
84 
86  virtual void setLodScaleCenterMagMinLimit(double limit);
87 
89  virtual void setLodScaleCenterEnabled(bool enabled);
90 
91  virtual void createObserver( const std::string& ObserverName );
92  virtual void deleteObserver( const std::string& ObserverName );
93  virtual void renameObserver( const std::string& oldName, const std::string& newName );
94 
95  virtual void createObserverMode( const std::string& ObserverModeName );
96  virtual void deleteObserverMode( const std::string& ObserverModeName );
97  virtual void renameObserverMode( const std::string& oldName, const std::string& newName );
98 
99  protected:
100 
101  virtual void observerModesRestored(const DtSettingsBackup*);
102 
104  void setupValues();
105 
106  // called by setupValues, and also when projection or model set changes
107  // the update the settings pane
108  void setupSettings();
109 
110  void setupSpeedSliders();
111  void setupModelScaleFactorSlider();
112  void setupModelScaleTypeSelector();
113  void setupMaxModelScaleFactorSpinBox();
114 
115  void setupObserverList();
116  void setupModelScaleTypeList();
117  void setupObserverModeList();
118 
120  void setupNorthTypeList();
121 
122  std::string projectionToString( bool is2D );
123  bool projectionFromString( const std::string& is2D );
124 
126  virtual void onExport();
127 
129  virtual void onExportSelected();
130 
133  virtual void onExportFilenameChosen(const std::string&, bool selected);
134 
137  virtual void onImport();
138 
141  virtual void onImportFilenameChosen(const std::string&);
142 
145  virtual void onMerge();
146 
149  virtual void onMergeFilenameChosen( const std::string& );
150 
151  virtual void updateDeleteEnabledState( const std::string& channelKeyToIgnore = "" );
152 
153  virtual void setCurrentObserverSelected();
154 
155  protected:
156  void slot_observerModeNameChanged( int modeId );
157  void slot_observerModeSettingChanged( int modeId );
158 
161  void slot_channelConfigurationModified();
162 
165  void slot_channelToBeDestroyed(const std::string& displayName,
166  const std::string& windowName, const std::string& channelName );
167 
170  void slot_channelConfigurationAdded();
171 
175  void slot_sensorAdded(DtSensor* sensor);
176 
180  void slot_sensorRemoved(DtSensor* sensor);
181 
185  void slot_sensorRenamed(DtSensor* sensor, const std::string& oldName);
186 
188  void slot_observerCreated( DtInputDriver* inputDriver,
189  DtObserver* observer );
190 
192  void slot_observerAboutToBeDestroyed( DtInputDriver* inputDriver,
193  DtObserver* observer );
194 
196  void slot_observerModeChanged( DtObserver* observer, int newObserverMode );
197 
198  protected:
203  // We need this so we don't make an observer that's being deleted the
204  // new selected observer
206  };
207 }
This is the interface for the DtObserverSettingsPage.
Definition: DtObserverSettingsInterface.h:21
#define DT_DLL_VRVCOREQT
Definition: vrvCoreQt.h:20
Contains DLL export macros.
DtPersistenceControlsInterface * myPersistenceInterface
Definition: DtObserverSettingsLogic.h:201
Abstract interface for controlling persistence of state in a dialog.
Definition: DtPersistenceControlsInterface.h:20
SpeedScalingMode
Definition: DtObserverObject.h:50
A facade for a DtObserverObject.
Definition: DtObserver.h:37
Contains makVrv::DtObserverObject class.
This class&#39;s main responsibility is to handle keyboard and mouse events from OSG (Qt events are route...
Definition: DtInputDriver.h:43
DtObserver * mySelectedObserver
Definition: DtObserverSettingsLogic.h:202
NorthType
Definition: DtObserverObject.h:56
Definition of a sensor.
Definition: DtSensor.h:30
Provides a method of doign settings backup.
Definition: DtSettingsBackup.h:23
Logic class for editing definition ObserverMode.
Definition: DtObserverSettingsLogic.h:27
const char int mode
Definition: ioapi.h:38
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:70
voidpf uLong offset
Definition: ioapi.h:42
DtObserver * myObserverBeingDeleted
Definition: DtObserverSettingsLogic.h:205
DtDe & myDe
Definition: DtObserverSettingsLogic.h:199
DtObserverSettingsInterface * myEditorInterface
Definition: DtObserverSettingsLogic.h:200

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)