VR-Forces 4.0.4 Class Documentation
Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
DtCoordinateSystemCollection Class Reference

This class will be the entry point for conversion from unit display types, values, and the screen display. More...

Inheritance diagram for DtCoordinateSystemCollection:
Inheritance graph
[legend]

List of all members.

Public Slots

virtual void removeComboBox (QObject *)

Signals

void precisionChanged (const DtCoordSys &, int oldPrec, int newPrec)
void coordinateSystemAdded (const DtCoordSys &unit, DtCoordinateSystem *obj)

Public Member Functions

 DtCoordinateSystemCollection (const DtUnitDisplayManager *units)
virtual ~DtCoordinateSystemCollection ()
virtual bool init ()
 Adds all default converters by initially adding all items found in coordUtil.h Unit converter must be set to allow for correct label creation for X, Y and Z labels (handed down to the coordinate systems)
virtual const
DtCoordinateSystemDict
coordinateSystemCollection () const
 Returns the internal unit converter collection.
virtual DtCoordinateSystemDictcoordinateSystemCollection ()
virtual void fillComboBox (QComboBox *box, QList< DtCoordSys > *showOnly=NULL) const
 Fills the combo box with all items found in the collection.
virtual void fillGridLineSelection (const DtCoordSys &system, const QString &unit, QComboBox *combo)
 Fills the combo box with grid line spacing choices.
virtual QString gridLineTextForFrequency (const DtCoordSys &system, const QString &unit, double frequency)
 Returns the grid line text for the specified frequency.
virtual double gridLineFrequencyForText (const DtCoordSys &system, const QString &unit, const QString &text)
 Returns the grid line frequency for the specified text.
virtual QString xLabelFor (const DtCoordSys &system) const
 Calls down to coordinate system referenced by system for the labels.
virtual QString yLabelFor (const DtCoordSys &system) const
virtual QString zLabelFor (const DtCoordSys &system) const
const DtUnitDisplayManagerunitDisplayManager () const
virtual void setPrecision (const DtCoordSys &s, int, bool signal=true)
 Get/set precision for the specified coordinate system.
virtual int precision (const DtCoordSys &) const
virtual void setPrecisionLowerBound (const DtCoordSys &s, int)
 Get/set precision bounds for the specified coordinate system.
virtual int precisionLowerBound (const DtCoordSys &) const
virtual void setPrecisionUpperBound (const DtCoordSys &s, int)
virtual int precisionUpperBound (const DtCoordSys &) const
virtual void restoreDefaults ()
 Restores all precision settings for all current coordinate systems to 2.
virtual void addCoordinateSystem (const DtCoordSys &unit, DtCoordinateSystem *obj)
 These routines call down to the myCoordinateSystem version of the methods.
virtual DtCoordinateSystemcoordinateSystemFor (const DtCoordSys &system) const
 Returns the converter for the specified unit type.
virtual DtCoordinateSystemcoordinateSystemFor (const QString &system) const
virtual QString coordinateSystemName (const DtCoordSys &system) const
 Returns the coordinate system name for the specified system.
virtual DtCoordSys coordinateSystem (const QString &system) const
virtual void automaticallyUpdateComboBox (QComboBox *)
 When a new coordinate system is added, add it to the supplied combo box.

Static Public Member Functions

static
DtCoordinateSystemCollection
create (const DtUnitDisplayManager *units)
 Creates a new instance of this object.

Protected Member Functions

virtual void addCoordinateSystems ()
 Adds coordinate systems to the collection.
virtual int gridLineInsertPosition (QComboBox *box, double val) const
 Returns index to place new grid line item. Sorted by grid line spacing.
virtual void read (QTextStream &ts)
 Used to archive/restore precision settings.
virtual void write (QTextStream &ts)

Protected Attributes

DtCoordinateSystemDict myCoordinateSystems
const DtUnitDisplayManagermyUnits
QList< QComboBox * > myTracking

Detailed Description

This class will be the entry point for conversion from unit display types, values, and the screen display.


Constructor & Destructor Documentation


Member Function Documentation

Adds all default converters by initially adding all items found in coordUtil.h Unit converter must be set to allow for correct label creation for X, Y and Z labels (handed down to the coordinate systems)

Creates a new instance of this object.

Reimplemented in DtTerrainCoordinateSystemCollection.

Returns the internal unit converter collection.

virtual void DtCoordinateSystemCollection::fillComboBox ( QComboBox box,
QList< DtCoordSys > *  showOnly = NULL 
) const [virtual]

Fills the combo box with all items found in the collection.

If showOnly is defined, will only show the items that are in that value list

virtual void DtCoordinateSystemCollection::fillGridLineSelection ( const DtCoordSys system,
const QString &  unit,
QComboBox combo 
) [virtual]

Fills the combo box with grid line spacing choices.

Passes responsibility down to unit converter that is represented by the particular coordinate system

virtual QString DtCoordinateSystemCollection::gridLineTextForFrequency ( const DtCoordSys system,
const QString &  unit,
double  frequency 
) [virtual]

Returns the grid line text for the specified frequency.

Passes down to specified coordinate system

virtual double DtCoordinateSystemCollection::gridLineFrequencyForText ( const DtCoordSys system,
const QString &  unit,
const QString &  text 
) [virtual]

Returns the grid line frequency for the specified text.

Passes down to specified coordinate system

virtual QString DtCoordinateSystemCollection::xLabelFor ( const DtCoordSys system) const [virtual]

Calls down to coordinate system referenced by system for the labels.

virtual QString DtCoordinateSystemCollection::yLabelFor ( const DtCoordSys system) const [virtual]
virtual QString DtCoordinateSystemCollection::zLabelFor ( const DtCoordSys system) const [virtual]

References myUnits.

virtual void DtCoordinateSystemCollection::setPrecision ( const DtCoordSys s,
int  ,
bool  signal = true 
) [virtual]

Get/set precision for the specified coordinate system.

Note that if the precision is set directly in the coordinate system object, it will not be emitted as being changed. Returns true if precision was changed. If signal is false, will not emit signal on change

virtual int DtCoordinateSystemCollection::precision ( const DtCoordSys ) const [virtual]
virtual void DtCoordinateSystemCollection::setPrecisionLowerBound ( const DtCoordSys s,
int   
) [virtual]

Get/set precision bounds for the specified coordinate system.

virtual int DtCoordinateSystemCollection::precisionLowerBound ( const DtCoordSys ) const [virtual]
virtual void DtCoordinateSystemCollection::setPrecisionUpperBound ( const DtCoordSys s,
int   
) [virtual]
virtual int DtCoordinateSystemCollection::precisionUpperBound ( const DtCoordSys ) const [virtual]

Restores all precision settings for all current coordinate systems to 2.

virtual void DtCoordinateSystemCollection::addCoordinateSystem ( const DtCoordSys unit,
DtCoordinateSystem obj 
) [virtual]

These routines call down to the myCoordinateSystem version of the methods.

Adds a new coordinate system to the list of systems. If the system exists, replaces with the new information

Returns the converter for the specified unit type.

virtual DtCoordinateSystem* DtCoordinateSystemCollection::coordinateSystemFor ( const QString &  system) const [virtual]
virtual QString DtCoordinateSystemCollection::coordinateSystemName ( const DtCoordSys system) const [virtual]

Returns the coordinate system name for the specified system.

virtual DtCoordSys DtCoordinateSystemCollection::coordinateSystem ( const QString &  system) const [virtual]

When a new coordinate system is added, add it to the supplied combo box.

Will also connect to the combo boxes destroyed method.

void DtCoordinateSystemCollection::precisionChanged ( const DtCoordSys ,
int  oldPrec,
int  newPrec 
) [signal]
virtual void DtCoordinateSystemCollection::removeComboBox ( QObject ) [virtual, slot]
virtual void DtCoordinateSystemCollection::addCoordinateSystems ( ) [protected, virtual]

Adds coordinate systems to the collection.

Reimplemented in DtTerrainCoordinateSystemCollection.

virtual int DtCoordinateSystemCollection::gridLineInsertPosition ( QComboBox box,
double  val 
) const [protected, virtual]

Returns index to place new grid line item. Sorted by grid line spacing.

virtual void DtCoordinateSystemCollection::read ( QTextStream &  ts) [protected, virtual]

Used to archive/restore precision settings.

Reimplemented from DtArchivableObject.

virtual void DtCoordinateSystemCollection::write ( QTextStream &  ts) [protected, virtual]

Reimplemented from DtArchivableObject.


Member Data Documentation

Referenced by unitDisplayManager().


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)