VR-Forces Development_Version 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 
87  virtual void slot_observerModeIs2DChanged( int mode );
88 
90  virtual void slot_coordinateSystemChanged( const std::string&, const std::string& );
91 
93  virtual void slot_autoSpacingSet( bool );
94 
96  virtual void slot_fixedSpacingAmountSet( makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits, double );
97 
99  virtual void slot_fixedAngularSpacingAmountSet( makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits, double );
100 
102  virtual void slot_gridTypeSet( makArchives::DtDisplayUnitsSettingsRecord::CoordSys );
103 
105  virtual void slot_unitTypeSet( makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits );
106 
108  virtual void slot_angularUnitTypeSet( makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits );
109 
111  virtual void slot_minSpacingSet( int );
112 
114  virtual void slot_xOffsetSet( makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits, double );
115 
117  virtual void slot_yOffsetSet( makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits, double );
118 
120  virtual void slot_longitudeOffsetSet( makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits, double );
121 
123  virtual void slot_latitudeOffsetSet( makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits, double );
124 
126  virtual void slot_decimalPlacesSet( makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits, unsigned );
127 
129  virtual void slot_angularDecimalPlacesSet( makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits, unsigned );
130 
131  // Helper methods
132 
133  // Set myObserver to the specified observer and connect to the observerModeChanged
134  // signal
135  virtual void connectToObserver( DtObserver* observer );
136 
137  // Look up the observer by name, cache the observer name, and call connectToObserver
138  // with the found observer
139  virtual void connectToObserver( const std::string& observerName );
140 
141  // Disconnect from the current observer's observerModeChanged signal, delete the
142  // the grid line agent if it exists, and set myObserver and myGridLineAgent
143  // to Null
144  virtual void disconnectFromObserver();
145 
146  // This function looks up the display grid lines observer setting value and creates
147  // or destroys a grid line object as needed
148  virtual void updateGridLinesState();
149 
153  virtual bool validateGridType();
154 
158  virtual bool validateUnitType();
159 
160  protected:
161 
163  DtChannelKeywordGridLines( DtDe& de, const std::string& keyword,
164  const std::string& displayName, const std::string& windowName,
165  const DtChannelConfiguration& channelConfig );
166 
168  const std::string& type );
169 
170  // Returns true if we are currently using this unit type
171  bool currentUnits( makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits unit ) const;
172  bool currentUnits( makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits unit ) const;
173 
174  protected:
175 
176  DtChannelGridLinesAgent* myGridLinesAgent;
177  std::string myObserverName;
179  std::string myKeyword;
180  std::string myDisplayName;
181  std::string myWindowName;
182  std::string myChannelName;
185  };
186 
191  {
192  public:
193 
196 
199 
201  virtual DtChannelKeywordObject* createChannelKeywordObject(DtDe& de,
202  const std::string& displayName, const std::string& windowName,
203  const DtChannelConfiguration& channelConfig );
204 
205  public:
206 
207  static std::string keyword();
208 
209  protected:
210 
211  std::string myKeyword;
212 
213  };
214 
215 }

Document ID: Generated on Tue Mar 8 22:13:38 EST 2016 from SVN revision 162938
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)