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 00011 00012 #ifndef TIE_POINT_LAYER_H 00013 #define TIE_POINT_LAYER_H 00014 00015 #include "ColorType.h" 00016 #include "Layer.h" 00017 #include "ConfigurationSettings.h" 00018 00019 /** 00020 * Adjusts the properties of a tie point layer. 00021 * 00022 * A tie point layer consists of markers identifying locations in a scene that are used as 00023 * tie points between one scene and another. The marker has four properties: color, symbol, 00024 * symbol size and id state. The size of the marker represents the number of pixels in 00025 * diameter that the marker covers. This class provides the means to set the properties for 00026 * the current tie point layer. 00027 * 00028 * This subclass of Subject will notify upon the following conditions: 00029 * - The following methods are called: setColor(), setSymbolSize(), 00030 * enableLabels(). 00031 * - Everything else documented in Layer. 00032 * 00033 * @see Layer 00034 */ 00035 class TiePointLayer : public Layer 00036 { 00037 public: 00038 SETTING(AutoColor, TiePointLayer, bool, false) 00039 SETTING(LabelEnabled, TiePointLayer, bool, false) 00040 SETTING(MarkerColor, TiePointLayer, ColorType, ColorType()) 00041 SETTING(MarkerSize, TiePointLayer, unsigned int, 0) 00042 00043 /** 00044 * Emitted with any<ColorType> when the color is changed. 00045 */ 00046 SIGNAL_METHOD(TiePointLayer, ColorChanged) 00047 /** 00048 * Emitted with any<int> when the symbol size is changed. 00049 */ 00050 SIGNAL_METHOD(TiePointLayer, SizeChanged) 00051 /** 00052 * Emitted with any<bool> when labels are enabled or disabled. 00053 */ 00054 SIGNAL_METHOD(TiePointLayer, LabelsEnabled) 00055 00056 /** 00057 * Sets the marker color for the current tie point layer. 00058 * 00059 * @param colorType 00060 * The new marker color. 00061 * 00062 * @notify This method will signalColorChanged with any<ColorType>. 00063 * 00064 * @see getColor() 00065 */ 00066 virtual void setColor(const ColorType& colorType) = 0; 00067 00068 /** 00069 * Returns the marker color of the current tie point layer. 00070 * 00071 * @return The current marker color. 00072 * 00073 * @see setColor() 00074 */ 00075 virtual ColorType getColor() const = 0; 00076 00077 /** 00078 * Sets the marker symbol size for the current tie point layer. 00079 * 00080 * Sets the marker symbol size for the current tie point layer. 00081 * %Setting the size to 0 causes the symbol to degenerate to 00082 * a single pixel. 00083 * 00084 * @param iSize 00085 * The new marker symbol size. 00086 * 00087 * @notify This method will notify signalSizeChanged with any<int>. 00088 * 00089 * @see getSymbolSize() 00090 */ 00091 virtual void setSymbolSize(int iSize) = 0; 00092 00093 /** 00094 * Returns the marker symbol size of the current tie point layer. 00095 * 00096 * @return The current marker symbol size. 00097 * 00098 * @see setSymbolSize() 00099 */ 00100 virtual int getSymbolSize() const = 0; 00101 00102 /** 00103 * Specifies whether the tie point labels are displayed or not. 00104 * 00105 * Specifies whether the tie points are labeled with their 00106 * numeric index or not. 00107 * 00108 * @param enabled 00109 * If true, the tie points will be drawn with their 00110 * numeric labels adjacent, otherwise the labels 00111 * will not be drawn. 00112 * 00113 * @notify This method will notify signalLabelsEnabled with any<bool>. 00114 * 00115 * @see areLabelsEnabled() 00116 */ 00117 virtual void enableLabels(bool enabled) = 0; 00118 00119 /** 00120 * Indicates if tie point labels are being displayed 00121 * 00122 * Indicates if the tie points are currently being 00123 * labeled with their numeric indices. 00124 * 00125 * @return True if the tie points are being drawn with 00126 * their numeric indices; false otherwise. 00127 * 00128 * @see enableLabels() 00129 */ 00130 virtual bool areLabelsEnabled() const = 0; 00131 00132 /** 00133 * Indicates if the layer is on a mission image. 00134 * 00135 * Indicates if the tie point layer is on a mission image. This will 00136 * determine if the mission offset is applied to the tie point coordinates 00137 * when they are being drawn. 00138 * 00139 * @return True if the tie point layer is being drawn on a 00140 * mission image; false otherwise. 00141 * 00142 * @see setIsMission() 00143 */ 00144 virtual bool isMission() const = 0; 00145 00146 /** 00147 * Specifies whether the layer is on a mission image or not. 00148 * 00149 * Specifies if the tie point layer is on a mission image. This will 00150 * determine if the mission offset is applied to the tie point coordinates 00151 * when they are being drawn. 00152 * 00153 * @param bIsMission 00154 * Specifies if the layer is on a mission image. 00155 * 00156 * @see isMission() 00157 */ 00158 virtual void setIsMission(bool bIsMission) = 0; 00159 00160 protected: 00161 /** 00162 * This should be destroyed by calling SpatialDataView::deleteLayer. 00163 */ 00164 virtual ~TiePointLayer() {} 00165 }; 00166 00167 #endif