Improve traces. Simplify folder management.
[dorian] / trace.h
1 #ifndef TRACE_H
2 #define TRACE_H
3
4 #include <QtDebug>
5 #include <QString>
6 #include <QTime>
7 #include <QEvent>
8
9 class Trace
10 {
11 public:
12     Trace(const QString &s);
13     ~Trace();
14     static QString event(QEvent::Type t);
15     static void messageHandler(QtMsgType type, const char *msg);
16     static QtMsgType level;
17
18 protected:
19     static const char *prefix();
20     QString name;
21     static int indent;
22     typedef struct {int type; const char *name;} EventName;
23     static EventName eventTab[];
24 };
25
26 #endif // TRACE_H