CARMA C++
CellMM.h
1 #ifndef CARMA_UI_RTD_CELLMM_H
2 #define CARMA_UI_RTD_CELLMM_H
3 
4 #include "carma/ui/rtd/common/RtDisplay.h"
5 
6 
7 namespace carma {
8 namespace ui {
9 namespace rtd {
10 
11 
17 class CellShortMM : public CellShort {
18  public:
26  CellShortMM(const char* fmt, const char* legit, const short& data);
33  CellShortMM(const char* fmt, const short& data);
34 
36  void setLimits(short warnHi, short warnLo, short errHi, short errLo);
38  virtual void updateColor();
40  void setWarnColor(CellColor color);
42  void setErrColor(CellColor color);
43 
44  private:
46  short limSet;
48  short warnHi;
49  short warnLo;
51  short errHi;
52  short errLo;
54  CellColor warnColor_;
56  CellColor errColor_;
57 };
58 
59 
67 class CellFloatMM : public CellFloat {
68  public:
77  CellFloatMM(const char* fmt, int rod, const char* legit, const float& data);
85  CellFloatMM(const char* fmt, int rod, const float& data);
86 
88  void setLimits(float warnHi, float warnLo, float errHi, float errLo);
90  virtual void updateColor();
92  void setWarnColor(CellColor color);
94  void setErrColor(CellColor color);
95 
96  private:
98  int limSet;
100  float warnHi;
102  float warnLo;
104  float errHi;
106  float errLo;
108  CellColor warnColor_;
110  CellColor errColor_;
111 };
112 
113 
121 class CellDbleMM : public CellDble {
122  public:
131  CellDbleMM(const char* fmt, int rod, const char* legit, const double& data);
139  CellDbleMM(const char* fmt, int rod, const double& data);
140 
142  void setLimits(double warnHi, double warnLo, double errHi, double errLo);
144  virtual void updateColor();
146  void setWarnColor(CellColor color);
148  void setErrColor(CellColor color);
149 
150  private:
152  int limSet;
154  double warnHi;
156  double warnLo;
158  double errHi;
160  double errLo;
162  CellColor warnColor_;
164  CellColor errColor_;
165 };
166 
167 
168 } // namespace carma::ui::rtd
169 } // namespace carma::ui
170 } // namespace carma
171 
172 
173 #endif
virtual void updateColor()
Update background color based on limits.
virtual void updateColor()
Update background color based on limits.
A CellDble variant with max and min limits to set background colors.
Definition: CellMM.h:121
void setWarnColor(CellColor color)
Sets color to use for warning (yellow is default)
void setLimits(float warnHi, float warnLo, float errHi, float errLo)
Sets limits.
CellDbleMM(const char *fmt, int rod, const char *legit, const double &data)
Constructor.
void setWarnColor(CellColor color)
Set the background color for the warning condition.
void setErrColor(CellColor color)
Set the background color for the error condition.
A Cell with short integer data.
Definition: RtDisplay.h:1164
const int rod
Number of characters to right of the decimal point.
Definition: RtDisplay.h:893
CellShortMM(const char *fmt, const char *legit, const short &data)
Constructor.
const char * legit
Deprecated...
Definition: RtDisplay.h:517
void setLimits(short warnHi, short warnLo, short errHi, short errLo)
Sets limits for background colors.
void setLimits(double warnHi, double warnLo, double errHi, double errLo)
Sets limits.
void setWarnColor(CellColor color)
Sets color to use for warning (yellow is default)
const int rod
Number of characters to right of the decimal point.
Definition: RtDisplay.h:941
const float & data
Reference to the data.
Definition: RtDisplay.h:891
void setErrColor(CellColor color)
Sets color to use for error (red is default)
const double & data
Reference to the data.
Definition: RtDisplay.h:939
CellFloatMM(const char *fmt, int rod, const char *legit, const float &data)
Constructor.
A Cell that displays the contents of a double.
Definition: RtDisplay.h:903
virtual void updateColor()
Update the background color.
A CellDble variant with max and min limits to set background colors.
Definition: CellMM.h:67
A Cell that displays the contents of a float.
Definition: RtDisplay.h:855
void setErrColor(CellColor color)
Sets color to use for error (red is default)
A Cell with short data and thresholds for setting background color.
Definition: CellMM.h:17
const short & data
Pointer to the data.
Definition: RtDisplay.h:1198
enum carma::ui::rtd::CellColorEnum CellColor
Cell color choices.