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 EWidgetType getWidgetType() const;
00047         virtual LLString getWidgetTag() const;
00048         virtual void draw();
00049 
00050         void setLabel(const char *label);
00051         void setUnits(const char *units);
00052         void setPrecision(const S32 precision);
00053         void setStat(LLStat *statp);
00054         void setThreshold(const S32 i, F32 value);
00055         void setMin(const F32 min);
00056         void setMax(const F32 max);
00057 
00058         void setValue(const F32 value);
00059         LLStat *mStatp;
00060         BOOL mPerSec;
00061 private:
00062         F32 mValue;
00063 
00064         F32 mMin;
00065         F32 mMax;
00066         LLFrameTimer mUpdateTimer;
00067         LLString mLabel;
00068         LLString mUnits;
00069         S32 mPrecision; // Num of digits of precision after dot
00070 
00071         S32 mNumThresholds;
00072         F32 mThresholds[4];
00073         LLColor4 mThresholdColors[4];
00074 };
00075 
00076 #endif  // LL_LLSTATGRAPH_H

Generated on Thu Jul 1 06:09:13 2010 for Second Life Viewer by  doxygen 1.4.7