From 7be55ffa061c026e35e2d6a0effe1161ddb0d41f Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:53:50 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- karm/print.cpp | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'karm/print.cpp') diff --git a/karm/print.cpp b/karm/print.cpp index ff00a3bc3..1badb4f9f 100644 --- a/karm/print.cpp +++ b/karm/print.cpp @@ -1,8 +1,8 @@ // #include -#include -#include -#include +#include +#include +#include #include #include // i18n @@ -24,9 +24,9 @@ void MyPrinter::print() // FIXME: make a better caption for the printingdialog if (setup(0L, i18n("Print Times"))) { // setup - QPainter painter(this); - QPaintDeviceMetrics deviceMetrics(this); - QFontMetrics metrics = painter.fontMetrics(); + TQPainter painter(this); + TQPaintDeviceMetrics deviceMetrics(this); + TQFontMetrics metrics = painter.fontMetrics(); pageHeight = deviceMetrics.height(); int pageWidth = deviceMetrics.width(); xMargin = margins().width(); @@ -68,17 +68,17 @@ void MyPrinter::print() int realPageWidth = nameFieldWidth + timeWidth + sessionTimeWidth + 2*5; // Print the header - QFont origFont, newFont; + TQFont origFont, newFont; origFont = painter.font(); newFont = origFont; newFont.setPixelSize( static_cast(origFont.pixelSize() * 1.5) ); painter.setFont(newFont); int height = metrics.height(); - QString now = KGlobal::locale()->formatDateTime(QDateTime::currentDateTime()); + TQString now = KGlobal::locale()->formatDateTime(TQDateTime::currentDateTime()); painter.drawText(xMargin, yoff, pageWidth, height, - QPainter::AlignCenter, + TQPainter::AlignCenter, i18n("KArm - %1").arg(now)); painter.setFont(origFont); @@ -106,12 +106,12 @@ void MyPrinter::print() // Print the Totals printLine( formatTime( totalTotal ), formatTime( sessionTotal ), - QString(), painter, 0); + TQString(), painter, 0); } } int MyPrinter::calculateReqNameWidth( Task* task, - QFontMetrics &metrics, + TQFontMetrics &metrics, int level) { int width = metrics.width(task->name()) + level * levelIndent; @@ -125,11 +125,11 @@ int MyPrinter::calculateReqNameWidth( Task* task, return width; } -void MyPrinter::printTask(Task *task, QPainter &painter, int level) +void MyPrinter::printTask(Task *task, TQPainter &painter, int level) { - QString time = formatTime(task->totalTime()); - QString sessionTime = formatTime(task->totalSessionTime()); - QString name = task->name(); + TQString time = formatTime(task->totalTime()); + TQString sessionTime = formatTime(task->totalSessionTime()); + TQString name = task->name(); printLine(time, sessionTime, name, painter, level); for ( Task* subTask = task->firstChild(); @@ -140,21 +140,21 @@ void MyPrinter::printTask(Task *task, QPainter &painter, int level) } } -void MyPrinter::printLine( QString total, QString session, QString name, - QPainter &painter, int level ) +void MyPrinter::printLine( TQString total, TQString session, TQString name, + TQPainter &painter, int level ) { int xoff = xMargin + 10 * level; painter.drawText( xoff, yoff, nameFieldWidth, lineHeight, - QPainter::AlignLeft, name); + TQPainter::AlignLeft, name); xoff = xMargin + nameFieldWidth; painter.drawText( xoff, yoff, sessionTimeWidth, lineHeight, - QPainter::AlignRight, session); + TQPainter::AlignRight, session); xoff += sessionTimeWidth+ 5; painter.drawText( xoff, yoff, timeWidth, lineHeight, - QPainter::AlignRight, total); + TQPainter::AlignRight, total); xoff += timeWidth+5; yoff += lineHeight; -- cgit v1.2.1