VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtChannelKeywordGridLines.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 <vrvCore/vrvCore.h>
13 
15 
17 
19 
20 #include <string>
21 
22 namespace makVrv
23 {
24 
25  class DtDe;
26  class DtChannelConfiguration;
27  class DtWindowConfiguration;
28  class DtChannelGridLinesAgent;
29  class DtObserver;
30  class DtInputDriver;
31 
35  {
36  public:
37 
40 
42  virtual ~DtChannelKeywordGridLines();
43 
47  virtual void channelNameChanged( const std::string& displayName,
48  const std::string& windowName, const std::string& channelName );
49 
52  virtual void channelConfigurationChanged(
53  const DtChannelConfiguration& config );
54 
58  const DtWindowConfiguration& config ) {}
59 
60  protected:
61 
62  // Slots for responding to observer-related signals
63 
66  virtual void slot_observerCreated( DtInputDriver* inputDriver, DtObserver* observer );
67 
70  virtual void slot_observerToBeDestroyed( DtInputDriver* inputDriver, DtObserver* observer );
71 
74  virtual void slot_observerModeChanged( DtObserver* observer, int newMode );
75 
79  virtual void slot_observerModeSettingChanged( int mode, int setting );
80 
84  virtual void slot_observerModeIs2DChanged( int mode );
85 
87  virtual void slot_coordinateSystemChanged( const std::string&, const std::string& );
88 
90  virtual void slot_northSouthColorChanged( float r, float g, float b, float a );
91 
93  virtual void slot_eastWestColorChanged( float r, float g, float b, float a );
94 
96  virtual void slot_minimalGridlineLabelsEnabled( bool isMinimalEnabled );
97 
99  virtual void slot_autoSpacingSet( bool isAutoSpacingSet );
100 
102  virtual void slot_fixedSpacingAmountSet( makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits unit, double fixedSpacingAmount );
103 
105  virtual void slot_fixedAngularSpacingAmountSet( makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits unit, double fixedAngularSpacingAmount );
106 
108  virtual void slot_gridTypeSet( makArchives::DtDisplayUnitsSettingsRecord::CoordSys cs );
109 
111  virtual void slot_unitTypeSet( makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits unit );
112 
114  virtual void slot_angularUnitTypeSet( makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits unit );
115 
117  virtual void slot_minSpacingSet( int minSpacing );
118 
120  virtual void slot_xOffsetSet( makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits unit, double xOffset);
121 
123  virtual void slot_yOffsetSet( makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits unit, double yOffset );
124 
126  virtual void slot_longitudeOffsetSet(makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits unit, double lonOffset );
127 
129  virtual void slot_latitudeOffsetSet( makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits unit, double latOffset );
130 
132  virtual void slot_decimalPlacesSet( makArchives::DtDisplayUnitsSettingsRecord::CoordSys cs, makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits unit, unsigned int decimals );
133 
135  virtual void slot_angularDecimalPlacesSet( makArchives::DtDisplayUnitsSettingsRecord::CoordSys cs, makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits unit, unsigned int decimals );
136 
137  // Helper methods
138 
139  // Set myObserver to the specified observer and connect to the observerModeChanged
140  // signal
141  virtual void connectToObserver( DtObserver* observer );
142 
143  // Look up the observer by name, cache the observer name, and call connectToObserver
144  // with the found observer
145  virtual void connectToObserver( const std::string& observerName );
146 
147  // Disconnect from the current observer's observerModeChanged signal, delete the
148  // the grid line agent if it exists, and set myObserver and myGridLineAgent
149  // to Null
150  virtual void disconnectFromObserver();
151 
152  // This function looks up the display grid lines observer setting value and creates
153  // or destroys a grid line object as needed
154  virtual void updateGridLinesState();
155 
159  virtual bool validateGridType();
160 
164  virtual bool validateUnitType();
165 
166  protected:
167 
169  DtChannelKeywordGridLines( DtDe& de, const std::string& keyword,
170  const std::string& displayName, const std::string& windowName,
171  const DtChannelConfiguration& channelConfig );
172 
174  const std::string& type );
175 
176  // Returns true if we are currently using this unit type
177  bool currentUnits( makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits unit ) const;
178  bool currentUnits( makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits unit ) const;
179 
180  protected:
181 
182  DtChannelGridLinesAgent* myGridLinesAgent;
183  std::string myObserverName;
185  std::string myKeyword;
186  std::string myDisplayName;
187  std::string myWindowName;
188  std::string myChannelName;
191  };
192 
197  {
198  public:
199 
202 
205 
207  virtual DtChannelKeywordObject* createChannelKeywordObject(DtDe& de,
208  const std::string& displayName, const std::string& windowName,
209  const DtChannelConfiguration& channelConfig );
210 
211  public:
212 
213  static std::string keyword();
214 
215  protected:
216 
217  std::string myKeyword;
218 
219  };
220 
221 }
The base class for all channel keyword objects.
Definition: DtChannelKeywordObject.h:25
makArchives::DtDisplayUnitsSettingsRecord::CoordSys myGridType
Definition: DtChannelKeywordGridLines.h:190
std::string myKeyword
Definition: DtChannelKeywordGridLines.h:185
virtual void windowConfigurationChanged(const DtWindowConfiguration &config)
Implementing objects use this method to respond to changes in window configuration other than name...
Definition: DtChannelKeywordGridLines.h:57
The base class for all channel keyword objects.
Definition: DtChannelKeywordGridLines.h:34
This owns a list of channel configurations.
Definition: DtWindowConfiguration.h:28
std::string myDisplayName
Definition: DtChannelKeywordGridLines.h:186
CoordSys
Enumeration of the different coordinate system types.
Definition: DtDisplayUnitsSettingsRecord.h:30
DistanceUnits
Enumeration of the different distance units.
Definition: DtDisplayUnitsSettingsRecord.h:56
std::string myObserverName
Definition: DtChannelKeywordGridLines.h:183
Contains makVrv::DtChannelKeywordObject class.
The polymorphic creator for the DtChannelKeywordObject.
Definition: DtChannelKeywordObject.h:68
A facade for a DtObserverObject.
Definition: DtObserver.h:37
std::string myKeyword
Definition: DtChannelKeywordGridLines.h:217
std::string myChannelName
Definition: DtChannelKeywordGridLines.h:188
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
This class&#39;s main responsibility is to handle keyboard and mouse events from OSG (Qt events are route...
Definition: DtInputDriver.h:43
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
DtChannelGridLinesAgent * myGridLinesAgent
Definition: DtChannelKeywordGridLines.h:182
DtObserver * myObserver
Definition: DtChannelKeywordGridLines.h:184
Contains the DtGridLinesSettingsRecord class declaration.
OrientationUnits
Enumeration of the different orientation units.
Definition: DtDisplayUnitsSettingsRecord.h:101
Base class to provide boost signal/slot management.
std::string myWindowName
Definition: DtChannelKeywordGridLines.h:187
Configuration for a single channel Serialized and sent to remote displays as necessary to configure r...
Definition: DtChannelConfiguration.h:26
const char int mode
Definition: ioapi.h:38
DtSignalConnectionManager myConnections
Definition: DtChannelKeywordGridLines.h:189
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
The polymorphic creator for DtChannelKeywordGridLines.
Definition: DtChannelKeywordGridLines.h:195
Contains DLL export macros.

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)