VR-Forces 4.0.4 Class Documentation
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends
makVrv::DtGridLinesSettingsManager Class Reference

The settings manager for grid lines settings. More...

Inheritance diagram for makVrv::DtGridLinesSettingsManager:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ~DtGridLinesSettingsManager ()
 DTOR.
Setting Getters/Setters
bool autoSpacing () const
 Get whether auto spacing is enabled.
void setAutoSpacing (bool autoSpacing)
 Set whether auto spacing is enabled.
double fixedSpacingAmount (makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits unit) const
 Get the fixed spacing amount for the linear unit specified.
void setFixedSpacingAmount (makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits unit, double amount)
 Set the fixed spacing amount for the linear unit specified.
double fixedSpacingAmount (makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits unit) const
 Get the fixed spacing amount for the angular unit specified.
void setFixedSpacingAmount (makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits unit, double amount)
 Set the fixed spacing amount for the angular unit specified.
int minSpacing () const
 Get the minimum pixels between lines allowed when auto-spacing is enabled (before going to next grid spacing)
void setMinSpacing (int pixels)
 Set the minimum pixels between lines allowed when auto-spacing is enabled (before going to next grid spacing)
makArchives::DtDisplayUnitsSettingsRecord::CoordSys gridType () const
 Get the type of grid lines to draw.
void setGridType (makArchives::DtDisplayUnitsSettingsRecord::CoordSys gridType)
 Set the type of grid lines to draw.
bool unitTypeIsAngular () const
 Returns whether users should use the linear or angular unit forms.
makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits unitType () const
 Get the units to use.
makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits angularUnitType () const
 Because we can't have two methods differing only by return type, this needs to be named differently.
void setUnitType (makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits unit)
 Set the linear unit type.
void setUnitType (makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits unit)
 Set the angular unit type.
double xOffset (makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits unit) const
 Get the x offset amount in meters.
void setXOffset (makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits unit, double offset)
 Set the x offset amount in meters.
double yOffset (makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits unit) const
 Get the y offset amount in meters.
void setYOffset (makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits unit, double offset)
 Set the y offset amount in meters.
double longitudeOffset (makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits unit) const
 Get the x offset amount in meters.
void setLongitudeOffset (makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits unit, double offset)
 Set the x offset amount in meters.
double latitudeOffset (makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits unit) const
 Get the y offset amount in meters.
void setLatitudeOffset (makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits unit, double offset)
 Set the y offset amount in meters.
unsigned decimalPlaces (makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits unit) const
 Get the decimal places for the linear unit specified.
void setDecimalPlaces (makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits unit, unsigned amount)
 Set the decimal places for the linear unit specified.
unsigned decimalPlaces (makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits unit) const
 Get the precision for the angular unit specified.
void setDecimalPlaces (makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits unit, unsigned amount)
 Set the precision for the angular unit specified.
Setting persistence methods.
void setFromRecord (const makArchives::DtGridLinesSettingsRecord &rec)
 Use the settings from the given settings record.
void getRecord (makArchives::DtGridLinesSettingsRecord &rec) const
 Populate the given record with the current settings.

Static Public Member Functions

static DtGridLinesSettingsManagerinstance (DtDe &de)
 Get an instance of the settings manager.

Public Attributes

Boost signals for changed settings
boost::signal< void(makArchives::DtDisplayUnitsSettingsRecord::CoordSys)> signal_gridTypeSet
boost::signal< void(makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits)> signal_unitTypeSet
boost::signal< void(makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits)> signal_angularUnitTypeSet
boost::signal< void(bool)> signal_autoSpacingSet
boost::signal< void(makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits,
double)> 
signal_fixedSpacingAmountSet
boost::signal< void(makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits,
double)> 
signal_fixedAngularSpacingAmountSet
boost::signal< void(int)> signal_minSpacingSet
boost::signal< void(makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits,
double)> 
signal_xOffsetSet
boost::signal< void(makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits,
double)> 
signal_yOffsetSet
boost::signal< void(makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits,
double)> 
signal_longitudeOffsetSet
boost::signal< void(makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits,
double)> 
signal_latitudeOffsetSet
boost::signal< void(makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits,
unsigned) > 
signal_decimalPlacesSet
boost::signal< void(makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits,
unsigned)> 
signal_angularDecimalPlacesSet

Protected Member Functions

 DtGridLinesSettingsManager (DtDe &)
 Protected CTOR ( use instance(..) )
Record setters - sets individual setting values from a record.

Called from setFromRecord to preserve logic readability.

void setFixedSpacings (const makArchives::DtGridLinesSettingsRecord &rec)
 Sets the fixed spacing values from a record.
void setXOffsets (const makArchives::DtGridLinesSettingsRecord &rec)
 Sets the x offset values from a record.
void setYOffsets (const makArchives::DtGridLinesSettingsRecord &rec)
 Sets the y offset values from a record.
void setFixedAngularSpacings (const makArchives::DtGridLinesSettingsRecord &rec)
 Sets the fixed (angular) spacing values from a record.
void setLongitudeOffsets (const makArchives::DtGridLinesSettingsRecord &rec)
 Sets the longitude offset values from a record.
void setLatitudeOffsets (const makArchives::DtGridLinesSettingsRecord &rec)
 Sets the latitude offset values from a record.

Protected Attributes

makArchives::DtGridLinesSettingsRecord mySettingsRecord

Friends

template<typename ManagerClass >
ManagerClass & defaultManagerInstanceFunction (DtDe &, bool)
 Befriend the manager instance functions for instance retreival/creation.
template<typename ManagerClass >
void defaultManagerRegisterInstanceFunction (DtDe &, ManagerClass *)
 Befriend the manager instance functions for instance retreival/creation.

Detailed Description

The settings manager for grid lines settings.


Constructor & Destructor Documentation

DTOR.

Protected CTOR ( use instance(..) )


Member Function Documentation

Get an instance of the settings manager.

Get whether auto spacing is enabled.

Set whether auto spacing is enabled.

Get the fixed spacing amount for the linear unit specified.

Set the fixed spacing amount for the linear unit specified.

Get the fixed spacing amount for the angular unit specified.

Set the fixed spacing amount for the angular unit specified.

Get the minimum pixels between lines allowed when auto-spacing is enabled (before going to next grid spacing)

Set the minimum pixels between lines allowed when auto-spacing is enabled (before going to next grid spacing)

Get the type of grid lines to draw.

Set the type of grid lines to draw.

Returns whether users should use the linear or angular unit forms.

Get the units to use.

This is actually determined by the grid type for many systems, but may vary (and does for local cartesian (or database) coordinates. It uses distance units for historical reasons (hence distance units, such as degrees, can't be represented at all). For this reason, DtDisplayUnitsSettingsRecord::End_DistanceUnits may be returned

Because we can't have two methods differing only by return type, this needs to be named differently.

Set the linear unit type.

Set the angular unit type.

Get the x offset amount in meters.

Set the x offset amount in meters.

Get the y offset amount in meters.

Set the y offset amount in meters.

Get the x offset amount in meters.

Set the x offset amount in meters.

Get the y offset amount in meters.

Set the y offset amount in meters.

Get the decimal places for the linear unit specified.

Set the decimal places for the linear unit specified.

Get the precision for the angular unit specified.

Set the precision for the angular unit specified.

Use the settings from the given settings record.

Implements makVrv::DtBaseSettingsManager< makArchives::DtGridLinesSettingsRecord >.

Populate the given record with the current settings.

Implements makVrv::DtBaseSettingsManager< makArchives::DtGridLinesSettingsRecord >.

Sets the fixed spacing values from a record.

Sets the x offset values from a record.

Sets the y offset values from a record.

Sets the fixed (angular) spacing values from a record.

Sets the longitude offset values from a record.

Sets the latitude offset values from a record.


Friends And Related Function Documentation

template<typename ManagerClass >
ManagerClass& defaultManagerInstanceFunction ( DtDe de,
bool  allowedInSlave 
) [friend]

Befriend the manager instance functions for instance retreival/creation.

Befriend the manager instance functions for instance retreival/creation.

Manager requirements: 1) Static instance function 2) Protected DtSignalConnectionManager named myConnections. 3) Member functioned called loadDefaults which takes no arguments. and loads the default settings of the manager or factory from disk. 4) define defaultManagerInstanceFunction as friend. 5) define defaultManagerRegisterInstanceFunction as friend (see below). 5) Protected Constructor which only takes a DtDe reference.

 class Manager
 {
 public:
    static Manager& instance(DtDe& de);
    void loadDefaults();
 protected:
    template <typename ManagerClass>
    friend ManagerClass& defaultManagerInstanceFunction(DtDe& de, bool);
    template <typename ManagerClass>
    friend void defaultManagerRegisterInstanceFunction(DtDe& de, ManagerClass* mgr)
    Manager(DtDe&);
    DtSignalConnectionManager myConnections;
 };

Then simply in the implementation of instance call defaultManagerInstanceFunction with the de object and return the return value.

 Manager& Manager::instance(DtDe& de)
 {
    return defaultManagerInstanceFunction<Manager>(de);
 }
template<typename ManagerClass >
void defaultManagerRegisterInstanceFunction ( DtDe de,
ManagerClass *  mgr 
) [friend]

Befriend the manager instance functions for instance retreival/creation.

Befriend the manager instance functions for instance retreival/creation.

 static void Manager::registerInstance(DtDe& de, Manager* mgr)
 {
    defaultManagerRegisterInstanceFunction(de,mgr);
 }
 ...else where call.
 // Assuming class NewManager : public Manager
 Manager::registerInstance(de,new NewManager(de));

Member Data Documentation


The documentation for this class was generated from the following file:

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)