diff options
author | Slávek Banko <[email protected]> | 2013-07-27 16:57:53 +0200 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2013-07-27 18:48:46 +0200 |
commit | 7c2bc4b5ce4fc1a72868aa949e9ec49fbe2e7931 (patch) | |
tree | 4655c7263ca5c64d23d10167cb459dd9cb253815 /src/arkollon/headerlistitem.cpp | |
parent | 88ea2b6cd4382627fb6efca9cc54825aee881d1e (diff) | |
download | tork-7c2bc4b5ce4fc1a72868aa949e9ec49fbe2e7931.tar.gz tork-7c2bc4b5ce4fc1a72868aa949e9ec49fbe2e7931.zip |
Initial TQt conversion
Diffstat (limited to 'src/arkollon/headerlistitem.cpp')
-rw-r--r-- | src/arkollon/headerlistitem.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/arkollon/headerlistitem.cpp b/src/arkollon/headerlistitem.cpp index 2d850ac..731435c 100644 --- a/src/arkollon/headerlistitem.cpp +++ b/src/arkollon/headerlistitem.cpp @@ -19,19 +19,19 @@ ***************************************************************************/ #include "headerlistitem.h" -#include <qfontmetrics.h> -#include <qpainter.h> -#include <qapplication.h> +#include <ntqfontmetrics.h> +#include <ntqpainter.h> +#include <ntqapplication.h> #include "uninstallwizard.h" #include "wizard.h" -HeaderListItem::HeaderListItem(QListView* parent) - : QListViewItem(parent) +HeaderListItem::HeaderListItem(TQListView* parent) + : TQListViewItem(parent) { } -int HeaderListItem::compare(QListViewItem* i, int , bool ) const +int HeaderListItem::compare(TQListViewItem* i, int , bool ) const { switch (i->rtti()) { @@ -64,20 +64,20 @@ int HeaderListItem::compare(QListViewItem* i, int , bool ) const return 0; } -void HeaderListItem::paintCell(QPainter* p, const QColorGroup& cg, int , int width, int ) +void HeaderListItem::paintCell(TQPainter* p, const TQColorGroup& cg, int , int width, int ) { p->fillRect(0, 0, width, height(), cg.base()); - QFont boldFont = p->font(); + TQFont boldFont = p->font(); boldFont.setBold(true); p->setFont(boldFont); - p->drawText(listView()->itemMargin(), listView()->itemMargin(), width, QFontMetrics(boldFont).height(), Qt::AlignLeft, text(0)); + p->drawText(listView()->itemMargin(), listView()->itemMargin(), width, TQFontMetrics(boldFont).height(), TQt::AlignLeft, text(0)); - int textWidth = QFontMetrics(boldFont).width(text(0)); + int textWidth = TQFontMetrics(boldFont).width(text(0)); p->fillRect(0, height() - 4 - listView()->itemMargin(), textWidth-10, 4, cg.highlight()); - QColor ca = cg.highlight(); - QColor cb = cg.base(); + TQColor ca = cg.highlight(); + TQColor cb = cg.base(); // Taken from KPixmapEffect::gradient int rDiff, gDiff, bDiff; int rca, gca, bca /*, rcb, gcb, bcb*/; @@ -101,26 +101,26 @@ void HeaderListItem::paintCell(QPainter* p, const QColorGroup& cg, int , int wid gl += gcdelta; bl += bcdelta; - p->setPen(QColor(rl>>16, gl>>16, bl>>16)); + p->setPen(TQColor(rl>>16, gl>>16, bl>>16)); p->drawLine(x, height() - 4 - listView()->itemMargin(), x, height() - listView()->itemMargin() - 1); } } -void HeaderListItem::paintFocus(QPainter* , const QColorGroup& , const QRect& ) +void HeaderListItem::paintFocus(TQPainter* , const TQColorGroup& , const TQRect& ) { } -int HeaderListItem::width(const QFontMetrics& , const QListView* lv, int ) const +int HeaderListItem::width(const TQFontMetrics& , const TQListView* lv, int ) const { - QFont boldFont = qApp->font(); + TQFont boldFont = tqApp->font(); boldFont.setBold(true); - QFontMetrics metrics(boldFont); + TQFontMetrics metrics(boldFont); return metrics.width(text(0)) + lv->itemMargin() + 10; } void HeaderListItem::setup() { - setHeight(qApp->fontMetrics().height() + listView()->itemMargin()*3 + 4); + setHeight(tqApp->fontMetrics().height() + listView()->itemMargin()*3 + 4); } |