summaryrefslogtreecommitdiffstats
path: root/karm/timekard.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'karm/timekard.cpp')
-rw-r--r--karm/timekard.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/karm/timekard.cpp b/karm/timekard.cpp
index 984baf741..d7de48402 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,9 +59,9 @@ 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"))
+ retval += TQString(TQString::tqfromLatin1("%1 %2"))
.arg(i18n("Time"), timeWidth)
.arg(i18n("Task"));
retval += cr;
@@ -92,8 +92,8 @@ 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"))
+ retval += TQString(TQString::tqfromLatin1("%1")).arg(buf, timeWidth) + cr;
+ retval += TQString(TQString::tqfromLatin1("%1 %2"))
.arg(formatTime(sum),timeWidth)
.arg(i18n("Total"));
}
@@ -109,7 +109,7 @@ void TimeKard::printTask(Task *task, TQString &s, int level, WhichTime which)
TQString buf;
s += buf.fill(' ', level);
- s += TQString(TQString::fromLatin1("%1 %2"))
+ s += TQString(TQString::tqfromLatin1("%1 %2"))
.arg(formatTime(which == TotalTime?task->totalTime():task->totalSessionTime()), timeWidth)
.arg(task->name());
s += cr;
@@ -134,22 +134,22 @@ 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")
+ TQString daykey = day.toString(TQString::tqfromLatin1("yyyyMMdd"));
+ TQString daytaskkey = TQString::tqfromLatin1("%1_%2")
.arg(daykey)
.arg(task->uid());
- if (taskdaytotals.contains(daytaskkey))
+ if (taskdaytotals.tqcontains(daytaskkey))
{
if ( !totalsOnly )
{
- s += TQString::fromLatin1("%1")
+ s += TQString::tqfromLatin1("%1")
.arg(formatTime(taskdaytotals[daytaskkey]/60), timeWidth);
}
sectionsum += taskdaytotals[daytaskkey]; // in seconds
- if (daytotals.contains(daykey))
- daytotals.replace(daykey, daytotals[daykey] + taskdaytotals[daytaskkey]);
+ if (daytotals.tqcontains(daykey))
+ daytotals.tqreplace(daykey, daytotals[daykey] + taskdaytotals[daytaskkey]);
else
daytotals.insert(daykey, taskdaytotals[daytaskkey]);
}
@@ -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").arg(formatTime(sectionsum/60), totalTimeWidth);
// Task name
TQString buf;
s += buf.fill(' ', level + 1);
- s += TQString::fromLatin1("%1").arg(task->name());
+ s += TQString::tqfromLatin1("%1").arg(task->name());
s += cr;
for (Task* subTask = task->firstChild();
@@ -221,13 +221,13 @@ 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")
+ TQString daykey = (*event).start().date().toString(TQString::tqfromLatin1("yyyyMMdd"));
+ TQString daytaskkey = TQString::tqfromLatin1("%1_%2")
.arg(daykey)
.arg((*event).todoUid());
- if (taskdaytotals.contains(daytaskkey))
- taskdaytotals.replace(daytaskkey,
+ if (taskdaytotals.tqcontains(daytaskkey))
+ taskdaytotals.tqreplace(daytaskkey,
taskdaytotals[daytaskkey] + (*event).duration());
else
taskdaytotals.insert(daytaskkey, (*event).duration());
@@ -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").arg(day.day(), timeWidth);
}
retval += cr;
retval += line;
@@ -280,13 +280,13 @@ 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 (daytotals.tqcontains(daykey))
{
if ( !totalsOnly )
{
- retval += TQString::fromLatin1("%1")
+ retval += TQString::tqfromLatin1("%1")
.arg(formatTime(daytotals[daykey]/60), timeWidth);
}
sum += daytotals[daykey]; // in seconds
@@ -298,7 +298,7 @@ TQString TimeKard::sectionHistoryAsText(
}
}
- retval += TQString::fromLatin1("%1 %2")
+ retval += TQString::tqfromLatin1("%1 %2")
.arg(formatTime(sum/60), totalTimeWidth)
.arg(i18n("Total"));
}
@@ -317,7 +317,7 @@ TQString TimeKard::historyAsText(TaskView* taskview, const TQDate& from,
.arg(KGlobal::locale()->formatDate(to));
retval += cr;
retval += i18n("Printed on: %1")
- .arg(KGlobal::locale()->formatDateTime(TQDateTime::currentDateTime()));
+ .arg(KGlobal::locale()->formatDateTime(TQDateTime::tqcurrentDateTime()));
if ( perWeek )
{