diff options
Diffstat (limited to 'src/common/global/log.h')
-rw-r--r-- | src/common/global/log.h | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/src/common/global/log.h b/src/common/global/log.h index 7383d57..eff0b88 100644 --- a/src/common/global/log.h +++ b/src/common/global/log.h @@ -9,7 +9,7 @@ #ifndef LOG_H #define LOG_H -#include <qstringlist.h> +#include <tqstringlist.h> #include "common/common/key_enum.h" @@ -34,11 +34,11 @@ class Generic { public: virtual ~Generic() {} - virtual void log(LineType type, const QString &text, Action action = Immediate) = 0; - virtual void log(DebugLevel level, const QString &text, Action action = Immediate) = 0; - virtual void appendToLastLine(const QString &text) = 0; - virtual void sorry(const QString &message, const QString &details) = 0; - virtual bool askContinue(const QString &message) = 0; + virtual void log(LineType type, const TQString &text, Action action = Immediate) = 0; + virtual void log(DebugLevel level, const TQString &text, Action action = Immediate) = 0; + virtual void appendToLastLine(const TQString &text) = 0; + virtual void sorry(const TQString &message, const TQString &details) = 0; + virtual bool askContinue(const TQString &message) = 0; virtual void clear() = 0; virtual void logUserAbort() = 0; }; @@ -50,8 +50,8 @@ public: ShowMode showMode(LineType type) const { return _modes[type.type()]; } void setShowMode(LineType type, ShowMode mode) { _modes[type.type()] = mode; } void setDebugLevel(DebugLevel level); - virtual void log(LineType type, const QString &text, Action action = Immediate); - virtual void log(DebugLevel level, const QString &text, Action action = Immediate); + virtual void log(LineType type, const TQString &text, Action action = Immediate); + virtual void log(DebugLevel level, const TQString &text, Action action = Immediate); virtual void logUserAbort(); protected: @@ -59,8 +59,8 @@ protected: DebugLevel _debugLevel; virtual void updateDebugLevel() {} - virtual void doLog(LineType type, const QString &text, Action action) = 0; - virtual void doLog(DebugLevel level, const QString &text, Action action) = 0; + virtual void doLog(LineType type, const TQString &text, Action action) = 0; + virtual void doLog(DebugLevel level, const TQString &text, Action action) = 0; }; //----------------------------------------------------------------------------- @@ -68,38 +68,38 @@ class StringView : public View { public: StringView() {} - QString string() const { return _s; } - virtual void appendToLastLine(const QString &text) { _s += text; } - virtual void clear() { _s = QString::null; } - virtual void sorry(const QString &message, const QString &details); - virtual bool askContinue(const QString &message); + TQString string() const { return _s; } + virtual void appendToLastLine(const TQString &text) { _s += text; } + virtual void clear() { _s = TQString(); } + virtual void sorry(const TQString &message, const TQString &details); + virtual bool askContinue(const TQString &message); private: - QString _s; + TQString _s; - virtual void doLog(LineType, const QString &text, Action) { _s += text + "\n"; } - virtual void doLog(DebugLevel, const QString &text, Action) { _s += text + "\n"; } + virtual void doLog(LineType, const TQString &text, Action) { _s += text + "\n"; } + virtual void doLog(DebugLevel, const TQString &text, Action) { _s += text + "\n"; } }; //----------------------------------------------------------------------------- class Base : public Generic { public: - Base(Base *parent = 0); + Base(Base *tqparent = 0); virtual ~Base(); - void setParent(Base *parent); + void setParent(Base *tqparent); void setView(View *view); View *view() { return logData()->view; } - virtual void log(LineType type, const QString &message, Action action = Immediate); - virtual void log(DebugLevel level, const QString &message, Action action = Immediate); - virtual void appendToLastLine(const QString &text); - void setError(const QString &error) { logData()->error = error; } + virtual void log(LineType type, const TQString &message, Action action = Immediate); + virtual void log(DebugLevel level, const TQString &message, Action action = Immediate); + virtual void appendToLastLine(const TQString &text); + void setError(const TQString &error) { logData()->error = error; } virtual bool hasError() const { return !logData()->error.isNull(); } - virtual QString error() const { return logData()->error; } - virtual void resetError() { logData()->error = QString::null; } - virtual void sorry(const QString &message, const QString &details = QString::null); - virtual bool askContinue(const QString &message); + virtual TQString error() const { return logData()->error; } + virtual void resetError() { logData()->error = TQString(); } + virtual void sorry(const TQString &message, const TQString &details = TQString()); + virtual bool askContinue(const TQString &message); virtual void clear(); void logUserAbort(); @@ -108,7 +108,7 @@ protected: class LogData { public: LogData() : view(0) {} - QString error; + TQString error; View *view; }; LogData *_data; @@ -118,15 +118,15 @@ protected: class KeyList { public: - KeyList(const QString &title = QString::null) : _title(title) {} - void setTitle(const QString &title) { _title = title; } - void append(const QString &key, const QString &label) { _keys += key; _labels += label; } - QString text() const; + KeyList(const TQString &title = TQString()) : _title(title) {} + void setTitle(const TQString &title) { _title = title; } + void append(const TQString &key, const TQString &label) { _keys += key; _labels += label; } + TQString text() const; void display(Generic &log) const; private: - QString _title; - QStringList _keys, _labels; + TQString _title; + TQStringList _keys, _labels; }; } // namespace |