VR-Forces 4.3 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DtGridLinesLogic.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2010 MAK Technologies, Inc.
3  * All rights reserved.
4  *****************************************************************************/
5 /*****************************************************************************
6  * $RCSfile: $ $Revision: $ $State: $
7  *****************************************************************************/
8 
12 
13 #pragma once
14 
15 #include <vrvCoreQt/vrvCoreQt.h>
16 
18 
21 
23 
24 namespace makVrv
25 {
26 
27  class DtSettingsBackup;
28  class DtPersistenceControlsInterface;
29  class DtCoordinateDisplay;
30 
34  {
35  public:
36 
38 
40  virtual ~DtGridLinesLogic();
41 
43  virtual void sendSettingsToGui();
44 
46  virtual void slot_onAutoSpacingChanged( bool );
47  virtual void slot_onFixedSpacingAmountChanged( double );
48  virtual void slot_onMinSpacingChanged( int );
49  virtual void slot_onGridTypeChanged( makArchives::DtDisplayUnitsSettingsRecord::CoordSys );
50  virtual void slot_onUnitTypeChanged( makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits );
51  virtual void slot_onAngularUnitTypeChanged( makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits );
52  virtual void slot_onXOffsetChanged( double );
53  virtual void slot_onYOffsetChanged( double );
54  virtual void slot_onDecimalsChanged( unsigned );
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( const std::string&, const std::string& );
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 }

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)