llstatgraph.h

Go to the documentation of this file.
00001 
00032 #ifndef LL_LLSTATGRAPH_H
00033 #define LL_LLSTATGRAPH_H
00034 
00035 #include "llview.h"
00036 #include "llframetimer.h"
00037 #include "v4color.h"
00038 
00039 class LLStat;
00040 
00041 class LLStatGraph : public LLView
00042 {
00043 public:
00044         LLStatGraph(const std::string& name, const LLRect& rect);
00045 
00046         virtual void draw();
00047 
00048         void setLabel(const char *label);
00049         void setUnits(const char *units);
00050         void setPrecision(const S32 precision);
00051         void setStat(LLStat *statp);
00052         void setThreshold(const S32 i, F32 value);
00053         void setMin(const F32 min);
00054         void setMax(const F32 max);
00055 
00056         /*virtual*/ void setValue(const LLSD& value);
00057         
00058         LLStat *mStatp;
00059         BOOL mPerSec;
00060 private:
00061         F32 mValue;
00062 
00063         F32 mMin;
00064         F32 mMax;
00065         LLFrameTimer mUpdateTimer;
00066         LLString mLabel;
00067         LLString mUnits;
00068         S32 mPrecision; // Num of digits of precision after dot
00069 
00070         S32 mNumThresholds;
00071         F32 mThresholds[4];
00072         LLColor4 mThresholdColors[4];
00073 };
00074 
00075 #endif  // LL_LLSTATGRAPH_H

Generated on Fri May 16 08:34:02 2008 for SecondLife by  doxygen 1.5.5