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) 2024 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 
83  virtual void setMgrsMapSheetFixedSpacingIndex(int index) override;
84 
87  virtual void setGarsFixedSpacingIndex(int index) override;
88 
90  virtual void setMaxFixedSpacing( double maxSpacing ) override;
91 
93  virtual void setMinFixedSpacing( double minSpacing ) override;
94 
96  virtual void setGridType(makArchives::DtDisplayUnitsSettingsRecord::CoordSys gridType ) override;
97 
99  virtual void clearGridTypes() override;
100 
102  virtual void disableAllGridTypes() override;
103 
105  virtual void addGridType(const DtUnicode& gridName, makArchives::DtDisplayUnitsSettingsRecord::CoordSys gridType ) override;
106 
108  virtual void setXOffset( double offset ) override;
109 
111  virtual void setYOffset( double offset ) override;
112 
114  virtual void setMinSpacing( int pixels ) override;
115 
117  virtual void setMgrsMapSheetCutoff(double altitude) override;
118 
120  virtual void setMgrsMapSheetCutoffUnits(const DtUnicode& units) override;
121 
123  virtual void setMgrsMapSheetCutoffMaximum(double maxAltitude) override;
124 
125 
127  virtual void setUnitType(makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits unitType) override;
128 
129  virtual void setUnitType(makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits unitType) override;
130 
132  virtual void clearUnitTypes() override;
133 
135  virtual void setUnitTypeEnabled(makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits unitType, bool enabled ) override;
136  virtual void setUnitTypeEnabled(makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits unitType, bool enabled ) override;
137 
139  virtual void addUnitType( const DtUnicode& unitName,makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits unitType) override;
140 
141  virtual void addUnitType( const DtUnicode& unitName,makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits unitType) override;
142 
144  virtual void setDecimals( unsigned decimals ) override;
145 
147  virtual void setFixedSpacingAmountEnabled( bool enabled ) override;
148 
150  virtual void setMinSpacingEnabled( bool enabled ) override;
151 
154  virtual void setGridTypeEnabled(makArchives::DtDisplayUnitsSettingsRecord::CoordSys, bool enabled ) override;
155 
157  virtual void setDecimalsEnabled( bool enabled ) override;
158 
159  virtual void setMinimalGridlineLabelsEnabled(bool onOff) override;
160 
163  virtual void setGridOnToolbar(bool onOrOff) override;
164 
166  virtual void setLatLonLabelsCenteringCutoff(double altitude) override;
167 
169  virtual void setLatLonLabelsCenteringCutoffUnits(const DtUnicode& units) override;
170 
172  virtual void setLatLonLabelsCenteringCutoffMaximum(double maxAltitude) override;
173 
175  virtual void setPolarLatitudeCutoff(double lat) override;
176 
178  virtual void setFixedSpacingComboBoxItem(makArchives::DtDisplayUnitsSettingsRecord::CoordSys gridType, int index,
179  const std::string& label, double value) override;
180 
181 
182  protected slots:
183 
185  void on_gridTypeCombo_currentIndexChanged( int index );
186 
188  void on_unitTypeCombo_currentIndexChanged( int index );
189 
191  void on_northSouthColorChanged(const QColor&);
192 
194  void on_eastWestColorChanged(const QColor&);
195 
197  void on_minimalGridlineLabelsCheckBoxToggled( int state );
198 
200  void on_autoSpacingRadioButtonClicked();
201 
203  void on_fixedSpacingRadioButtonClicked();
204 
206  void on_fixedSpacingCombo_currentIndexChanged(int index);
207 
209  void on_fixedSpacingAmountChanged( double val );
210 
212  void on_minSpacingChanged( int val );
213 
215  void on_xOffsetChanged( double val );
216 
218  void on_yOffsetChanged( double val );
219 
221  void on_decimalsChanged( int decimals );
222 
224  void on_latLonLabelsCenteringCutoffChanged(int val);
225 
227  void on_mgrsMapSheetCutoffChanged(double val);
228 
230  void on_PolarLatitudeCutoffChanged(double val);
231 
233  void on_GridOnToolbarChanged(int checked);
234 
235  protected:
236 
239  void setupGui();
240 
243  void connectToSignals();
244 
246  virtual void activate() override;
247 
249  virtual void deactivate() override;
250 
252  virtual void configureOptions(makArchives::DtDisplayUnitsSettingsRecord::CoordSys gridType);
253 
257  void setupUnitLabels( const QString& notation );
258 
259  public:
260 
262 
263  QGridLayout* myGridTypeLayout;
266 
269 
272 
275 
276  QButtonGroup* mySpacingButtonGroup;
280  QHBoxLayout* myFixedSpacingLayout;
286 
287  // These next two label/spinbox layouts, are used to maintain the same conceptual
288  // value (and are kept in sync) but are duplicated so we can put them in different places
289  // in the preconfigured options layout
290  // These are for the version under auto spacing
291  QHBoxLayout* myMinSpacingLayout;
294 
295  // These are used for GARS, which appear after auto and fixed buttons
299 
300 
304 
305  QHBoxLayout* myXOffsetLayout;
306  QHBoxLayout* myYOffsetLayout;
311  QWidget* myOptionsWidget;
312  QVBoxLayout* myOptionsLayout;
313 
314  QHBoxLayout* myUnitTypeLayout;
315  QHBoxLayout* myDecimalPlacesLayout;
317  QHBoxLayout* myEastWestColorLayout;
318 
322 
326 
330 
332 
333  protected:
334 
336  std::string myClassName;
338 
339  };
340 
341 
345 }
std::string myClassName
Definition: DtGridLinesPage.h:336
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:280
QLabel * mySpacingAmountLabel
Definition: DtGridLinesPage.h:283
QVBoxLayout * myOptionsLayout
Definition: DtGridLinesPage.h:312
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:278
QDoubleSpinBox * myYOffsetSpinBox
Definition: DtGridLinesPage.h:310
Contains makVrv::DtPage class declaration.
QLabel * myGarsSpacingAmountLabel
Definition: DtGridLinesPage.h:284
QHBoxLayout * myGarsMinSpacingLayout
Definition: DtGridLinesPage.h:296
QComboBox * myUnitTypeComboBox
Definition: DtGridLinesPage.h:268
DtPageCreatorTemplate< DtGridLinesPage > DtGridLinesPageCreator
Creator type for creating new DtGridLinesPages.
Definition: DtGridLinesPage.h:344
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:281
QWidget * myOptionsWidget
Definition: DtGridLinesPage.h:311
QSpinBox * myMinSpacingSpinBox
Definition: DtGridLinesPage.h:293
QLabel * myUnitTypeLabel
Definition: DtGridLinesPage.h:267
QHBoxLayout * myMgrsMapSheetCutoffLayout
Definition: DtGridLinesPage.h:323
#define DT_DLL_VRVCOREQT
Definition: vrvCoreQt.h:20
QRadioButton * myFixedSpacingRadioButton
Definition: DtGridLinesPage.h:279
Contains DLL export macros.
CoordSys
Enumeration of the different coordinate system types.
Definition: DtDisplayUnitsSettingsRecord.h:30
QHBoxLayout * myMgrsMapSheetFixedSpacingLayout
Definition: DtGridLinesPage.h:282
QHBoxLayout * myPolarLatitudeCutoffLayout
Definition: DtGridLinesPage.h:327
Definition: DtPage.h:181
DistanceUnits
Enumeration of the different distance units.
Definition: DtDisplayUnitsSettingsRecord.h:57
QLabel * myYOffsetLabel
Definition: DtGridLinesPage.h:308
QHBoxLayout * myXOffsetLayout
Definition: DtGridLinesPage.h:305
DtColorPushButton * myEastWestColorButton
Definition: DtGridLinesPage.h:274
QHBoxLayout * myEastWestColorLayout
Definition: DtGridLinesPage.h:317
QHBoxLayout * myUnitTypeLayout
Definition: DtGridLinesPage.h:314
QLabel * myXOffsetLabel
Definition: DtGridLinesPage.h:307
QCheckBox * myMinimalGridlineLabelsCheckbox
Definition: DtGridLinesPage.h:277
Contains the DtGridLinesInterface.
QHBoxLayout * myMinSpacingLayout
Definition: DtGridLinesPage.h:291
QComboBox * myGarsFixedSpacingAmountComboBox
Definition: DtGridLinesPage.h:302
QSpinBox * myGarsMinSpacingSpinBox
Definition: DtGridLinesPage.h:298
bool myUsingAngularUnits
Definition: DtGridLinesPage.h:337
DtVirtualBaseClass * myLogic
Definition: DtGridLinesPage.h:335
QComboBox * myMgrsMapSheetFixedSpacingAmountComboBox
Definition: DtGridLinesPage.h:303
QHBoxLayout * myDecimalPlacesLayout
Definition: DtGridLinesPage.h:315
QSpinBox * myLatLonLabelsCenteringCutoffSpinBox
Definition: DtGridLinesPage.h:321
QDoubleSpinBox * mySpacingAmountSpinBox
Definition: DtGridLinesPage.h:301
The page is a single widget component which is viewed in a page collection.
Definition: DtPage.h:51
QLabel * myPolarLatitudeCutoffLabel
Definition: DtGridLinesPage.h:328
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:273
QDoubleSpinBox * myPolarLatitudeCutoffSpinBox
Definition: DtGridLinesPage.h:329
QHBoxLayout * myLatLonLabelsCenteringCutoffLayout
Definition: DtGridLinesPage.h:319
QCheckBox * myGridOnToolbarCheckbox
Definition: DtGridLinesPage.h:331
QComboBox * myGridTypeComboBox
Definition: DtGridLinesPage.h:265
QLabel * myMgrsMapSheetCutoffLabel
Definition: DtGridLinesPage.h:324
QSpinBox * myDecimalsSpinBox
Definition: DtGridLinesPage.h:271
DtPersistenceToolbarWidget * myToolbar
Definition: DtGridLinesPage.h:261
QDoubleSpinBox * myXOffsetSpinBox
Definition: DtGridLinesPage.h:309
QDoubleSpinBox * myMgrsMapSheetCutoffSpinBox
Definition: DtGridLinesPage.h:325
QHBoxLayout * myYOffsetLayout
Definition: DtGridLinesPage.h:306
QLabel * myGridTypeLabel
Definition: DtGridLinesPage.h:264
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:76
QGridLayout * myGridTypeLayout
Definition: DtGridLinesPage.h:263
QLabel * myLatLonLabelsCenteringCutoffLabel
Definition: DtGridLinesPage.h:320
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:276
QHBoxLayout * myNorthSouthColorLayout
Definition: DtGridLinesPage.h:316
QLabel * myMgrsSpacingAmountLabel
Definition: DtGridLinesPage.h:285
QLabel * myGarsMinSpacingLabel
Definition: DtGridLinesPage.h:297
QLabel * myDecimalsLabel
Definition: DtGridLinesPage.h:270
QLabel * myMinSpacingLabel
Definition: DtGridLinesPage.h:292
The grid lines page, controls for configuring grid lines.
Definition: DtGridLinesPage.h:39

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)