VR-Forces 4.8 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) 2010 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 /******************************************************************************
6 ** $RCSfile: DtChannelKeywordCompass.h,v $ $Revision: 1.11 $ $State: Exp $
7 ******************************************************************************/
8 
12 
13 #pragma once
14 
15 #include <vrvCore/vrvCore.h>
17 
19 
20 #include <string>
21 
22 namespace makVrv
23 {
24  class DtDe;
25  class DtChannelConfiguration;
26  class DtWindowConfiguration;
27  class DtChannelCompassAgent;
28  class DtObserver;
29  class DtInputDriver;
30 
34  {
35  public:
36 
40 
42  virtual ~DtChannelKeywordCompass();
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 
61  DtChannelCompassAgent* compassAgent();
62 
63  protected:
64 
65  // Slots for responding to observer-related signals
66 
67  // Called when an observer is created, so that we can connect to an observer that
68  // didn't exist when the compass itself was created
69  virtual void slot_observerCreated( DtInputDriver*, DtObserver* observer );
70 
71  // Called when an observer is about to be destroyed, so we can disconnect from the
72  // observer mode changed signal and set myObserver to Null
73  virtual void slot_observerToBeDestroyed( DtInputDriver*, DtObserver* observer );
74 
75  // Called when an observer's observer mode changes, so we can determine if we need
76  // to create or destroy a compass
77  virtual void slot_observerModeChanged( DtObserver* observer, int newMode );
78 
79  // Called when an observer mode's setting changes; if its the mode our observer is
80  // using and the setting is DisplayCompass, we may need to create or destroy
81  // a compass
82  virtual void slot_observerModeSettingChanged( int mode, int setting );
83 
84  // Helper methods
85 
86  // Set myObserver to the specified observer and connect to the observerModeChanged
87  // signal
88  virtual void connectToObserver( DtObserver* observer );
89 
90  // Look up the observer by name, cache the observer name, and call connectToObserver
91  // with the found observer
92  virtual void connectToObserver( const std::string& observerName );
93 
94  // Disconnect from the current observer's observerModeChanged signal, delete the
95  // the compass agent if it exists, and set myObserver and myCompassAgent
96  // to Null
97  virtual void disconnectFromObserver();
98 
99  // This function looks up the display compass observer setting value and creates
100  // or destroys a compass as needed
101  virtual void updateCompassState();
102 
103  protected:
104 
106  DtChannelKeywordCompass( DtDe& de, const std::string& keyword,
107  const std::string& displayName, const std::string& windowName,
108  const DtChannelConfiguration& channelConfig );
109 
110  protected:
111 
112  DtChannelCompassAgent* myCompassAgent;
113  std::string myObserverName;
115  std::string myKeyword;
116  std::string myDisplayName;
117  std::string myWindowName;
118  std::string myChannelName;
120  };
121 
125  {
126  public:
129 
132 
134  virtual DtChannelKeywordObject* createChannelKeywordObject(DtDe& de,
135  const std::string& displayName, const std::string& windowName,
136  const DtChannelConfiguration& channelConfig );
137 
138  public:
139  static std::string keyword();
140 
141  protected:
142  std::string myKeyword;
143  };
144 
145 
149  {
150  public:
153 
156 
158  virtual DtChannelKeywordObject* createChannelKeywordObject(DtDe& de,
159  const std::string& displayName, const std::string& windowName,
160  const DtChannelConfiguration& channelConfig );
161 
162  public:
163  static std::string keyword();
164 
165  protected:
166  std::string myKeyword;
167  };
168 }
169 
170 
The base class for all channel keyword objects.
Definition: DtChannelKeywordObject.h:28
DtObserver * myObserver
Definition: DtChannelKeywordCompass.h:114
virtual void windowConfigurationChanged(const DtWindowConfiguration &config)
Implementing objects use this method to respond to changes in window configuration other than name...
Definition: DtChannelKeywordCompass.h:57
This owns a list of channel configurations.
Definition: DtWindowConfiguration.h:31
The base class for all channel keyword objects.
Definition: DtChannelKeywordCompass.h:33
std::string myChannelName
Definition: DtChannelKeywordCompass.h:118
std::string myKeyword
Definition: DtChannelKeywordCompass.h:142
std::string myObserverName
Definition: DtChannelKeywordCompass.h:113
std::string myKeyword
Definition: DtChannelKeywordCompass.h:115
std::string myKeyword
Definition: DtChannelKeywordCompass.h:166
Contains makVrv::DtChannelKeywordObject class.
std::string myWindowName
Definition: DtChannelKeywordCompass.h:117
The polymorphic creator for the DtChannelKeywordObject.
Definition: DtChannelKeywordObject.h:71
A facade for a DtObserverObject.
Definition: DtObserver.h:37
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
The polymorphic creator for the DtChannelKeywordSmallCompass.
Definition: DtChannelKeywordCompass.h:148
This class&#39;s main responsibility is to handle keyboard and mouse events from OSG (Qt events are route...
Definition: DtInputDriver.h:44
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:24
DtChannelCompassAgent * myCompassAgent
Definition: DtChannelKeywordCompass.h:112
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:116
The polymorphic creator for the DtChannelKeywordLargeCompass.
Definition: DtChannelKeywordCompass.h:124
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
DtSignalConnectionManager myConnections
Definition: DtChannelKeywordCompass.h:119
Contains DLL export macros.

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)