summaryrefslogtreecommitdiffstats
path: root/karm/timekard.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'karm/timekard.cpp')
-rw-r--r--karm/timekard.cpp70
1 files changed, 35 insertions, 35 deletions
diff --git a/karm/timekard.cpp b/karm/timekard.cpp
index 984baf741..d9b8d4a76 100644
--- a/karm/timekard.cpp
+++ b/karm/timekard.cpp
@@ -43,7 +43,7 @@ const int timeWidth = 6;
const int totalTimeWidth = 7;
const int reportWidth = taskWidth + timeWidth;
-const TQString cr = TQString::fromLatin1("\n");
+const TQString cr = TQString::tqfromLatin1("\n");
TQString TimeKard::totalsAsText(TaskView* taskview, bool justThisTask, WhichTime which)
// Print the total Times as text. If justThisTask, use activeTask, else, all tasks
@@ -59,11 +59,11 @@ TQString TimeKard::totalsAsText(TaskView* taskview, bool justThisTask, WhichTime
// header
retval += i18n("Task Totals") + cr;
- retval += KGlobal::locale()->formatDateTime(TQDateTime::currentDateTime());
+ retval += KGlobal::locale()->formatDateTime(TQDateTime::tqcurrentDateTime());
retval += cr + cr;
- retval += TQString(TQString::fromLatin1("%1 %2"))
- .arg(i18n("Time"), timeWidth)
- .arg(i18n("Task"));
+ retval += TQString(TQString::tqfromLatin1("%1 %2"))
+ .tqarg(i18n("Time"), timeWidth)
+ .tqarg(i18n("Task"));
retval += cr;
retval += line;
@@ -92,10 +92,10 @@ TQString TimeKard::totalsAsText(TaskView* taskview, bool justThisTask, WhichTime
// total
buf.fill('-', reportWidth);
- retval += TQString(TQString::fromLatin1("%1")).arg(buf, timeWidth) + cr;
- retval += TQString(TQString::fromLatin1("%1 %2"))
- .arg(formatTime(sum),timeWidth)
- .arg(i18n("Total"));
+ retval += TQString(TQString::tqfromLatin1("%1")).tqarg(buf, timeWidth) + cr;
+ retval += TQString(TQString::tqfromLatin1("%1 %2"))
+ .tqarg(formatTime(sum),timeWidth)
+ .tqarg(i18n("Total"));
}
else
retval += i18n("No tasks.");
@@ -109,9 +109,9 @@ void TimeKard::printTask(Task *task, TQString &s, int level, WhichTime which)
TQString buf;
s += buf.fill(' ', level);
- s += TQString(TQString::fromLatin1("%1 %2"))
- .arg(formatTime(which == TotalTime?task->totalTime():task->totalSessionTime()), timeWidth)
- .arg(task->name());
+ s += TQString(TQString::tqfromLatin1("%1 %2"))
+ .tqarg(formatTime(which == TotalTime?task->totalTime():task->totalSessionTime()), timeWidth)
+ .tqarg(task->name());
s += cr;
for (Task* subTask = task->firstChild();
@@ -134,17 +134,17 @@ void TimeKard::printTaskHistory(const Task *task,
long sectionsum = 0;
for ( TQDate day = from; day <= to; day = day.addDays(1) )
{
- TQString daykey = day.toString(TQString::fromLatin1("yyyyMMdd"));
- TQString daytaskkey = TQString::fromLatin1("%1_%2")
- .arg(daykey)
- .arg(task->uid());
+ TQString daykey = day.toString(TQString::tqfromLatin1("yyyyMMdd"));
+ TQString daytaskkey = TQString::tqfromLatin1("%1_%2")
+ .tqarg(daykey)
+ .tqarg(task->uid());
if (taskdaytotals.contains(daytaskkey))
{
if ( !totalsOnly )
{
- s += TQString::fromLatin1("%1")
- .arg(formatTime(taskdaytotals[daytaskkey]/60), timeWidth);
+ s += TQString::tqfromLatin1("%1")
+ .tqarg(formatTime(taskdaytotals[daytaskkey]/60), timeWidth);
}
sectionsum += taskdaytotals[daytaskkey]; // in seconds
@@ -162,12 +162,12 @@ void TimeKard::printTaskHistory(const Task *task,
}
// Total for task this section (e.g. week)
- s += TQString::fromLatin1("%1").arg(formatTime(sectionsum/60), totalTimeWidth);
+ s += TQString::tqfromLatin1("%1").tqarg(formatTime(sectionsum/60), totalTimeWidth);
// Task name
TQString buf;
s += buf.fill(' ', level + 1);
- s += TQString::fromLatin1("%1").arg(task->name());
+ s += TQString::tqfromLatin1("%1").tqarg(task->name());
s += cr;
for (Task* subTask = task->firstChild();
@@ -221,10 +221,10 @@ TQString TimeKard::sectionHistoryAsText(
// so times are accumulated for each task.
for (TQValueList<HistoryEvent>::iterator event = events.begin(); event != events.end(); ++event)
{
- TQString daykey = (*event).start().date().toString(TQString::fromLatin1("yyyyMMdd"));
- TQString daytaskkey = TQString::fromLatin1("%1_%2")
- .arg(daykey)
- .arg((*event).todoUid());
+ TQString daykey = (*event).start().date().toString(TQString::tqfromLatin1("yyyyMMdd"));
+ TQString daytaskkey = TQString::tqfromLatin1("%1_%2")
+ .tqarg(daykey)
+ .tqarg((*event).todoUid());
if (taskdaytotals.contains(daytaskkey))
taskdaytotals.replace(daytaskkey,
@@ -246,7 +246,7 @@ TQString TimeKard::sectionHistoryAsText(
// day headings
for (TQDate day = sectionFrom; day <= sectionTo; day = day.addDays(1))
{
- retval += TQString::fromLatin1("%1").arg(day.day(), timeWidth);
+ retval += TQString::tqfromLatin1("%1").tqarg(day.day(), timeWidth);
}
retval += cr;
retval += line;
@@ -280,14 +280,14 @@ TQString TimeKard::sectionHistoryAsText(
long sum = 0;
for (TQDate day = sectionFrom; day <= sectionTo; day = day.addDays(1))
{
- TQString daykey = day.toString(TQString::fromLatin1("yyyyMMdd"));
+ TQString daykey = day.toString(TQString::tqfromLatin1("yyyyMMdd"));
if (daytotals.contains(daykey))
{
if ( !totalsOnly )
{
- retval += TQString::fromLatin1("%1")
- .arg(formatTime(daytotals[daykey]/60), timeWidth);
+ retval += TQString::tqfromLatin1("%1")
+ .tqarg(formatTime(daytotals[daykey]/60), timeWidth);
}
sum += daytotals[daykey]; // in seconds
}
@@ -298,9 +298,9 @@ TQString TimeKard::sectionHistoryAsText(
}
}
- retval += TQString::fromLatin1("%1 %2")
- .arg(formatTime(sum/60), totalTimeWidth)
- .arg(i18n("Total"));
+ retval += TQString::tqfromLatin1("%1 %2")
+ .tqarg(formatTime(sum/60), totalTimeWidth)
+ .tqarg(i18n("Total"));
}
return retval;
}
@@ -313,11 +313,11 @@ TQString TimeKard::historyAsText(TaskView* taskview, const TQDate& from,
retval += totalsOnly ? i18n("Task Totals") : i18n("Task History");
retval += cr;
retval += i18n("From %1 to %2")
- .arg(KGlobal::locale()->formatDate(from))
- .arg(KGlobal::locale()->formatDate(to));
+ .tqarg(KGlobal::locale()->formatDate(from))
+ .tqarg(KGlobal::locale()->formatDate(to));
retval += cr;
retval += i18n("Printed on: %1")
- .arg(KGlobal::locale()->formatDateTime(TQDateTime::currentDateTime()));
+ .tqarg(KGlobal::locale()->formatDateTime(TQDateTime::tqcurrentDateTime()));
if ( perWeek )
{
@@ -353,7 +353,7 @@ TQDate Week::end() const
TQString Week::name() const
{
- return i18n("Week of %1").arg(KGlobal::locale()->formatDate(start()));
+ return i18n("Week of %1").tqarg(KGlobal::locale()->formatDate(start()));
}
TQValueList<Week> Week::weeksFromDateRange(const TQDate& from, const TQDate& to)