VR-Forces 4.3.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DtChannelKeywordGridLines.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2011 MAK Technologies, Inc.
3  * All rights reserved.
4  *****************************************************************************/
5 /*****************************************************************************
6  * $RCSfile: DtChannelKeywordGridLines.h,v $ $Revision: 1.11 $ $State: Exp $
7  *****************************************************************************/
8 
12 
13 #pragma once
14 
15 #include <vrvCore/vrvCore.h>
16 
18 
20 
22 
23 #include <string>
24 
25 namespace makVrv
26 {
27 
28  class DtDe;
29  class DtChannelConfiguration;
30  class DtWindowConfiguration;
31  class DtChannelGridLinesAgent;
32  class DtObserver;
33  class DtInputDriver;
34 
38  {
39  public:
40 
43 
45  virtual ~DtChannelKeywordGridLines();
46 
50  virtual void channelNameChanged( const std::string& displayName,
51  const std::string& windowName, const std::string& channelName );
52 
55  virtual void channelConfigurationChanged(
56  const DtChannelConfiguration& config );
57 
60  virtual void windowConfigurationChanged(
61  const DtWindowConfiguration& config ) {}
62 
63  protected:
64 
65  // Slots for responding to observer-related signals
66 
69  virtual void slot_observerCreated( DtInputDriver*, DtObserver* observer );
70 
73  virtual void slot_observerToBeDestroyed( DtInputDriver*, DtObserver* observer );
74 
77  virtual void slot_observerModeChanged( DtObserver* observer, int newMode );
78 
82  virtual void slot_observerModeSettingChanged( int mode, int setting );
83 
85  virtual void slot_coordinateSystemChanged( const std::string&, const std::string& );
86 
88  virtual void slot_autoSpacingSet( bool );
89 
91  virtual void slot_fixedSpacingAmountSet( makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits, double );
92 
94  virtual void slot_fixedAngularSpacingAmountSet( makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits, double );
95 
97  virtual void slot_gridTypeSet( makArchives::DtDisplayUnitsSettingsRecord::CoordSys );
98 
100  virtual void slot_unitTypeSet( makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits );
101 
103  virtual void slot_angularUnitTypeSet( makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits );
104 
106  virtual void slot_minSpacingSet( int );
107 
109  virtual void slot_xOffsetSet( makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits, double );
110 
112  virtual void slot_yOffsetSet( makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits, double );
113 
115  virtual void slot_longitudeOffsetSet( makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits, double );
116 
118  virtual void slot_latitudeOffsetSet( makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits, double );
119 
121  virtual void slot_decimalPlacesSet( makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits, unsigned );
122 
124  virtual void slot_angularDecimalPlacesSet( makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits, unsigned );
125 
126  // Helper methods
127 
128  // Set myObserver to the specified observer and connect to the observerModeChanged
129  // signal
130  virtual void connectToObserver( DtObserver* observer );
131 
132  // Look up the observer by name, cache the observer name, and call connectToObserver
133  // with the found observer
134  virtual void connectToObserver( const std::string& observerName );
135 
136  // Disconnect from the current observer's observerModeChanged signal, delete the
137  // the grid line agent if it exists, and set myObserver and myGridLineAgent
138  // to Null
139  virtual void disconnectFromObserver();
140 
141  // This function looks up the display grid lines observer setting value and creates
142  // or destroys a grid line object as needed
143  virtual void updateGridLinesState();
144 
148  virtual bool validateGridType();
149 
153  virtual bool validateUnitType();
154 
155  protected:
156 
158  DtChannelKeywordGridLines( DtDe& de, const std::string& keyword,
159  const std::string& displayName, const std::string& windowName,
160  const DtChannelConfiguration& channelConfig );
161 
163  const std::string& type );
164 
165  // Returns true if we are currently using this unit type
166  bool currentUnits( makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits unit ) const;
167  bool currentUnits( makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits unit ) const;
168 
169  protected:
170 
171  DtChannelGridLinesAgent* myGridLinesAgent;
172  std::string myObserverName;
174  std::string myKeyword;
175  std::string myDisplayName;
176  std::string myWindowName;
177  std::string myChannelName;
180  };
181 
186  {
187  public:
188 
191 
194 
196  virtual DtChannelKeywordObject* createChannelKeywordObject(DtDe& de,
197  const std::string& displayName, const std::string& windowName,
198  const DtChannelConfiguration& channelConfig );
199 
200  public:
201 
202  static std::string keyword();
203 
204  protected:
205 
206  std::string myKeyword;
207 
208  };
209 
210 }

Document ID: Generated on Wed Jul 29 00:55:00 EDT 2015 from SVN revision 155257
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)