VR-Forces 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) 2023 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( DtModelSetId 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 
94  virtual void setColorControlEnabled(bool enabled);
95 
99  virtual void setColorControlInvert(bool enabled);
100 
104  virtual void setColorControlContrast(double value);
105 
109  virtual void setColorControlBrightness(double value);
110 
114  virtual void setColorControlColorMix(double value);
115 
116  virtual void createObserver( const std::string& ObserverName );
117  virtual void deleteObserver( const std::string& ObserverName );
118  virtual void renameObserver( const std::string& oldName, const std::string& newName );
119 
120  virtual void createObserverMode( const std::string& ObserverModeName );
121  virtual void deleteObserverMode( const std::string& ObserverModeName );
122  virtual void renameObserverMode( const std::string& oldName, const std::string& newName );
123 
124  protected:
125 
126  virtual void observerModesRestored(const DtSettingsBackup*);
127 
129  void setupValues();
130 
131  // called by setupValues, and also when projection or model set changes
132  // the update the settings pane
133  void setupSettings();
134 
135  void setupSpeedSliders();
136  void setupModelScaleFactorSlider();
137  void setupModelScaleTypeSelector();
138  void setupMaxModelScaleFactorSpinBox();
139 
140  void setupObserverList();
141  void setupModelScaleTypeList();
142  void setupObserverModeList();
143 
145  void setupNorthTypeList();
146 
147  std::string projectionToString( bool is2D );
148  bool projectionFromString( const std::string& is2D );
149 
151  virtual void onExport();
152 
154  virtual void onExportSelected();
155 
158  virtual void onExportFilenameChosen(const std::string&, bool selected);
159 
162  virtual void onImport();
163 
166  virtual void onImportFilenameChosen(const std::string&);
167 
170  virtual void onMerge();
171 
174  virtual void onMergeFilenameChosen( const std::string& );
175 
176  virtual void updateDeleteEnabledState( const std::string& channelKeyToIgnore = "" );
177 
178  virtual void setCurrentObserverSelected();
179 
180  protected:
181  void slot_observerModeNameChanged( int modeId );
182  void slot_observerModeSettingChanged( int modeId );
183 
186  void slot_channelConfigurationModified();
187 
190  void slot_channelToBeDestroyed(const std::string& displayName,
191  const std::string& windowName, const std::string& channelName );
192 
195  void slot_channelConfigurationAdded();
196 
200  void slot_sensorAdded(DtSensor* sensor);
201 
205  void slot_sensorRemoved(DtSensor* sensor);
206 
210  void slot_sensorRenamed(DtSensor* sensor, const std::string& oldName);
211 
213  void slot_observerCreated( DtInputDriver* inputDriver,
214  DtObserver* observer );
215 
217  void slot_observerAboutToBeDestroyed( DtInputDriver* inputDriver,
218  DtObserver* observer );
219 
221  void slot_observerModeChanged( DtObserver* observer, int newObserverMode );
222 
223  protected:
228  // We need this so we don't make an observer that's being deleted the
229  // new selected observer
231  };
232 }
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:226
Abstract interface for controlling persistence of state in a dialog.
Definition: DtPersistenceControlsInterface.h:20
SpeedScalingMode
Definition: DtObserverObject.h:56
A facade for a DtObserverObject.
Definition: DtObserver.h:38
Contains makVrv::DtObserverObject class declaration.
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:227
NorthType
Definition: DtObserverObject.h:62
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:76
DtModelSetId
Definition: DtModelSetEnums.h:19
voidpf uLong offset
Definition: ioapi.h:42
DtObserver * myObserverBeingDeleted
Definition: DtObserverSettingsLogic.h:230
DtDe & myDe
Definition: DtObserverSettingsLogic.h:224
DtObserverSettingsInterface * myEditorInterface
Definition: DtObserverSettingsLogic.h:225

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)