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) 2022 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_onMinSpacingChanged( int minSpacingAmount );
49  virtual void slot_onGridTypeChanged( makArchives::DtDisplayUnitsSettingsRecord::CoordSys cs );
50  virtual void slot_onUnitTypeChanged( makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits unit );
51  virtual void slot_onAngularUnitTypeChanged( makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits unit );
52  virtual void slot_onXOffsetChanged( double xOffset );
53  virtual void slot_onYOffsetChanged( double yOffset );
54  virtual void slot_onDecimalsChanged( unsigned int decimals );
55  virtual void slot_onlatLonLabelsCenteringCutoffChanged(double latitude);
56  virtual void slot_onPolarLatitudeCutoffChanged(double altitude);
57  virtual void slot_onGridOnToolbarChanged(bool onOrOff);
58 
60  virtual void on_import();
61  virtual void on_export();
62  virtual void on_importFilePathChosen(const std::string& filePath);
63  virtual void on_exportFilePathChosen(const std::string& filePath);
64  virtual void settingsRestored(const DtSettingsBackup* b);
65 
67  virtual void slot_terrainLoaded();
68 
70  virtual void slot_terrainCleared();
71 
72  protected:
73 
76  DtGridLinesLogic(DtDe& de, DtPersistenceControlsInterface& persistenceControls,
77  DtGridLinesInterface& iface);
78 
79  // Used by sendSettingsToGui to send all the known grid types to the gui
80  virtual void sendGridTypesToGui();
81 
82  // Used by sendSettingsToGui to send all the known unit types to the gui
83  virtual void sendUnitTypesToGui();
84 
85  // Determine if the specified grid type uses angular units (or linear, otherwise)
86  bool gridTypeUsesAngularUnits( makArchives::DtDisplayUnitsSettingsRecord::CoordSys gridType ) const;
87 
91  virtual void processCurrentCoordinateSystem();
92 
96  virtual void processCurrentGridType();
97 
99  virtual double fixedSpacingAmount();
100 
102  virtual double xOffset();
103 
105  virtual double yOffset();
106 
108  virtual unsigned decimals();
109 
110  virtual void setMinAndMaxFixedSpacing( const DtCoordinateDisplay* display );
111 
112  protected:
113 
119 
120  };
121 
125  : public DtVirtualBaseClass
126  {
127  public:
128 
129  // Get the creator instance for this DE object. Creates instance if none found
130  static DtGridLinesLogicCreator& instance( DtDe& de );
131 
132  static void registerInstance( DtDe& de, DtGridLinesLogicCreator* creator );
133 
134  //Create the widget's logic.
135  static DtVirtualBaseClass* create( DtDe& de,
136  DtPersistenceControlsInterface& persistenceControls, DtGridLinesInterface& iface ) ;
137 
138  };
139 
140 }
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
bool myTerrainIsLoaded
Definition: DtGridLinesLogic.h:118
Abstract interface class for all coordinate system displays.
Definition: DtCoordinateDisplay.h:24
#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:117
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
DtDe & myDe
Definition: DtGridLinesLogic.h:114
Provides a method of doign settings backup.
Definition: DtSettingsBackup.h:23
DtPersistenceControlsInterface & myPersistenceControls
Definition: DtGridLinesLogic.h:116
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
DtGridLinesInterface & myWidget
Definition: DtGridLinesLogic.h:115
Base class to provide boost signal/slot management.
Creator class for DtGridLinesLogic.
Definition: DtGridLinesLogic.h:124
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

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)