summaryrefslogtreecommitdiffstats
path: root/kopete/plugins/statistics/statisticsdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/plugins/statistics/statisticsdialog.cpp')
-rw-r--r--kopete/plugins/statistics/statisticsdialog.cpp54
1 files changed, 27 insertions, 27 deletions
diff --git a/kopete/plugins/statistics/statisticsdialog.cpp b/kopete/plugins/statistics/statisticsdialog.cpp
index 3c0a67c1..9bea7995 100644
--- a/kopete/plugins/statistics/statisticsdialog.cpp
+++ b/kopete/plugins/statistics/statisticsdialog.cpp
@@ -17,9 +17,9 @@
#include <tqtabwidget.h>
#include <tqwidget.h>
#include <tqhbox.h>
-#include <tqlayout.h>
+#include <layout.h>
#include <tqpushbutton.h>
-#include <tqtextedit.h>
+#include <textedit.h>
#include <tqcombobox.h>
#include <tqstring.h>
@@ -42,7 +42,7 @@
StatisticsDialog::StatisticsDialog(StatisticsContact *contact, StatisticsDB *db, TQWidget* parent,
const char* name) : KDialogBase(parent, name, false,
- i18n("Statistics for %1").tqarg(contact->metaContact()->displayName()), Close, Close), m_db(db), m_contact(contact)
+ i18n("Statistics for %1").arg(contact->metaContact()->displayName()), Close, Close), m_db(db), m_contact(contact)
{
mainWidget = new StatisticsWidget(this);
setMainWidget(mainWidget);
@@ -63,7 +63,7 @@ StatisticsDialog::StatisticsDialog(StatisticsContact *contact, StatisticsDB *db,
mainWidget->tabWidget->setCurrentPage(0);
mainWidget->timePicker->setTime(TQTime::currentTime());
- mainWidget->datePicker->setDate(TQDate::tqcurrentDate());
+ mainWidget->datePicker->setDate(TQDate::currentDate());
connect(mainWidget->askButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAskButtonClicked()));
setFocus();
@@ -107,7 +107,7 @@ void StatisticsDialog::slotOpenURLRequest(const KURL& url, const KParts::URLArgs
void StatisticsDialog::generatePageForMonth(const int monthOfYear)
{
TQStringList values = m_db->query(TQString("SELECT status, datetimebegin, datetimeend "
- "FROM contactstatus WHERE metacontactid LIKE '%1' ORDER BY datetimebegin;").tqarg(m_contact->statisticsContactId()));
+ "FROM contactstatus WHERE metacontactid LIKE '%1' ORDER BY datetimebegin;").arg(m_contact->statisticsContactId()));
TQStringList values2;
@@ -129,7 +129,7 @@ void StatisticsDialog::generatePageForMonth(const int monthOfYear)
void StatisticsDialog::generatePageForDay(const int dayOfWeek)
{
TQStringList values = m_db->query(TQString("SELECT status, datetimebegin, datetimeend "
- "FROM contactstatus WHERE metacontactid LIKE '%1' ORDER BY datetimebegin;").tqarg(m_contact->statisticsContactId()));
+ "FROM contactstatus WHERE metacontactid LIKE '%1' ORDER BY datetimebegin;").arg(m_contact->statisticsContactId()));
TQStringList values2;
@@ -190,8 +190,8 @@ void StatisticsDialog::generatePageFromTQStringList(TQStringList values, const T
"margin-right: 5px;"
"padding:3px 3px 3px 10px;}"
"</style></head><body>" +
- i18n("<h1>Statistics for %1</h1>").tqarg(m_contact->metaContact()->displayName()) +
- "<h3>%1</h3><hr>").tqarg(subTitle));
+ i18n("<h1>Statistics for %1</h1>").arg(m_contact->metaContact()->displayName()) +
+ "<h3>%1</h3><hr>").arg(subTitle));
generalHTMLPart->write(i18n("<div class=\"statgroup\"><b><a href=\"main:generalinfo\" title=\"General summary view\">General</a></b><br>"
"<span title=\"Select the a day or a month to view the stat for\"><b>Days: </b>"
@@ -265,7 +265,7 @@ void StatisticsDialog::generatePageFromTQStringList(TQStringList values, const T
TQDateTime dateTime2;
dateTime2.setTime_t(values[i+2].toInt());
- if (dateTime1.date() == TQDate::tqcurrentDate() || dateTime2.date() == TQDate::tqcurrentDate())
+ if (dateTime1.date() == TQDate::currentDate() || dateTime2.date() == TQDate::currentDate())
today = true;
else today = false;
@@ -351,7 +351,7 @@ void StatisticsDialog::generatePageFromTQStringList(TQStringList values, const T
}
else color="white";
- todayString.append(TQString("<tr style=\"color:%1\"><td>%2</td><td>%3</td><td>%4</td></tr>").tqarg(color, status, dateTime1.time().toString(), dateTime2.time().toString()));
+ todayString.append(TQString("<tr style=\"color:%1\"><td>%2</td><td>%3</td><td>%4</td></tr>").arg(color, status, dateTime1.time().toString(), dateTime2.time().toString()));
}
@@ -386,11 +386,11 @@ void StatisticsDialog::generatePageFromTQStringList(TQStringList values, const T
// Some "total times"
generalHTMLPart->write(i18n("<div class=\"statgroup\">"));
generalHTMLPart->write(i18n("<b title=\"The total time I have been able to see %1 status\">"
- "Total seen time :</b> %2 hour(s)<br>").tqarg(m_contact->metaContact()->displayName()).tqarg(stringFromSeconds(totalTime)));
+ "Total seen time :</b> %2 hour(s)<br>").arg(m_contact->metaContact()->displayName()).arg(stringFromSeconds(totalTime)));
generalHTMLPart->write(i18n("<b title=\"The total time I have seen %1 online\">"
- "Total online time :</b> %2 hour(s)<br>").tqarg(m_contact->metaContact()->displayName()).tqarg(stringFromSeconds(totalOnlineTime)));
- generalHTMLPart->write(i18n("<b title=\"The total time I have seen %1 away\">Total busy time :</b> %2 hour(s)<br>").tqarg(m_contact->metaContact()->displayName()).tqarg(stringFromSeconds(totalAwayTime)));
- generalHTMLPart->write(i18n("<b title=\"The total time I have seen %1 offline\">Total offline time :</b> %2 hour(s)").tqarg(m_contact->metaContact()->displayName()).tqarg(stringFromSeconds(totalOfflineTime)));
+ "Total online time :</b> %2 hour(s)<br>").arg(m_contact->metaContact()->displayName()).arg(stringFromSeconds(totalOnlineTime)));
+ generalHTMLPart->write(i18n("<b title=\"The total time I have seen %1 away\">Total busy time :</b> %2 hour(s)<br>").arg(m_contact->metaContact()->displayName()).arg(stringFromSeconds(totalAwayTime)));
+ generalHTMLPart->write(i18n("<b title=\"The total time I have seen %1 offline\">Total offline time :</b> %2 hour(s)").arg(m_contact->metaContact()->displayName()).arg(stringFromSeconds(totalOfflineTime)));
generalHTMLPart->write(TQString("</div>"));
if (subTitle == i18n("General information"))
@@ -399,25 +399,25 @@ void StatisticsDialog::generatePageFromTQStringList(TQStringList values, const T
*/
{
generalHTMLPart->write(TQString("<div class=\"statgroup\">"));
- generalHTMLPart->write(i18n("<b>Average message length :</b> %1 characters<br>").tqarg(m_contact->messageLength()));
- generalHTMLPart->write(i18n("<b>Time between two messages : </b> %1 second(s)").tqarg(m_contact->timeBetweenTwoMessages()));
+ generalHTMLPart->write(i18n("<b>Average message length :</b> %1 characters<br>").arg(m_contact->messageLength()));
+ generalHTMLPart->write(i18n("<b>Time between two messages : </b> %1 second(s)").arg(m_contact->timeBetweenTwoMessages()));
generalHTMLPart->write(TQString("</div>"));
generalHTMLPart->write(TQString("<div class=\"statgroup\">"));
- generalHTMLPart->write(i18n("<b title=\"The last time you talked with %1\">Last talk :</b> %2<br>").tqarg(m_contact->metaContact()->displayName()).tqarg(KGlobal::locale()->formatDateTime(m_contact->lastTalk())));
- generalHTMLPart->write(i18n("<b title=\"The last time I have seen %1 online or away\">Last time contact was present :</b> %2").tqarg(m_contact->metaContact()->displayName()).tqarg(KGlobal::locale()->formatDateTime(m_contact->lastPresent())));
+ generalHTMLPart->write(i18n("<b title=\"The last time you talked with %1\">Last talk :</b> %2<br>").arg(m_contact->metaContact()->displayName()).arg(KGlobal::locale()->formatDateTime(m_contact->lastTalk())));
+ generalHTMLPart->write(i18n("<b title=\"The last time I have seen %1 online or away\">Last time contact was present :</b> %2").arg(m_contact->metaContact()->displayName()).arg(KGlobal::locale()->formatDateTime(m_contact->lastPresent())));
generalHTMLPart->write(TQString("</div>"));
//generalHTMLPart->write(TQString("<div class=\"statgroup\">"));
- //generalHTMLPart->write(i18n("<b title=\"%1 uses to set his status online at these hours (EXPERIMENTAL)\">Main online events :</b><br>").tqarg(m_contact->metaContact()->displayName()));
+ //generalHTMLPart->write(i18n("<b title=\"%1 uses to set his status online at these hours (EXPERIMENTAL)\">Main online events :</b><br>").arg(m_contact->metaContact()->displayName()));
//TQValueList<TQTime> mainEvents = m_contact->mainEvents(Kopete::OnlineStatus::Online);
//for (uint i=0; i<mainEvents.count(); i++)
- //generalHTMLPart->write(TQString("%1<br>").tqarg(mainEvents[i].toString()));
+ //generalHTMLPart->write(TQString("%1<br>").arg(mainEvents[i].toString()));
//generalHTMLPart->write(TQString("</div>"));
generalHTMLPart->write("<div title=\"" +i18n("Current status") + "\" class=\"statgroup\">");
- generalHTMLPart->write(i18n("Is <b>%1</b> since <b>%2</b>").tqarg(
- Kopete::OnlineStatus(m_contact->oldtqStatus()).description(),
+ generalHTMLPart->write(i18n("Is <b>%1</b> since <b>%2</b>").arg(
+ Kopete::OnlineStatus(m_contact->oldStatus()).description(),
KGlobal::locale()->formatDateTime(m_contact->oldStatusDateTime())));
generalHTMLPart->write(TQString("</div>"));
}
@@ -440,7 +440,7 @@ void StatisticsDialog::generatePageFromTQStringList(TQStringList values, const T
+TQString("\" src=\"file://")
+colorPath
+"\" width=\"4%\" title=\""
- +i18n("Between %1:00 and %2:00, I was able to see %3 status %4% of the hour.").tqarg(i).tqarg((i+1)%24).tqarg(m_contact->metaContact()->displayName()).tqarg(hrWidth)
+ +i18n("Between %1:00 and %2:00, I was able to see %3 status %4% of the hour.").arg(i).arg((i+1)%24).arg(m_contact->metaContact()->displayName()).arg(hrWidth)
+TQString("\">");
}
generalHTMLPart->write(chartString);
@@ -478,7 +478,7 @@ void StatisticsDialog::generatePageGeneral()
TQStringList values;
values = m_db->query(TQString("SELECT status, datetimebegin, datetimeend "
"FROM contactstatus WHERE metacontactid LIKE '%1' ORDER BY datetimebegin;")
- .tqarg(m_contact->statisticsContactId()));
+ .arg(m_contact->statisticsContactId()));
generatePageFromTQStringList(values, i18n("General information"));
}
@@ -524,9 +524,9 @@ void StatisticsDialog::slotAskButtonClicked()
if (mainWidget->questionComboBox->currentItem()==0)
{
TQString text = i18n("1 is date, 2 is contact name, 3 is online status", "%1, %2 was %3")
- .tqarg(KGlobal::locale()->formatDateTime(TQDateTime(mainWidget->datePicker->date(), mainWidget->timePicker->time())))
- .tqarg(m_contact->metaContact()->displayName())
- .tqarg(m_contact->statusAt(TQDateTime(mainWidget->datePicker->date(), mainWidget->timePicker->time())));
+ .arg(KGlobal::locale()->formatDateTime(TQDateTime(mainWidget->datePicker->date(), mainWidget->timePicker->time())))
+ .arg(m_contact->metaContact()->displayName())
+ .arg(m_contact->statusAt(TQDateTime(mainWidget->datePicker->date(), mainWidget->timePicker->time())));
mainWidget->answerEdit->setText(text);
}
else if (mainWidget->questionComboBox->currentItem()==1)