![]() |
VR-Forces 4.1 Class Documentation
|
The settings manager for grid lines settings. More...

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. | |
Public Member Functions inherited from makVrv::DtBaseSettingsManager< makArchives::DtGridLinesSettingsRecord > | |
| DtBaseSettingsManager (DtDe &de, const std::string &name, const std::string &displayName, const std::string &ext) | |
| CTOR. | |
| virtual | ~DtBaseSettingsManager () |
| Virtual DTOR. | |
| virtual void | initializeBackup () |
| Creates a backup of the settings' current state. | |
Public Member Functions inherited from makVrv::DtCommonBaseSettingsManager< makArchives::DtGridLinesSettingsRecord > | |
| DtCommonBaseSettingsManager (DtDe &de, const std::string &name, const std::string &displayName, const std::string &ext) | |
| CTOR The name, displayName, and extension parameters are used for creating the settings object (DtDeSettings) and backup, and for constructing the filename when readin/writing the records to disk. | |
| virtual | ~DtCommonBaseSettingsManager () |
| Virtual DTOR. | |
| virtual void | autoSaveIfNecessary () |
| Saves the current settings as defaults if autosave is enabled. | |
| virtual void | setAutoSave (bool doit) |
| Sets whether autosave is enabled for the settings manager. | |
| virtual bool | autoSave () const |
| Gets whether autosave is enabled for the settings manager. | |
| virtual void | setUseDefaultSettingsRecord (bool useit) |
| Sets whether setting initialization should check for a default record. | |
| virtual bool | useDefaultSettingsRecord () const |
| Gets whether setting initialization should check for a default record. | |
| virtual DtDeSettings * | settings () |
| Accessor for the manager's DtDeSettings object. | |
| virtual const DtDeSettings * | settings () const |
| Accessor for the manager's DtDeSettings object (const). | |
| virtual DtSettingsBackup * | settingsBackup () |
| Accessor for the manager's settings backup. | |
| virtual const DtSettingsBackup * | settingsBackup () const |
| Accessor for the manager's settings backup (const). | |
| virtual void | loadDefaults () |
| Initializes the settings and creates a backup. | |
| virtual void | saveDefaultSettings () |
| Saves the current settings' state as the default (on disk). | |
| virtual void | loadDefaultSettings (bool loadOnlyFactorySettings) |
| Loads the default settings from disk. | |
| virtual void | importSettings (const std::string &filePath) |
| Load the settings' state from the given file. | |
| virtual void | exportSettings (const std::string &filePath) const |
| Save the current settings' state to the given file. | |
Public Member Functions inherited from makVrv::DtVirtualBaseClass | |
| DtVirtualBaseClass () | |
| Do nothing constructor. | |
| virtual | ~DtVirtualBaseClass () |
| Virtual do nothing destructor. | |
Static Public Member Functions | |
| static DtGridLinesSettingsManager & | instance (DtDe &de) |
| Get an instance of the settings manager. | |
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. | |
Additional Inherited Members | |
Protected Types inherited from makVrv::DtBaseSettingsManager< makArchives::DtGridLinesSettingsRecord > | |
| typedef DtRecordSettingsBackup < DtBaseSettingsManager < makArchives::DtGridLinesSettingsRecord > , makArchives::DtGridLinesSettingsRecord > | RecordBackupType |
The settings manager for grid lines settings.
|
virtual |
DTOR.
|
protected |
Protected CTOR ( use instance(..) )
|
static |
Get an instance of the settings manager.
| bool makVrv::DtGridLinesSettingsManager::autoSpacing | ( | ) | const |
Get whether auto spacing is enabled.
| void makVrv::DtGridLinesSettingsManager::setAutoSpacing | ( | bool | autoSpacing | ) |
Set whether auto spacing is enabled.
| double makVrv::DtGridLinesSettingsManager::fixedSpacingAmount | ( | makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits | unit | ) | const |
Get the fixed spacing amount for the linear unit specified.
| void makVrv::DtGridLinesSettingsManager::setFixedSpacingAmount | ( | makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits | unit, |
| double | amount | ||
| ) |
Set the fixed spacing amount for the linear unit specified.
| double makVrv::DtGridLinesSettingsManager::fixedSpacingAmount | ( | makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits | unit | ) | const |
Get the fixed spacing amount for the angular unit specified.
| void makVrv::DtGridLinesSettingsManager::setFixedSpacingAmount | ( | makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits | unit, |
| double | amount | ||
| ) |
Set the fixed spacing amount for the angular unit specified.
| int makVrv::DtGridLinesSettingsManager::minSpacing | ( | ) | const |
Get the minimum pixels between lines allowed when auto-spacing is enabled (before going to next grid spacing)
| void makVrv::DtGridLinesSettingsManager::setMinSpacing | ( | int | pixels | ) |
Set the minimum pixels between lines allowed when auto-spacing is enabled (before going to next grid spacing)
| makArchives::DtDisplayUnitsSettingsRecord::CoordSys makVrv::DtGridLinesSettingsManager::gridType | ( | ) | const |
Get the type of grid lines to draw.
| void makVrv::DtGridLinesSettingsManager::setGridType | ( | makArchives::DtDisplayUnitsSettingsRecord::CoordSys | gridType | ) |
Set the type of grid lines to draw.
| bool makVrv::DtGridLinesSettingsManager::unitTypeIsAngular | ( | ) | const |
Returns whether users should use the linear or angular unit forms.
| makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits makVrv::DtGridLinesSettingsManager::unitType | ( | ) | const |
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
| makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits makVrv::DtGridLinesSettingsManager::angularUnitType | ( | ) | const |
Because we can't have two methods differing only by return type, this needs to be named differently.
| void makVrv::DtGridLinesSettingsManager::setUnitType | ( | makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits | unit | ) |
Set the linear unit type.
| void makVrv::DtGridLinesSettingsManager::setUnitType | ( | makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits | unit | ) |
Set the angular unit type.
| double makVrv::DtGridLinesSettingsManager::xOffset | ( | makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits | unit | ) | const |
Get the x offset amount in meters.
| void makVrv::DtGridLinesSettingsManager::setXOffset | ( | makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits | unit, |
| double | offset | ||
| ) |
Set the x offset amount in meters.
| double makVrv::DtGridLinesSettingsManager::yOffset | ( | makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits | unit | ) | const |
Get the y offset amount in meters.
| void makVrv::DtGridLinesSettingsManager::setYOffset | ( | makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits | unit, |
| double | offset | ||
| ) |
Set the y offset amount in meters.
| double makVrv::DtGridLinesSettingsManager::longitudeOffset | ( | makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits | unit | ) | const |
Get the x offset amount in meters.
| void makVrv::DtGridLinesSettingsManager::setLongitudeOffset | ( | makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits | unit, |
| double | offset | ||
| ) |
Set the x offset amount in meters.
| double makVrv::DtGridLinesSettingsManager::latitudeOffset | ( | makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits | unit | ) | const |
Get the y offset amount in meters.
| void makVrv::DtGridLinesSettingsManager::setLatitudeOffset | ( | makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits | unit, |
| double | offset | ||
| ) |
Set the y offset amount in meters.
| unsigned makVrv::DtGridLinesSettingsManager::decimalPlaces | ( | makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits | unit | ) | const |
Get the decimal places for the linear unit specified.
| void makVrv::DtGridLinesSettingsManager::setDecimalPlaces | ( | makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits | unit, |
| unsigned | amount | ||
| ) |
Set the decimal places for the linear unit specified.
| unsigned makVrv::DtGridLinesSettingsManager::decimalPlaces | ( | makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits | unit | ) | const |
Get the precision for the angular unit specified.
| void makVrv::DtGridLinesSettingsManager::setDecimalPlaces | ( | makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits | unit, |
| unsigned | amount | ||
| ) |
Set the precision for the angular unit specified.
|
virtual |
Use the settings from the given settings record.
Implements makVrv::DtBaseSettingsManager< makArchives::DtGridLinesSettingsRecord >.
|
virtual |
Populate the given record with the current settings.
Implements makVrv::DtBaseSettingsManager< makArchives::DtGridLinesSettingsRecord >.
|
protected |
Sets the fixed spacing values from a record.
|
protected |
Sets the x offset values from a record.
|
protected |
Sets the y offset values from a record.
|
protected |
Sets the fixed (angular) spacing values from a record.
|
protected |
Sets the longitude offset values from a record.
|
protected |
Sets the latitude offset values from a record.
|
friend |
Befriend the manager instance functions for instance retreival/creation.
Befriend the manager instance functions for instance retrieval/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.
@code
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. @code
Manager& Manager::instance(DtDe& de) { return defaultManagerInstanceFunction<Manager>(de); }
|
friend |
Befriend the manager instance functions for instance retreival/creation.
Befriend the manager instance functions for instance retrieval/creation.
Befriend the manager instance functions for instance retreival/creation.
@code
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));
| boost::signal<void (makArchives::DtDisplayUnitsSettingsRecord::CoordSys)> makVrv::DtGridLinesSettingsManager::signal_gridTypeSet |
| boost::signal<void (makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits)> makVrv::DtGridLinesSettingsManager::signal_unitTypeSet |
| boost::signal<void (makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits)> makVrv::DtGridLinesSettingsManager::signal_angularUnitTypeSet |
| boost::signal<void (bool)> makVrv::DtGridLinesSettingsManager::signal_autoSpacingSet |
| boost::signal<void (makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits,double)> makVrv::DtGridLinesSettingsManager::signal_fixedSpacingAmountSet |
| boost::signal<void (makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits,double)> makVrv::DtGridLinesSettingsManager::signal_fixedAngularSpacingAmountSet |
| boost::signal<void (int)> makVrv::DtGridLinesSettingsManager::signal_minSpacingSet |
| boost::signal<void (makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits,double)> makVrv::DtGridLinesSettingsManager::signal_xOffsetSet |
| boost::signal<void (makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits,double)> makVrv::DtGridLinesSettingsManager::signal_yOffsetSet |
| boost::signal<void (makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits,double)> makVrv::DtGridLinesSettingsManager::signal_longitudeOffsetSet |
| boost::signal<void (makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits,double)> makVrv::DtGridLinesSettingsManager::signal_latitudeOffsetSet |
| boost::signal<void (makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits,unsigned) > makVrv::DtGridLinesSettingsManager::signal_decimalPlacesSet |
| boost::signal<void (makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits,unsigned)> makVrv::DtGridLinesSettingsManager::signal_angularDecimalPlacesSet |
|
protected |