00001 #ifndef PERFORMANCEOVERLAY_H 00002 #define PERFORMANCEOVERLAY_H 00003 00004 /**************************************************************************\ 00005 * REQUIRED HEADERS * 00006 \**************************************************************************/ 00007 #include <QPainter> 00008 00009 #include "Definitions.h" 00010 #include "Memory/mmgr.h" 00011 00012 /**************************************************************************\ 00013 * DEFINITIONS * 00014 \**************************************************************************/ 00015 00016 /**************************************************************************\ 00017 * CLASS * 00018 \**************************************************************************/ 00019 class PerformanceOverlay 00020 { 00021 00022 /**************************************************************************\ 00023 * PUBLIC CLASS FUNCTIONS * 00024 \**************************************************************************/ 00025 public: 00026 PerformanceOverlay(void); 00027 ~PerformanceOverlay(void); 00028 00029 void Draw(QPainter *painter); 00030 void Reset(); 00031 inline void IncFrame(){frameCount++;} 00032 inline void SetFps(){fps = frameCount;frameCount = 0;} 00033 00034 /**************************************************************************\ 00035 * PROTECTED CLASS FUNCTIONS * 00036 \**************************************************************************/ 00037 protected: 00038 00039 /**************************************************************************\ 00040 * PRIVATE CLASS FUNCTIONS * 00041 \**************************************************************************/ 00042 private: 00043 00044 /**************************************************************************\ 00045 * PRIVATE CLASS MEMBERS * 00046 \**************************************************************************/ 00047 int fps; 00048 int frameCount; 00049 }; 00050 00051 00052 #endif PERFORMANCEOVERLAY_H 00053