VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtChannelKeywordCompass.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2021 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvCore/vrvCore.h>
14 
16 
17 #include <string>
18 
19 namespace makVrv
20 {
21  class DtDe;
22  class DtChannelConfiguration;
23  class DtWindowConfiguration;
24  class DtChannelCompassAgent;
25  class DtObserver;
26  class DtObserverObject;
27  class DtInputDriver;
28 
32  {
33  public:
34 
38 
40  virtual ~DtChannelKeywordCompass();
41 
43  DtChannelKeywordCompass() = delete;
44 
46  DtChannelKeywordCompass(const DtChannelKeywordCompass &other) = delete;
47 
49  DtChannelKeywordCompass &operator=(const DtChannelKeywordCompass &other) = delete;
50 
54  virtual void channelNameChanged( const std::string& displayName,
55  const std::string& windowName, const std::string& channelName );
56 
59  virtual void channelConfigurationChanged(
60  const DtChannelConfiguration& config );
61 
65  const DtWindowConfiguration& config ) {}
66 
68  DtChannelCompassAgent* compassAgent();
69 
70  protected:
71 
72  // Slots for responding to observer-related signals
73 
74  // Called when an observer is created, so that we can connect to an observer that
75  // didn't exist when the compass itself was created
76  virtual void slot_observerCreated( DtInputDriver*, DtObserver* observer );
77 
78  // Called when an observer is about to be destroyed, so we can disconnect from the
79  // observer mode changed signal and set myObserver to Null
80  virtual void slot_observerToBeDestroyed( DtInputDriver*, DtObserver* observer );
81 
82  // Called when an observer's observer mode changes, so we can determine if we need
83  // to create or destroy a compass
84  virtual void slot_observerModeChanged( DtObserver* observer, int newMode );
85 
86  // Called when an observer mode's setting changes; if its the mode our observer is
87  // using and the setting is DisplayCompass, we may need to create or destroy
88  // a compass
89  virtual void slot_observerModeSettingChanged( int mode, int setting );
90 
91  // Called when an observer projection setting changes; if its the mode our observer is
92  // using, we may need to create or destroy a compass
93  virtual void slot_observerProjectionChanged(DtObserverObject* observerObject, bool is2D);
94 
95  // Helper methods
96 
97  // Set myObserver to the specified observer and connect to the observerModeChanged
98  // signal
99  virtual void connectToObserver( DtObserver* observer );
100 
101  // Look up the observer by name, cache the observer name, and call connectToObserver
102  // with the found observer
103  virtual void connectToObserver( const std::string& observerName );
104 
105  // Disconnect from the current observer's observerModeChanged signal, delete the
106  // the compass agent if it exists, and set myObserver and myCompassAgent
107  // to Null
108  virtual void disconnectFromObserver();
109 
110  // This function looks up the display compass observer setting value and creates
111  // or destroys a compass as needed
112  virtual void updateCompassState();
113 
114  protected:
115 
117  DtChannelKeywordCompass( DtDe& de, const std::string& keyword,
118  const std::string& displayName, const std::string& windowName,
119  const DtChannelConfiguration& channelConfig, bool is2D );
120 
121  protected:
122 
123  DtChannelCompassAgent* myCompassAgent;
124  std::string myObserverName;
126  std::string myKeyword;
127  std::string myDisplayName;
128  std::string myWindowName;
129  std::string myChannelName;
131  bool myIs2D;
132  };
133 
137  {
138  public:
141 
144 
147 
150 
152  virtual DtChannelKeywordObject* createChannelKeywordObject(DtDe& de,
153  const std::string& displayName, const std::string& windowName,
154  const DtChannelConfiguration& channelConfig );
155 
156  public:
157  static std::string keyword();
158 
159  protected:
160  std::string myKeyword;
161  };
162 
163 
167  {
168  public:
171 
174 
177 
180 
182  virtual DtChannelKeywordObject* createChannelKeywordObject(DtDe& de,
183  const std::string& displayName, const std::string& windowName,
184  const DtChannelConfiguration& channelConfig );
185 
186  public:
187  static std::string keyword();
188 
189  protected:
190  std::string myKeyword;
191  };
192 
193 }
194 
195 
The base class for all channel keyword objects.
Definition: DtChannelKeywordObject.h:25
DtObserver * myObserver
Definition: DtChannelKeywordCompass.h:125
virtual void windowConfigurationChanged(const DtWindowConfiguration &config)
Implementing objects use this method to respond to changes in window configuration other than name...
Definition: DtChannelKeywordCompass.h:64
This owns a list of channel configurations.
Definition: DtWindowConfiguration.h:28
The base class for all channel keyword objects.
Definition: DtChannelKeywordCompass.h:31
std::string myChannelName
Definition: DtChannelKeywordCompass.h:129
std::string myKeyword
Definition: DtChannelKeywordCompass.h:160
std::string myObserverName
Definition: DtChannelKeywordCompass.h:124
std::string myKeyword
Definition: DtChannelKeywordCompass.h:126
bool myIs2D
Definition: DtChannelKeywordCompass.h:131
std::string myKeyword
Definition: DtChannelKeywordCompass.h:190
Contains makVrv::DtChannelKeywordObject class.
std::string myWindowName
Definition: DtChannelKeywordCompass.h:128
The polymorphic creator for the DtChannelKeywordObject.
Definition: DtChannelKeywordObject.h:68
A facade for a DtObserverObject.
Definition: DtObserver.h:37
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
This abstract base class defines the interface for OS-specific keyboard and mouse event listeners...
Definition: DtObserverObject.h:29
The polymorphic creator for the DtChannelKeywordSmallCompass.
Definition: DtChannelKeywordCompass.h:166
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
DtChannelCompassAgent * myCompassAgent
Definition: DtChannelKeywordCompass.h:123
Base class to provide boost signal/slot management.
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
std::string myDisplayName
Definition: DtChannelKeywordCompass.h:127
The polymorphic creator for the DtChannelKeywordLargeCompass.
Definition: DtChannelKeywordCompass.h:136
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
DtSignalConnectionManager myConnections
Definition: DtChannelKeywordCompass.h:130
Contains DLL export macros.

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)