From 67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 13 Apr 2011 00:46:47 +0000 Subject: Initial conversion of kdepim to TQt This will probably require some tweaking before it will build under Qt4, however Qt3 builds are OK. Any alterations this commit makes to kdepim behaviour under Qt3 are unintentional and should be fixed. git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- karm/print.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'karm/print.cpp') diff --git a/karm/print.cpp b/karm/print.cpp index a7ddd4ba..891c06fe 100644 --- a/karm/print.cpp +++ b/karm/print.cpp @@ -25,10 +25,10 @@ void MyPrinter::print() if (setup(0L, i18n("Print Times"))) { // setup TQPainter painter(this); - TQPaintDeviceMetrics deviceMetrics(this); + TQPaintDeviceMetrics tqdeviceMetrics(this); TQFontMetrics metrics = painter.fontMetrics(); - pageHeight = deviceMetrics.height(); - int pageWidth = deviceMetrics.width(); + pageHeight = tqdeviceMetrics.height(); + int pageWidth = tqdeviceMetrics.width(); xMargin = margins().width(); yMargin = margins().height(); yoff = yMargin; @@ -36,7 +36,7 @@ void MyPrinter::print() // Calculate the totals // Note the totals are only calculated at the top most levels, as the - // totals are increased together with its children. + // totals are increased together with its tqchildren. int totalTotal = 0; int sessionTotal = 0; for (Task* task = _taskView->first_child(); @@ -47,9 +47,9 @@ void MyPrinter::print() } // Calculate the needed width for each of the fields - timeWidth = QMAX(metrics.width(i18n("Total")), + timeWidth = TQMAX(metrics.width(i18n("Total")), metrics.width(formatTime(totalTotal))); - sessionTimeWidth = QMAX(metrics.width(i18n("Session")), + sessionTimeWidth = TQMAX(metrics.width(i18n("Session")), metrics.width(formatTime(sessionTotal))); nameFieldWidth = pageWidth - xMargin - timeWidth - sessionTimeWidth - 2*5; @@ -61,9 +61,9 @@ void MyPrinter::print() task = static_cast(task->nextSibling())) { int width = calculateReqNameWidth(task, metrics, 0); - maxReqNameFieldWidth = QMAX(maxReqNameFieldWidth, width); + maxReqNameFieldWidth = TQMAX(maxReqNameFieldWidth, width); } - nameFieldWidth = QMIN(nameFieldWidth, maxReqNameFieldWidth); + nameFieldWidth = TQMIN(nameFieldWidth, maxReqNameFieldWidth); int realPageWidth = nameFieldWidth + timeWidth + sessionTimeWidth + 2*5; @@ -120,7 +120,7 @@ int MyPrinter::calculateReqNameWidth( Task* task, subTask; subTask = subTask->nextSibling() ) { int subTaskWidth = calculateReqNameWidth(subTask, metrics, level+1); - width = QMAX(width, subTaskWidth); + width = TQMAX(width, subTaskWidth); } return width; } -- cgit v1.2.3