MeasurementLayer.h

Go to the documentation of this file.
00001 /*
00002 * The information in this file is
00003 * Copyright(c) 2007 Ball Aerospace & Technologies Corporation
00004 * and is subject to the terms and conditions of the
00005 * GNU Lesser General Public License Version 2.1
00006 * The license text is available from   
00007 * http://www.gnu.org/licenses/lgpl.html
00008 */
00009 
00010 #ifndef MEASUREMENTLAYER_H
00011 #define MEASUREMENTLAYER_H
00012 
00013 #include "AnnotationLayer.h"
00014 
00015 /**
00016  *  Adjusts the properties of a MeasurementLayer.
00017  *
00018  *  This subclass of Subject will notify upon the following conditions:
00019  *  - Everything documented in AnnotationLayer.
00020  *
00021  *  @see     AnnotationLayer
00022  */
00023 class MeasurementLayer : public AnnotationLayer
00024 {
00025 public:
00026    SETTING(DisplayDistanceLabel, MeasurementLayer, bool, true)
00027    SETTING(DisplayBearingLabel, MeasurementLayer, bool, true)
00028    SETTING(DisplayEndPointsLabel, MeasurementLayer, bool, true)
00029    SETTING(DistancePrecision, MeasurementLayer, int, 1)
00030    SETTING(BearingPrecision, MeasurementLayer, int, 1)
00031    SETTING(EndPointsPrecision, MeasurementLayer, int, 1)
00032    SETTING(LineColor, MeasurementLayer, ColorType, ColorType())
00033    SETTING(LineStyle, MeasurementLayer, LineStyle, SOLID_LINE)
00034    SETTING(LineWidth, MeasurementLayer, unsigned int, 0)
00035    SETTING(TextColor, MeasurementLayer, ColorType, ColorType())
00036    SETTING(TextFont, MeasurementLayer, std::string, "")
00037    SETTING(TextFontSize, MeasurementLayer, unsigned int, 12)
00038    SETTING(TextBold, MeasurementLayer, bool, false)
00039    SETTING(TextItalics, MeasurementLayer, bool, false)
00040    SETTING(TextUnderline, MeasurementLayer, bool, false)
00041    SETTING(DistanceUnits, MeasurementLayer, DistanceUnits, NO_DISTANCE_UNIT)
00042 
00043    /**
00044    *  Sets the status of displaying the distance text.
00045    *
00046    *  @param   bDisplay
00047    *           The new display status for the distance text.
00048    */
00049    virtual void setDisplayDistance(bool bDisplay) = 0;
00050 
00051    /**
00052    *  Returns the display status of the distance text.
00053    *
00054    *  @return  The distance display status.
00055    */
00056    virtual bool getDisplayDistance() const = 0;
00057 
00058    /**
00059    *  Sets the status of displaying the bearing text.
00060    *
00061    *  @param   bDisplay
00062    *           The new display status for the bearing text.
00063    */
00064    virtual void setDisplayBearing(bool bDisplay) = 0;
00065 
00066    /**
00067    *  Returns the display status of the bearing text.
00068    *
00069    *  @return  The bearing display status.
00070    */
00071    virtual bool getDisplayBearing() const = 0;
00072 
00073    /**
00074    *  Sets the status of displaying the end points text.
00075    *
00076    *  @param   bDisplay
00077    *           The new display status for the end points text.
00078    */
00079    virtual void setDisplayEndPoints(bool bDisplay) = 0;
00080 
00081    /**
00082    *  Returns the display status of the end points text.
00083    *
00084    *  @return  The end points display status.
00085    */
00086    virtual bool getDisplayEndPoints() const = 0;
00087 
00088    /**
00089    *  Returns the units used in displaying the distance.
00090    *
00091    *  @return  The distance units.
00092    */
00093    virtual DistanceUnits getDistanceUnits() const = 0;
00094 
00095    /**
00096    *  Sets the units to use in displaying the distance.
00097    *
00098    *  @param  unit
00099    *          The units to use in displaying the distance.
00100    */
00101    virtual void setDistanceUnits(DistanceUnits unit) = 0;
00102 
00103    /**
00104    *  Returns the geocoordinate type and data format used in displaying the 
00105    *  end point locations.
00106    *
00107    *  @param  geocoord
00108    *          The geocoordinate type.
00109    *  @param  dms
00110    *          The data format
00111    */
00112    virtual void getGeocoordTypes(GeocoordType &geocoord, DmsFormatType &dms) const = 0;
00113 
00114    /**
00115    *  Sets the geocoordinate type and data format to use in displaying the 
00116    *  end points locations.
00117    *
00118    *  @param  geocoord
00119    *          The geocoordinate type.
00120    *  @param  dms
00121    *          The data format.
00122    */
00123    virtual void setGeocoordTypes(GeocoordType geocoord, DmsFormatType dms) = 0;
00124 
00125 protected:
00126    /**
00127    * The MeasurementLayer is deleted by SpatialDataView when it is deleted.
00128    */
00129    virtual ~MeasurementLayer() {}
00130 };
00131 
00132 #endif

Software Development Kit - Opticks 4.9.0 Build 16218