00001 #ifndef TRACEMODULE_H 00002 #define TRACEMODULE_H 00003 00004 #include <qlistview.h> 00005 #include <qstring.h> 00006 00007 class CTraceManager; 00008 00009 class CTraceModule 00010 { 00011 private: 00012 CTraceManager *m_pManager; 00013 QString ModuleName; 00014 int m_Level; 00015 char LargeBuffer[2048]; 00016 00017 public: 00018 CTraceModule(CTraceManager *mgr, const QString &name, int level); 00019 00020 QString GetName() const; 00021 int GetLevel() const; 00022 00023 void Enter(const QString &function_name); 00024 void Enter(const QString &file_name, int line_number); 00025 void Leave(const QString &function_name); 00026 void Leave(const QString &file_name, int line_number); 00027 void Log(int level, const char *fmt, ...); 00028 00029 public slots: 00030 void IncLevel(); 00031 void DecLevel(); 00032 void SetLevel(int); 00033 }; 00034 00035 00036 00037 #endif