VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtGridLinesLogic.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2025 MAK Technologies, Inc.
3  * All rights reserved.
4  *****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvCoreQt/vrvCoreQt.h>
13 
15 
18 
20 
21 namespace makVrv
22 {
23 
24  class DtSettingsBackup;
25  class DtPersistenceControlsInterface;
26  class DtCoordinateDisplay;
27 
31  {
32  public:
33 
35 
37  virtual ~DtGridLinesLogic();
38 
40  virtual void sendSettingsToGui();
41 
43  virtual void slot_northSouthColorChanged( double r, double g, double b, double a );
44  virtual void slot_eastWestColorChanged( double r, double g, double b, double a );
45  virtual void slot_onMinimalGridlineLabelsToggled( bool isMinimalEnabled );
46  virtual void slot_onAutoSpacingChanged( bool isAutoSpacingEnabled );
47  virtual void slot_onFixedSpacingAmountChanged(double fixedSpacingAmount);
48  virtual void slot_onGarsFixedSpacingIndexChanged(int index);
49  virtual void slot_onMgrsMapSheetFixedSpacingIndexChanged(int index);
50  virtual void slot_onMinSpacingChanged( int minSpacingAmount );
51  virtual void slot_onGridTypeChanged( makArchives::DtDisplayUnitsSettingsRecord::CoordSys cs );
52  virtual void slot_onUnitTypeChanged( makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits unit );
53  virtual void slot_onAngularUnitTypeChanged( makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits unit );
54  virtual void slot_onXOffsetChanged( double xOffset );
55  virtual void slot_onYOffsetChanged( double yOffset );
56  virtual void slot_onDecimalsChanged( unsigned int decimals );
57  virtual void slot_onlatLonLabelsCenteringCutoffChanged(double latitude);
58  virtual void slot_onPolarLatitudeCutoffChanged(double altitude);
59  virtual void slot_onMgrsMapSheetCutoffChanged(double altitude);
60  virtual void slot_onGridOnToolbarChanged(bool onOrOff);
61 
63  virtual void on_import();
64  virtual void on_export();
65  virtual void on_importFilePathChosen(const std::string& filePath);
66  virtual void on_exportFilePathChosen(const std::string& filePath);
67  virtual void settingsRestored(const DtSettingsBackup* b);
68 
69  protected:
70 
73  DtGridLinesLogic(DtDe& de, DtPersistenceControlsInterface& persistenceControls,
74  DtGridLinesInterface& iface);
75 
76  // Used by sendSettingsToGui to send all the known grid types to the gui
77  virtual void sendGridTypesToGui();
78 
79  // Used by sendSettingsToGui to send all the known unit types to the gui
80  virtual void sendUnitTypesToGui();
81 
82  // Determine if the specified grid type uses angular units (or linear, otherwise)
83  bool gridTypeUsesAngularUnits( makArchives::DtDisplayUnitsSettingsRecord::CoordSys gridType ) const;
84 
87  virtual void processCurrentCoordinateSystem();
88 
92  virtual void processCurrentGridType();
93 
95  virtual double fixedSpacingAmount();
96 
97  // find the correct combo box index to display the current gars fixed spacing
98  virtual int garsFixedSpacingIndex() const;
99 
100  // find the correct combo box index to display the current mgrs fixed spacing
101  virtual int mgrsMapSheetFixedSpacingIndex() const;
102 
104  virtual double xOffset();
105 
107  virtual double yOffset();
108 
110  virtual unsigned decimals();
111 
112  virtual void setMinAndMaxFixedSpacing( const DtCoordinateDisplay* display );
113 
114  protected:
115 
121 
123  {
124  public:
125  double myValue;
126  std::string myLabel;
127  };
128 
129  std::vector<DtFixedSpacingEntry> myGarsFixedSpacingElements;
130  std::vector<DtFixedSpacingEntry> myMgrsMapSheetFixedSpacingElements;
131 
132  };
133 
137  : public DtVirtualBaseClass
138  {
139  public:
140 
141  // Get the creator instance for this DE object. Creates instance if none found
142  static DtGridLinesLogicCreator& instance( DtDe& de );
143 
144  static void registerInstance( DtDe& de, DtGridLinesLogicCreator* creator );
145 
146  //Create the widget's logic.
147  static DtVirtualBaseClass* create( DtDe& de,
148  DtPersistenceControlsInterface& persistenceControls, DtGridLinesInterface& iface ) ;
149 
150  };
151 
152 }
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
std::vector< DtFixedSpacingEntry > myMgrsMapSheetFixedSpacingElements
Definition: DtGridLinesLogic.h:130
bool myTerrainIsLoaded
Definition: DtGridLinesLogic.h:120
Abstract interface class for all coordinate system displays.
Definition: DtCoordinateDisplay.h:24
std::vector< DtFixedSpacingEntry > myGarsFixedSpacingElements
Definition: DtGridLinesLogic.h:129
std::string myLabel
Definition: DtGridLinesLogic.h:126
#define DT_DLL_VRVCOREQT
Definition: vrvCoreQt.h:20
Contains DLL export macros.
CoordSys
Enumeration of the different coordinate system types.
Definition: DtDisplayUnitsSettingsRecord.h:30
Abstract interface for controlling persistence of state in a dialog.
Definition: DtPersistenceControlsInterface.h:20
DistanceUnits
Enumeration of the different distance units.
Definition: DtDisplayUnitsSettingsRecord.h:57
The logic for populating the DtGridLinesPage.
Definition: DtGridLinesLogic.h:30
Contains makVrv::DtVirtualBaseClass class.
Contains the DtGridLinesInterface.
DtSignalConnectionManager mySignals
Definition: DtGridLinesLogic.h:119
double myValue
Definition: DtGridLinesLogic.h:125
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
DtDe & myDe
Definition: DtGridLinesLogic.h:116
Provides a method of doign settings backup.
Definition: DtSettingsBackup.h:23
DtPersistenceControlsInterface & myPersistenceControls
Definition: DtGridLinesLogic.h:118
Contains the DtGridLinesSettingsRecord class declaration.
The interface used by the DtGridLinesPage and the DtGridLinesLogic.
Definition: DtGridLinesInterface.h:24
OrientationUnits
Enumeration of the different orientation units.
Definition: DtDisplayUnitsSettingsRecord.h:102
Definition: DtGridLinesLogic.h:122
DtGridLinesInterface & myWidget
Definition: DtGridLinesLogic.h:117
Base class to provide boost signal/slot management.
Creator class for DtGridLinesLogic.
Definition: DtGridLinesLogic.h:136
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

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)