VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtGridLinesPage.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2023 MAK Technologies, Inc.
3  * All rights reserved.
4  *****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvCoreQt/vrvCoreQt.h>
13 
15 #include <vrvCoreQt/DtPage.h>
16 
17 class QButtonGroup;
18 class QComboBox;
19 class QDoubleSpinBox;
20 class QGroupBox;
21 class QHBoxLayout;
22 class QVBoxLayout;
23 class QLabel;
24 class QRadioButton;
25 class QSpinBox;
26 class QVBoxLayout;
27 class QGridLayout;
28 class QCheckBox;
29 
30 namespace makVrv
31 {
32 
33  class DtVirtualBaseClass;
34  class DtPersistenceToolbarWidget;
35  class DtColorPushButton;
36 
40  : public DtPage, public DtGridLinesInterface
41  { Q_OBJECT;
42  public:
43 
45  DtGridLinesPage( DtDe& de, QWidget* parent = 0, Qt::WindowFlags f = 0 );
46 
48  virtual ~DtGridLinesPage();
49 
51  virtual QIcon icon() override;
52 
55  virtual DtQIconConfigurations qIconConfigurations() const override;
56 
58  virtual QString title() override;
59 
61  virtual const std::string& pageClassName() const;
62 
64  static const std::string& thePageClassName();
65 
67  virtual void setNorthSouthGridLineColor(float r, float g, float b, float a) override;
68 
70  virtual void setEastWestGridLineColor(float r, float g, float b, float a) override;
71 
73  virtual void setUseMinimalGridlineLabels(bool enabled) override;
74 
76  virtual void setAutoSpacing( bool autoSpacing ) override;
77 
79  virtual void setFixedSpacingAmount( double amount ) override;
80 
82  virtual void setMaxFixedSpacing( double maxSpacing ) override;
83 
85  virtual void setMinFixedSpacing( double minSpacing ) override;
86 
88  virtual void setGridType(makArchives::DtDisplayUnitsSettingsRecord::CoordSys gridType ) override;
89 
91  virtual void clearGridTypes() override;
92 
94  virtual void disableAllGridTypes() override;
95 
97  virtual void addGridType(const DtUnicode& gridName, makArchives::DtDisplayUnitsSettingsRecord::CoordSys gridType ) override;
98 
100  virtual void setXOffset( double offset ) override;
101 
103  virtual void setYOffset( double offset ) override;
104 
106  virtual void setMinSpacing( int pixels ) override;
107 
109  virtual void setUnitType(makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits unitType) override;
110 
111  virtual void setUnitType(makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits unitType) override;
112 
114  virtual void clearUnitTypes() override;
115 
117  virtual void setUnitTypeEnabled(makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits unitType, bool enabled ) override;
118  virtual void setUnitTypeEnabled(makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits unitType, bool enabled ) override;
119 
121  virtual void addUnitType( const DtUnicode& unitName,makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits unitType) override;
122 
123  virtual void addUnitType( const DtUnicode& unitName,makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits unitType) override;
124 
126  virtual void setDecimals( unsigned decimals ) override;
127 
129  virtual void setFixedSpacingAmountEnabled( bool enabled ) override;
130 
132  virtual void setMinSpacingEnabled( bool enabled ) override;
133 
136  virtual void setGridTypeEnabled(makArchives::DtDisplayUnitsSettingsRecord::CoordSys, bool enabled ) override;
137 
139  virtual void setDecimalsEnabled( bool enabled ) override;
140 
141  virtual void setMinimalGridlineLabelsEnabled(bool onOff) override;
142 
145  virtual void setGridOnToolbar(bool onOrOff) override;
146 
148  virtual void setLatLonLabelsCenteringCutoff(int altitude) override;
149 
151  virtual void setLatLonLabelsCenteringCutoffUnits(const DtUnicode& units) override;
152 
154  virtual void setLatLonLabelsCenteringCutoffMaximum(int maxAltitude) override;
155 
157  virtual void setPolarLatitudeCutoff(double lat) override;
158 
159 
160  protected slots:
161 
163  void on_gridTypeCombo_currentIndexChanged( int index );
164 
166  void on_unitTypeCombo_currentIndexChanged( int index );
167 
169  void on_northSouthColorChanged(const QColor&);
170 
172  void on_eastWestColorChanged(const QColor&);
173 
175  void on_minimalGridlineLabelsCheckBoxToggled( int state );
176 
178  void on_autoSpacingRadioButtonClicked();
179 
181  void on_fixedSpacingRadioButtonClicked();
182 
184  void on_fixedSpacingCombo_currentIndexChanged(int index);
185 
187  void on_fixedSpacingAmountChanged( double val );
188 
190  void on_minSpacingChanged( int val );
191 
193  void on_xOffsetChanged( double val );
194 
196  void on_yOffsetChanged( double val );
197 
199  void on_decimalsChanged( int decimals );
200 
202  void on_latLonLabelsCenteringCutoffChanged(int val);
203 
205  void on_PolarLatitudeCutoffChanged(double val);
206 
208  void on_GridOnToolbarChanged(int checked);
209 
210  protected:
211 
214  void setupGui();
215 
218  void connectToSignals();
219 
221  virtual void activate() override;
222 
224  virtual void deactivate() override;
225 
227  virtual void configureOptions(makArchives::DtDisplayUnitsSettingsRecord::CoordSys gridType);
228 
232  void setupUnitLabels( const QString& notation );
233 
234  public:
235 
237 
238  QGridLayout* myGridTypeLayout;
241 
244 
247 
250 
251  QButtonGroup* mySpacingButtonGroup;
255  QHBoxLayout* myFixedSpacingLayout;
259 
260  // These next two label/spinbox layouts, are used to maintain the same conceptual
261  // value (and are kept in sync) but are duplicated so we can put them in different places
262  // in the preconfigured options layout
263  // These are for the version under auto spacing
264  QHBoxLayout* myMinSpacingLayout;
267 
268  // These are used for GARS, which appear after auto and fixed buttons
272 
273 
276 
277  QHBoxLayout* myXOffsetLayout;
278  QHBoxLayout* myYOffsetLayout;
283  QWidget* myOptionsWidget;
284  QVBoxLayout* myOptionsLayout;
285 
286  QHBoxLayout* myUnitTypeLayout;
287  QHBoxLayout* myDecimalPlacesLayout;
289  QHBoxLayout* myEastWestColorLayout;
290 
294 
298 
300 
301  protected:
302 
304  std::string myClassName;
306 
307  };
308 
309 
313 }
std::string myClassName
Definition: DtGridLinesPage.h:304
A widget that displays a persistence GUI in some way Operations presented are import, export, save, and restore.
Definition: DtPersistenceToolbarWidget.h:26
QHBoxLayout * myFixedSpacingLayout
Definition: DtGridLinesPage.h:255
QLabel * mySpacingAmountLabel
Definition: DtGridLinesPage.h:257
QVBoxLayout * myOptionsLayout
Definition: DtGridLinesPage.h:284
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
A unicode string. DtUnicode stores a UTF-16 encoded unicode string. Code Point, a Unicode character...
Definition: DtUnicode.h:33
QRadioButton * myAutoSpacingRadioButton
Definition: DtGridLinesPage.h:253
QDoubleSpinBox * myYOffsetSpinBox
Definition: DtGridLinesPage.h:282
Contains makVrv::DtPage class.
QLabel * myGarsSpacingAmountLabel
Definition: DtGridLinesPage.h:258
QHBoxLayout * myGarsMinSpacingLayout
Definition: DtGridLinesPage.h:269
QComboBox * myUnitTypeComboBox
Definition: DtGridLinesPage.h:243
DtPageCreatorTemplate< DtGridLinesPage > DtGridLinesPageCreator
Creator type for creating new DtGridLinesPages.
Definition: DtGridLinesPage.h:312
A push-button that displays a current color and pops up a color picker dialog when pressed...
Definition: DtColorPushButton.h:26
QHBoxLayout * myGarsFixedSpacingLayout
Definition: DtGridLinesPage.h:256
QWidget * myOptionsWidget
Definition: DtGridLinesPage.h:283
QSpinBox * myMinSpacingSpinBox
Definition: DtGridLinesPage.h:266
QLabel * myUnitTypeLabel
Definition: DtGridLinesPage.h:242
#define DT_DLL_VRVCOREQT
Definition: vrvCoreQt.h:20
QRadioButton * myFixedSpacingRadioButton
Definition: DtGridLinesPage.h:254
Contains DLL export macros.
CoordSys
Enumeration of the different coordinate system types.
Definition: DtDisplayUnitsSettingsRecord.h:30
QHBoxLayout * myPolarLatitudeCutoffLayout
Definition: DtGridLinesPage.h:295
Definition: DtPage.h:150
DistanceUnits
Enumeration of the different distance units.
Definition: DtDisplayUnitsSettingsRecord.h:57
QLabel * myYOffsetLabel
Definition: DtGridLinesPage.h:280
QHBoxLayout * myXOffsetLayout
Definition: DtGridLinesPage.h:277
DtColorPushButton * myEastWestColorButton
Definition: DtGridLinesPage.h:249
QHBoxLayout * myEastWestColorLayout
Definition: DtGridLinesPage.h:289
QHBoxLayout * myUnitTypeLayout
Definition: DtGridLinesPage.h:286
QLabel * myXOffsetLabel
Definition: DtGridLinesPage.h:279
QCheckBox * myMinimalGridlineLabelsCheckbox
Definition: DtGridLinesPage.h:252
Contains the DtGridLinesInterface.
QHBoxLayout * myMinSpacingLayout
Definition: DtGridLinesPage.h:264
QComboBox * myGarsFixedSpacingAmountComboBox
Definition: DtGridLinesPage.h:275
QSpinBox * myGarsMinSpacingSpinBox
Definition: DtGridLinesPage.h:271
bool myUsingAngularUnits
Definition: DtGridLinesPage.h:305
DtVirtualBaseClass * myLogic
Definition: DtGridLinesPage.h:303
QHBoxLayout * myDecimalPlacesLayout
Definition: DtGridLinesPage.h:287
QSpinBox * myLatLonLabelsCenteringCutoffSpinBox
Definition: DtGridLinesPage.h:293
QDoubleSpinBox * mySpacingAmountSpinBox
Definition: DtGridLinesPage.h:274
The page is a single widget component which is viewed in a page collection.
Definition: DtPage.h:30
QLabel * myPolarLatitudeCutoffLabel
Definition: DtGridLinesPage.h:296
The interface used by the DtGridLinesPage and the DtGridLinesLogic.
Definition: DtGridLinesInterface.h:24
OrientationUnits
Enumeration of the different orientation units.
Definition: DtDisplayUnitsSettingsRecord.h:102
DtColorPushButton * myNorthSouthColorButton
Definition: DtGridLinesPage.h:248
QDoubleSpinBox * myPolarLatitudeCutoffSpinBox
Definition: DtGridLinesPage.h:297
QHBoxLayout * myLatLonLabelsCenteringCutoffLayout
Definition: DtGridLinesPage.h:291
QCheckBox * myGridOnToolbarCheckbox
Definition: DtGridLinesPage.h:299
QComboBox * myGridTypeComboBox
Definition: DtGridLinesPage.h:240
QSpinBox * myDecimalsSpinBox
Definition: DtGridLinesPage.h:246
DtPersistenceToolbarWidget * myToolbar
Definition: DtGridLinesPage.h:236
QDoubleSpinBox * myXOffsetSpinBox
Definition: DtGridLinesPage.h:281
QHBoxLayout * myYOffsetLayout
Definition: DtGridLinesPage.h:278
QLabel * myGridTypeLabel
Definition: DtGridLinesPage.h:239
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:72
QGridLayout * myGridTypeLayout
Definition: DtGridLinesPage.h:238
QLabel * myLatLonLabelsCenteringCutoffLabel
Definition: DtGridLinesPage.h:292
A collection of icon configurations. The collection maintains flags indicating whether to generate ic...
Definition: DtQIconConfiguration.h:131
voidpf uLong offset
Definition: ioapi.h:42
QButtonGroup * mySpacingButtonGroup
Definition: DtGridLinesPage.h:251
QHBoxLayout * myNorthSouthColorLayout
Definition: DtGridLinesPage.h:288
QLabel * myGarsMinSpacingLabel
Definition: DtGridLinesPage.h:270
QLabel * myDecimalsLabel
Definition: DtGridLinesPage.h:245
QLabel * myMinSpacingLabel
Definition: DtGridLinesPage.h:265
The grid lines page, controls for configuring grid lines.
Definition: DtGridLinesPage.h:39

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)