CARMA C++
carma::ui::rtd::AngleCell Class Reference

@ brief A Cell that displays the current value of a MonitorPoint that represents an angle More...

#include <carma/ui/rtd/common/AngleCell.h>

Inheritance diagram for carma::ui::rtd::AngleCell:
carma::ui::rtd::MonitorCell carma::ui::rtd::Cell carma::ui::rtd::RtObject

Public Member Functions

virtual ::std::string computeText ()
 
void setAngleFormat (angleFormatType angleFormat)
 Set the display format type for the AngleCell. More...
 
void setModulus (modulusType modulus)
 The modulus in which to display the value. More...
 
virtual ~AngleCell ()
 destructor More...
 
- Public Member Functions inherited from carma::ui::rtd::MonitorCell
void colorIf (monitor::MonitorPoint &mp, sza::util::MonitorCondition condition, int sampleNo=0)
 
void colorIfFrequencyInGHz (sza::util::MonitorCondition condition)
 
bool conditionsAreMet ()
 
std::string getName ()
 
bool hasAntenna ()
 
void removeGoodColorTextOverride (const ::std::string &text)
 
void setAntenna (AntennaMapper::Antenna *ant)
 
void setErrorColor (CellColor errorColor)
 
void setGoodColor (CellColor goodColor)
 
void setGoodColorTextOverride (const ::std::string &text, CellColor color)
 
void setNotruncate ()
 Don't truncate value string; display stars if it overflows cell. More...
 
void setWarnColor (CellColor warnColor)
 
virtual void update ()
 Creates a new string that is the dynamic ascii contents of this object. More...
 
virtual void updateColor ()
 Automatically called as part of the update cycle to set background color. More...
 
virtual ~MonitorCell ()
 destructor More...
 
- Public Member Functions inherited from carma::ui::rtd::Cell
int addAlternative (const ::std::string &text, CellColor color)
 Add an alternate text string. More...
 
bool alternativeIsActive () const
 
 Cell (int indent, int chars, int width)
 Constructor. More...
 
 Cell (const char *fmt, int altLen=0)
 Constructor. More...
 
 Cell (const Format &fmt, int altLen=0)
 Constructor. More...
 
void clearActiveAlternative ()
 
char getAudio ()
 Get audio state code. More...
 
std::string getCellName () const
 
std::string getDynamicDescription () const
 
int getIndent () const
 Get the indentation for the text. More...
 
int getLen () const
 Get the length of the text string. More...
 
::std::string getPlotLabel () const
 Get the plot label. More...
 
std::string getText ()
 Get the dynamic text. More...
 
bool isGrayedOut ()
 
bool isPlottable () const
 Can contents be plotted (can it be converted to a number)? More...
 
bool isReplaceText () const
 Is this the dynamically formatted text or is it a replacement string set by nohw, overflow or an altString? More...
 
bool isValid ()
 Check validity of cell. More...
 
void serialize (bool initialize, int fontSize,::rtdproto::RtObject *rtobj)
 Describe (serialize) the static description of the cell. More...
 
void setActiveAlternative (int index)
 Select which alternate string to use. More...
 
void setAudio (char c)
 Set audio state code. More...
 
void setBorderBottomEnabled (bool state)
 
void setBorderLeftEnabled (bool state)
 
void setBorderRightEnabled (bool state)
 
void setBorderTopEnabled (bool state)
 Enable/disbable an edge of the cell border. More...
 
void setCellName (const std::string &s)
 
void setColor (CellColor color)
 Sets the single character background color code. More...
 
void setDynamicDescription (const std::string &s)
 
void setEmpty (bool state)
 
void setGrayedOut (bool state)
 
void setNa (bool tf)
 Set the "not applicable" flag to true/false. More...
 
void setNoAudio ()
 Turn off audio capability for the cell. More...
 
void setNohw (bool tf)
 Set the "no hardware" flag to true/false. More...
 
void setNohwColor (CellColor color)
 Sets the single character background color to use when there is no hardware. More...
 
void setPlotLabel (const ::std::string &s)
 Sets the label for a plot. More...
 
void setPlotLabel (int a, bool dev, const ::std::string &s)
 Creates a label string for a plot based on antenna & rx. More...
 
void setPlottable (bool yesOrNo)
 Sets whether the cell data may be plotted. More...
 
void setValidity (bool validity)
 Set the validity of cell. More...
 
- Public Member Functions inherited from carma::ui::rtd::RtObject
void appendToolTipText (const std::string &text)
 Append more text to the existing tool tip text. More...
 
Layout getLayout () const
 Get the layout for this object. More...
 
std::string getToolTipText ()
 
void setFontSize (int fontSize)
 Set the absolute font size for this object. More...
 
void setLayout (Layout layout)
 Set the layout for this object. More...
 
void setToolTipText (const std::string &text)
 Set the tool tip text for this RtObject. More...
 
virtual ~RtObject ()
 Destructor. More...
 

Static Public Member Functions

static std::string formatValue (double mpValue, std::string mpUnits, angleFormatType format, int width, modulusType modulus)
 
static AngleCellPtr makeCell (int cellWidth, monitor::MonitorPointDouble &monitorPoint)
 
static AngleCellPtr makeCell (int cellWidth, monitor::MonitorPointDouble &monitorPoint, int sampleNo)
 
- Static Public Member Functions inherited from carma::ui::rtd::MonitorCell
static MonitorCellPtr makeCell (monitor::MonitorPoint &monitorPoint)
 
static MonitorCellPtr makeCell (monitor::MonitorPoint &monitorPoint, int sampleNo)
 
static MonitorCellPtr makeCell (int cellWidth, monitor::MonitorPoint &monitorPoint)
 
static MonitorCellPtr makeCell (int cellWidth, monitor::MonitorPoint &monitorPoint, int sampleNo)
 
static MonitorCellPtr makeCell (monitor::MonitorPoint &monitorPoint, monitor::MonitorPoint &mpColor)
 
static MonitorCellPtr makeCell (monitor::MonitorPoint &monitorPoint, monitor::MonitorPoint &mpColor, int sampleNo)
 
static MonitorCellPtr makeCell (int cellWidth, monitor::MonitorPoint &monitorPoint, monitor::MonitorPoint &mpColor)
 
static MonitorCellPtr makeCell (int cellWidth, monitor::MonitorPoint &monitorPoint, monitor::MonitorPoint &mpColor, int sampleNo)
 

Protected Member Functions

 AngleCell (int cellWidth, bool setMpWidth, monitor::MonitorPointDouble &monitorPoint, int sampleNo)
 Constructor. More...
 
- Protected Member Functions inherited from carma::ui::rtd::MonitorCell
virtual CellColor computeColor ()
 
virtual CellColor computeErrorColor ()
 
virtual CellColor computeGoodColor ()
 
virtual ::std::string computeText ()
 
virtual CellColor computeWarnColor ()
 
int getSampleNo () const
 
 MonitorCell (int cellWidth, bool setMpWidth, monitor::MonitorPoint &monitorPoint, monitor::MonitorPoint &mpColor, int sampleNo)
 Constructor. More...
 
 MonitorCell (int cellWidth, bool setMpWidth, monitor::MonitorPoint &monitorPoint, int sampleNo)
 Constructor. More...
 
 MonitorCell (const MonitorCell &rhs)
 
MonitorCelloperator= (const MonitorCell &rhs)
 
int setMpWidthToFormatLength ()
 Sets the monitor point width to the internal Cell Format width. More...
 
- Protected Member Functions inherited from carma::ui::rtd::Cell
::std::string centerStringFmt (const ::std::string &s) const
 Helper to trim and center the formatted string. More...
 
void updateInt (int data)
 Create an output string for an integer. More...
 
- Protected Member Functions inherited from carma::ui::rtd::RtObject
int getFontSize (int parentFontSize) const
 Get the absolute font size for this object. More...
 
int getFontSize () const
 Get the absolute font size for this object. More...
 
 RtObject ()
 Constructor. More...
 

Additional Inherited Members

- Protected Types inherited from carma::ui::rtd::MonitorCell
typedef ::std::map
< ::std::string, CellColor
StringToColorMap
 
- Static Protected Member Functions inherited from carma::ui::rtd::MonitorCell
static MonitorCellPtr makeCell (int cellWidth, bool setMpWidth, monitor::MonitorPoint &monitorPoint, int sampleNo)
 
static MonitorCellPtr makeCell (int cellWidth, bool setMpWidth, monitor::MonitorPoint &monitorPoint, monitor::MonitorPoint &mpColor, int sampleNo)
 
- Protected Attributes inherited from carma::ui::rtd::MonitorCell
AntennaMapper::Antenna * antenna_
 
std::vector< Condition > conditions_
 
CellColor defaultGoodColor_
 
CellColor errorColor_
 
::std::auto_ptr< StringToColorMap > goodColorTextOverrides_
 
monitor::MonitorPointmp_
 
monitor::MonitorPointmpc_
 
const int sampleNo_
 
bool truncateFlag_
 
CellColor warnColor_
 
- Protected Attributes inherited from carma::ui::rtd::Cell
char audio
 Audio cell control ('E'/'Y'/'N') - enabled,y,n. More...
 
::std::ostringstream fmtOss_
 Formatted text stream. More...
 
const Format format_
 Format for cell data. More...
 
int indent
 Left indent of chars. More...
 
const char * legit
 Deprecated... More...
 
int len
 Total number of chars. More...
 
::std::string text
 Formatted text. More...
 

Detailed Description

@ brief A Cell that displays the current value of a MonitorPoint that represents an angle

Definition at line 69 of file AngleCell.h.

Constructor & Destructor Documentation

virtual carma::ui::rtd::AngleCell::~AngleCell ( )
virtual

destructor

carma::ui::rtd::AngleCell::AngleCell ( int  cellWidth,
bool  setMpWidth,
monitor::MonitorPointDouble monitorPoint,
int  sampleNo 
)
protected

Constructor.

Parameters
cellWidthcell width in characters
monitorPointreference to the MonitorPoint to dispaly
sampleNoFor monitor points with multiple samples, the sample number to use in the display. Default is zero, which means use the average of all samples.
See Also
MonitorPointComplex::setStringRepresentation()

Member Function Documentation

void carma::ui::rtd::AngleCell::setAngleFormat ( angleFormatType  angleFormat)

Set the display format type for the AngleCell.

The unit of the associated monitor point is determined from MonitorPoint::getUnits() and Conformable Quantities are used to convert the value to appropriate units for display. Default at construction time is radians.

Parameters
Theenumerate angle format type
See Also
carma::services::Units
carma::services::Angle
carma::services::DecAngle
void carma::ui::rtd::AngleCell::setModulus ( modulusType  modulus)

The modulus in which to display the value.

For instance if the angle is Declination, use MOD_PI. Default at construction time is no modulus (MOD_NONE);

Parameters
modulusThe modulus type

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