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

A CellDble variant with max and min limits to set background colors. More...

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

Inheritance diagram for carma::ui::rtd::CellDbleMM:
carma::ui::rtd::CellDble carma::ui::rtd::Cell carma::ui::rtd::RtObject

Public Member Functions

 CellDbleMM (const char *fmt, int rod, const char *legit, const double &data)
 Constructor. More...
 
 CellDbleMM (const char *fmt, int rod, const double &data)
 Constructor, data is assumed to always be legitimate. More...
 
void setErrColor (CellColor color)
 Sets color to use for error (red is default) More...
 
void setLimits (double warnHi, double warnLo, double errHi, double errLo)
 Sets limits. More...
 
void setWarnColor (CellColor color)
 Sets color to use for warning (yellow is default) More...
 
virtual void updateColor ()
 Update background color based on limits. More...
 
- Public Member Functions inherited from carma::ui::rtd::CellDble
 CellDble (const char *fmt, int rod, const char *legit, const double &data)
 Constructor. More...
 
 CellDble (const char *fmt, int rod, const char *legit, const double &data, int altLen)
 Constructor. More...
 
 CellDble (const char *fmt, int rod, const double &data)
 Constructor that assumes data is always legitimate. More...
 
virtual void update ()
 Creates a new string that is the dynamic ascii contents of this object. 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...
 

Additional Inherited Members

- 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...
 
- Protected Attributes inherited from carma::ui::rtd::CellDble
const double & data
 Reference to the data. More...
 
const int rod
 Number of characters to right of the decimal point. More...
 
- 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

A CellDble variant with max and min limits to set background colors.

The limits are fixed, with two sets of thresholds (Warn/Err) that map to two different colors. The constructors are the same as CellDble with the limits being set with an additional method call.

Definition at line 121 of file CellMM.h.

Constructor & Destructor Documentation

carma::ui::rtd::CellDbleMM::CellDbleMM ( const char *  fmt,
int  rod,
const char *  legit,
const double &  data 
)

Constructor.

Parameters
fmtstandard text cell format string
rodnumber of places to the right of the decimal point
legitpointer to legitimate data flag
datareference to the dynamic data
See Also
Format
carma::ui::rtd::CellDbleMM::CellDbleMM ( const char *  fmt,
int  rod,
const double &  data 
)

Constructor, data is assumed to always be legitimate.

Parameters
fmtstandard text cell format string
rodnumber of places to the right of the decimal point
datareference to the dynamic data
See Also
Format

Member Function Documentation

void carma::ui::rtd::CellDbleMM::setErrColor ( CellColor  color)

Sets color to use for error (red is default)

void carma::ui::rtd::CellDbleMM::setLimits ( double  warnHi,
double  warnLo,
double  errHi,
double  errLo 
)

Sets limits.

void carma::ui::rtd::CellDbleMM::setWarnColor ( CellColor  color)

Sets color to use for warning (yellow is default)

virtual void carma::ui::rtd::CellDbleMM::updateColor ( )
virtual

Update background color based on limits.

Reimplemented from carma::ui::rtd::Cell.


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