summaryrefslogtreecommitdiffstats
path: root/karm/print.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'karm/print.cpp')
-rw-r--r--karm/print.cpp40
1 files changed, 20 insertions, 20 deletions
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 <iostream>
-#include <qdatetime.h>
-#include <qpaintdevicemetrics.h>
-#include <qpainter.h>
+#include <tqdatetime.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqpainter.h>
#include <kglobal.h>
#include <klocale.h> // 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<int>(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;