VR-Forces 4.10 Class Documentation
 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) 2020 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 
57  virtual void on_import();
58  virtual void on_export();
59  virtual void on_importFilePathChosen(const std::string& filePath);
60  virtual void on_exportFilePathChosen(const std::string& filePath);
61  virtual void settingsRestored(const DtSettingsBackup* b);
62 
64  virtual void slot_coordinateSystemChanged();
65 
66  protected:
67 
70  DtGridLinesLogic(DtDe& de, DtPersistenceControlsInterface& persistenceControls,
71  DtGridLinesInterface& iface);
72 
73  // Used by sendSettingsToGui to send all the known grid types to the gui
74  virtual void sendGridTypesToGui();
75 
76  // Used by sendSettingsToGui to send all the known unit types to the gui
77  virtual void sendUnitTypesToGui();
78 
79  // Determine if the specified grid type uses angular units (or linear, otherwise)
80  bool gridTypeUsesAngularUnits( makArchives::DtDisplayUnitsSettingsRecord::CoordSys gridType ) const;
81 
85  virtual void processCurrentCoordinateSystem();
86 
90  virtual void processCurrentGridType();
91 
93  virtual double fixedSpacingAmount();
94 
96  virtual double xOffset();
97 
99  virtual double yOffset();
100 
102  virtual unsigned decimals();
103 
104  virtual void setMinAndMaxFixedSpacing( const DtCoordinateDisplay* display );
105 
106  protected:
107 
112 
113  };
114 
118  : public DtVirtualBaseClass
119  {
120  public:
121 
122  // Get the creator instance for this DE object. Creates instance if none found
123  static DtGridLinesLogicCreator& instance( DtDe& de );
124 
125  static void registerInstance( DtDe& de, DtGridLinesLogicCreator* creator );
126 
127  //Create the widget's logic.
128  static DtVirtualBaseClass* create( DtDe& de,
129  DtPersistenceControlsInterface& persistenceControls, DtGridLinesInterface& iface ) ;
130 
131  };
132 
133 }
Virtual base class.
Definition: DtVirtualBaseClass.h:19
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:56
The logic for populating the DtGridLinesPage.
Definition: DtGridLinesLogic.h:30
Contains makVrv::DtVirtualBaseClass class.
Contains the DtGridLinesInterface.
DtSignalConnectionManager mySignals
Definition: DtGridLinesLogic.h:111
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
DtDe & myDe
Definition: DtGridLinesLogic.h:108
Provides a method of doign settings backup.
Definition: DtSettingsBackup.h:23
DtPersistenceControlsInterface & myPersistenceControls
Definition: DtGridLinesLogic.h:110
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:101
DtGridLinesInterface & myWidget
Definition: DtGridLinesLogic.h:109
Base class to provide boost signal/slot management.
Creator class for DtGridLinesLogic.
Definition: DtGridLinesLogic.h:117
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)