VR-Forces 4.1 Class Documentation
List of all members | 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]

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.
- Public Member Functions inherited from DtArchivableObject
 DtArchivableObject (QString name, DtArchivableObjectCreator fcn)
 This constructor will add this object to the archivable object factory.
 DtArchivableObject (QString name)
 DtArchivableObject ()
virtual ~DtArchivableObject ()
virtual QString name () const
DtArchiverarchiver ()
 Returns the archiver of this object.
virtual void setLevel (int i)
virtual int level () const
virtual DtArchivableObjectclone ()
 Allows for cloning of this object.

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
- Protected Attributes inherited from DtArchivableObject
DtArchivermyArchiver

Detailed Description

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

Constructor & Destructor Documentation

DtCoordinateSystemCollection::DtCoordinateSystemCollection ( const DtUnitDisplayManager units)
virtual DtCoordinateSystemCollection::~DtCoordinateSystemCollection ( )
virtual

Member Function Documentation

virtual bool DtCoordinateSystemCollection::init ( )
virtual

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)

static DtCoordinateSystemCollection* DtCoordinateSystemCollection::create ( const DtUnitDisplayManager units)
static

Creates a new instance of this object.

Reimplemented in DtTerrainCoordinateSystemCollection.

virtual const DtCoordinateSystemDict& DtCoordinateSystemCollection::coordinateSystemCollection ( ) const
virtual

Returns the internal unit converter collection.

virtual DtCoordinateSystemDict& DtCoordinateSystemCollection::coordinateSystemCollection ( )
virtual
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
const DtUnitDisplayManager * DtCoordinateSystemCollection::unitDisplayManager ( ) const
inline

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
virtual void DtCoordinateSystemCollection::restoreDefaults ( )
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

virtual DtCoordinateSystem* DtCoordinateSystemCollection::coordinateSystemFor ( const DtCoordSys system) const
virtual

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
virtual void DtCoordinateSystemCollection::automaticallyUpdateComboBox ( QComboBox )
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
void DtCoordinateSystemCollection::coordinateSystemAdded ( const DtCoordSys unit,
DtCoordinateSystem obj 
)
signal
virtual void DtCoordinateSystemCollection::removeComboBox ( QObject )
virtualslot
virtual void DtCoordinateSystemCollection::addCoordinateSystems ( )
protectedvirtual

Adds coordinate systems to the collection.

Reimplemented in DtTerrainCoordinateSystemCollection.

virtual int DtCoordinateSystemCollection::gridLineInsertPosition ( QComboBox box,
double  val 
) const
protectedvirtual

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

virtual void DtCoordinateSystemCollection::read ( QTextStream &  ts)
protectedvirtual

Used to archive/restore precision settings.

Reimplemented from DtArchivableObject.

virtual void DtCoordinateSystemCollection::write ( QTextStream &  ts)
protectedvirtual

Reimplemented from DtArchivableObject.

Member Data Documentation

DtCoordinateSystemDict DtCoordinateSystemCollection::myCoordinateSystems
protected
const DtUnitDisplayManager* DtCoordinateSystemCollection::myUnits
protected

Referenced by unitDisplayManager().

QList<QComboBox*> DtCoordinateSystemCollection::myTracking
protected

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

Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)