diff options
Diffstat (limited to 'src/libgui/log_view.cpp')
-rw-r--r-- | src/libgui/log_view.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/src/libgui/log_view.cpp b/src/libgui/log_view.cpp index 158c281..f0a1830 100644 --- a/src/libgui/log_view.cpp +++ b/src/libgui/log_view.cpp @@ -8,17 +8,17 @@ ***************************************************************************/ #include "log_view.h" -#include <qpopupmenu.h> -#include <qeventloop.h> -#include <qapplication.h> +#include <tqpopupmenu.h> +#include <tqeventloop.h> +#include <tqapplication.h> #include <kiconloader.h> #include "global_config.h" #include "common/gui/purl_gui.h" #include "common/gui/misc_gui.h" -Log::Widget::Widget(QWidget *parent, const char *name) - : QTextEdit(parent, name) +Log::Widget::Widget(TQWidget *tqparent, const char *name) + : TQTextEdit(tqparent, name) { setTextFormat(LogText); setMinimumWidth(300); @@ -29,66 +29,66 @@ void Log::Widget::updateDebugLevel() setDebugLevel(GlobalConfig::debugLevel()); } -void Log::Widget::logExtra(const QString &text) +void Log::Widget::logExtra(const TQString &text) { _text += text; if ( GlobalConfig::logOutputType()==GuiConsole ) fprintf(stdout, "%s", text.latin1()); } -void Log::Widget::doLog(LineType type, const QString &text, Action action) +void Log::Widget::doLog(LineType type, const TQString &text, Action action) { doLog(text, type.data().color, type.data().bold, action); } -void Log::Widget::doLog(DebugLevel level, const QString &text, Action action) +void Log::Widget::doLog(DebugLevel level, const TQString &text, Action action) { doLog(text, level.data().color, false, action); } -void Log::Widget::doLog(const QString &text, const QString &color, bool bold, Action action) +void Log::Widget::doLog(const TQString &text, const TQString &color, bool bold, Action action) { logExtra(text + "\n"); - QString s = QString("<font color=%1>").arg(color); + TQString s = TQString("<font color=%1>").tqarg(color); if (bold) s += "<b>"; s += escapeXml(text); if (bold) s += "</b>"; s += "</font>"; - QTextEdit::append(s); - updateContents(); // #### fix bug in Qt (display is messed up) + TQTextEdit::append(s); + updateContents(); // #### fix bug in TQt (display is messed up) ensureVisible(0, contentsHeight()); if ( action==Immediate) - QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput); + TQApplication::eventLoop()->processEvents(TQEventLoop::ExcludeUserInput); } -void Log::Widget::appendToLastLine(const QString &text) +void Log::Widget::appendToLastLine(const TQString &text) { logExtra(text); uint p = paragraphs() - 1; insertAt(escapeXml(text), p, paragraphLength(p)); - updateContents(); // #### fix bug in Qt (display is messed up) + updateContents(); // #### fix bug in TQt (display is messed up) ensureVisible(0, contentsHeight()); // immediately visible... - QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput); + TQApplication::eventLoop()->processEvents(TQEventLoop::ExcludeUserInput); } -QPopupMenu *Log::Widget::createPopupMenu(const QPoint &pos) +TQPopupMenu *Log::Widget::createPopupMenu(const TQPoint &pos) { updateDebugLevel(); - _popup = QTextEdit::createPopupMenu(pos); + _popup = TQTextEdit::createPopupMenu(pos); KIconLoader loader; - QIconSet iset = loader.loadIconSet("filesave", KIcon::Small, 0); - _popup->insertItem(iset, "Save As...", this, SLOT(saveAs())); + TQIconSet iset = loader.loadIconSet("filesave", KIcon::Small, 0); + _popup->insertItem(iset, "Save As...", this, TQT_SLOT(saveAs())); iset = loader.loadIconSet("fileclose", KIcon::Small, 0); - _popup->insertItem(iset, "Clear", this, SLOT(clear())); + _popup->insertItem(iset, "Clear", this, TQT_SLOT(clear())); _popup->insertSeparator(); FOR_EACH(DebugLevel, level) { _id[level.type()] = _popup->insertItem(level.label()); _popup->setItemChecked(_id[level.type()], _debugLevel==level); } _popup->insertSeparator(); - int id = _popup->insertItem(i18n("Output in console"), this, SLOT(toggleConsoleOutput())); + int id = _popup->insertItem(i18n("Output in console"), this, TQT_SLOT(toggleConsoleOutput())); _popup->setItemChecked(id, GlobalConfig::logOutputType()==GuiConsole); - connect(_popup, SIGNAL(activated(int)), SLOT(toggleVisible(int))); + connect(_popup, TQT_SIGNAL(activated(int)), TQT_SLOT(toggleVisible(int))); return _popup; } @@ -108,13 +108,13 @@ void Log::Widget::toggleConsoleOutput() GlobalConfig::writeLogOutputType(GlobalConfig::logOutputType()==GuiOnly ? GuiConsole : GuiOnly); } -void Log::Widget::sorry(const QString &message, const QString &details) +void Log::Widget::sorry(const TQString &message, const TQString &details) { logExtra(message + " [" + details + "]\n"); MessageBox::detailedSorry(message, details, Log::Show); } -bool Log::Widget::askContinue(const QString &message) +bool Log::Widget::askContinue(const TQString &message) { bool ok = MessageBox::askContinue(message); logExtra(message + " [" + (ok ? "continue" : "cancel") + "]\n"); @@ -123,8 +123,8 @@ bool Log::Widget::askContinue(const QString &message) void Log::Widget::clear() { - QTextEdit::clear(); - _text = QString::null; + TQTextEdit::clear(); + _text = TQString(); } void Log::Widget::saveAs() |