diff options
Diffstat (limited to 'src/resultlistviewtext.cpp')
-rw-r--r-- | src/resultlistviewtext.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/src/resultlistviewtext.cpp b/src/resultlistviewtext.cpp index 3957f61..946dc82 100644 --- a/src/resultlistviewtext.cpp +++ b/src/resultlistviewtext.cpp @@ -18,19 +18,19 @@ */ #include <kdebug.h> -#include <qregexp.h> -#include <qpainter.h> -#include <qfontmetrics.h> -#include <qfont.h> -#include <qpalette.h> +#include <tqregexp.h> +#include <tqpainter.h> +#include <tqfontmetrics.h> +#include <tqfont.h> +#include <tqpalette.h> #include "resultlistviewtext.h" using namespace ResultList; ResultListViewText::ResultListViewText(KListView *listView, - const QString &text, - const QString &result, + const TQString &text, + const TQString &result, ResultListViewText *after, bool isError) : KListViewItem(listView, after, text, result), m_text(text), @@ -41,7 +41,7 @@ ResultListViewText::ResultListViewText(KListView *listView, } ResultListViewText::ResultListViewText(KListView *listView, - const QString &text, + const TQString &text, const Abakus::number_t &result, ResultListViewText *after, bool isError) @@ -54,7 +54,7 @@ ResultListViewText::ResultListViewText(KListView *listView, for (; item && item != this; item = static_cast<ResultListViewText *>(item->itemBelow())) { if(!item->wasError()) { item->setStackPosition(item->stackPosition() + 1); - item->repaint(); + item->tqrepaint(); } } } @@ -67,7 +67,7 @@ ResultListViewText::ResultListViewText(KListView *listView, void ResultListViewText::setStackPosition(unsigned pos) { - setText(ShortcutColumn, QString("$%1").arg(pos)); + setText(ShortcutColumn, TQString("$%1").tqarg(pos)); m_stackPosition = pos; } @@ -80,51 +80,51 @@ void ResultListViewText::precisionChanged() setText(ResultColumn, m_result); } -void ResultListViewText::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int align) +void ResultListViewText::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align) { - QColorGroup group(cg); + TQColorGroup group(cg); - // XXX: The Qt::red may not provide good contrast with weird color schemes. + // XXX: The TQt::red may not provide good contrast with weird color schemes. // If so I apologize. if(m_wasError && column == ResultColumn) - group.setColor(QColorGroup::Text, m_result == "OK" ? cg.link() : Qt::red); + group.setColor(TQColorGroup::Text, m_result == "OK" ? cg.link() : TQt::red); if(column == ResultColumn) { - QFont f = p->font(); + TQFont f = p->font(); f.setBold(true); p->setFont(f); } if(column == ShortcutColumn) { - QFont f = p->font(); + TQFont f = p->font(); f.setItalic(true); - f.setPointSize(QMIN(f.pointSize() * 9 / 11, 10)); + f.setPointSize(TQMIN(f.pointSize() * 9 / 11, 10)); p->setFont(f); } KListViewItem::paintCell(p, group, column, width, align); } -int ResultListViewText::width(const QFontMetrics &fm, const QListView *lv, int c) const +int ResultListViewText::width(const TQFontMetrics &fm, const TQListView *lv, int c) const { // Simulate painting the text to get accurate results. if(c == ResultColumn) { - QFont f = lv->font(); + TQFont f = lv->font(); f.setBold(true); - return KListViewItem::width(QFontMetrics(f), lv, c); + return KListViewItem::width(TQFontMetrics(f), lv, c); } if(c == ShortcutColumn) { - QFont f = lv->font(); + TQFont f = lv->font(); f.setItalic(true); - f.setPointSize(QMIN(f.pointSize() * 9 / 11, 10)); - return KListViewItem::width(QFontMetrics(f), lv, c); + f.setPointSize(TQMIN(f.pointSize() * 9 / 11, 10)); + return KListViewItem::width(TQFontMetrics(f), lv, c); } return KListViewItem::width(fm, lv, c); } -void ResultListViewText::setText(int column, const QString &text) +void ResultListViewText::setText(int column, const TQString &text) { if(!m_wasError && column == ResultColumn) { KListViewItem::setText(column, m_value.toString()); |