diff options
Diffstat (limited to 'kopete/plugins/statistics')
-rw-r--r-- | kopete/plugins/statistics/statisticscontact.cpp | 68 | ||||
-rw-r--r-- | kopete/plugins/statistics/statisticscontact.h | 10 | ||||
-rw-r--r-- | kopete/plugins/statistics/statisticsdcopiface.h | 6 | ||||
-rw-r--r-- | kopete/plugins/statistics/statisticsdialog.cpp | 54 | ||||
-rw-r--r-- | kopete/plugins/statistics/statisticsplugin.cpp | 26 | ||||
-rw-r--r-- | kopete/plugins/statistics/statisticsplugin.h | 10 | ||||
-rw-r--r-- | kopete/plugins/statistics/statisticswidget.ui | 18 |
7 files changed, 96 insertions, 96 deletions
diff --git a/kopete/plugins/statistics/statisticscontact.cpp b/kopete/plugins/statistics/statisticscontact.cpp index d811e4d2..c178b39b 100644 --- a/kopete/plugins/statistics/statisticscontact.cpp +++ b/kopete/plugins/statistics/statisticscontact.cpp @@ -28,10 +28,10 @@ #include "statisticscontact.h" #include "statisticsdb.h" -StatisticsContact::StatisticsContact(Kopete::MetaContact *mc, StatisticsDB *db) : m_metaContact(mc),m_db(db), m_oldStatus(Kopete::OnlineStatus::Unknown) +StatisticsContact::StatisticsContact(Kopete::MetaContact *mc, StatisticsDB *db) : m_metaContact(mc),m_db(db), m_oldtqStatus(Kopete::OnlineStatus::Unknown) { m_isChatWindowOpen = false; - m_oldStatusDateTime = TQDateTime::currentDateTime(); + m_oldStatusDateTime = TQDateTime::tqcurrentDateTime(); // Last*Changed are always false at start m_timeBetweenTwoMessagesChanged = false; @@ -60,7 +60,7 @@ void StatisticsContact::initialize(Kopete::Contact *c) // Generate statisticsContactId or get it from database TQStringList buffer = m_db->query(TQString("SELECT statisticid FROM contacts " "WHERE contactid LIKE '%1';" - ).arg(c->contactId())); + ).tqarg(c->contactId())); if (buffer.isEmpty()) { @@ -68,7 +68,7 @@ void StatisticsContact::initialize(Kopete::Contact *c) if ( !c->metaContact()->metaContactId().isEmpty() && !m_db->query(TQString("SELECT metacontactid FROM commonstats " "WHERE metacontactid LIKE '%1';" - ).arg(c->metaContact()->metaContactId())).isEmpty()) + ).tqarg(c->metaContact()->metaContactId())).isEmpty()) { // Use old style id m_statisticsContactId = c->metaContact()->metaContactId(); @@ -81,7 +81,7 @@ void StatisticsContact::initialize(Kopete::Contact *c) // Assign contactId to m_statisticsContactId m_db->query(TQString("INSERT INTO contacts (statisticid, contactid) VALUES('%1', '%2');" - ).arg(m_statisticsContactId).arg(c->contactId())); + ).tqarg(m_statisticsContactId).tqarg(c->contactId())); } else { @@ -107,7 +107,7 @@ void StatisticsContact::initialize(Kopete::Contact *c) // Get last time a message was received - m_lastMessageReceived = TQDateTime::currentDateTime(); + m_lastMessageReceived = TQDateTime::tqcurrentDateTime(); // Check for lastPresent @@ -129,11 +129,11 @@ void StatisticsContact::contactAdded( Kopete::Contact *c ) // Check if contact is allready in database if not add it if (m_db->query(TQString("SELECT id FROM contacts " "WHERE statisticid LIKE '%1' AND contactid LIKE '%2';" - ).arg(m_statisticsContactId).arg(c->contactId())).isEmpty()) + ).tqarg(m_statisticsContactId).tqarg(c->contactId())).isEmpty()) { // Assign contactId to m_statisticsContactId m_db->query(TQString("INSERT INTO contacts (statisticid, contactid) VALUES('%1', '%2');" - ).arg(m_statisticsContactId).arg(c->contactId())); + ).tqarg(m_statisticsContactId).tqarg(c->contactId())); } kdDebug() << k_funcinfo << " m_statisticsContactId: " << m_statisticsContactId << endl; } @@ -151,7 +151,7 @@ void StatisticsContact::contactRemoved( Kopete::Contact *c ) kdDebug() << k_funcinfo << " m_statisticsContactId: " << m_statisticsContactId << endl; m_db->query(TQString("DELETE FROM contacts WHERE statisticid LIKE '%1' AND contactid LIKE '%2';" - ).arg(m_statisticsContactId).arg(c->contactId())); + ).tqarg(m_statisticsContactId).tqarg(c->contactId())); } void StatisticsContact::removeFromDB() @@ -160,9 +160,9 @@ void StatisticsContact::removeFromDB() return; kdDebug() << k_funcinfo << " m_statisticsContactId: " << m_statisticsContactId << endl; - m_db->query(TQString("DELETE FROM contacts WHERE statisticid LIKE '%1';").arg(m_statisticsContactId)); - m_db->query(TQString("DELETE FROM contactstatus WHERE metacontactid LIKE '%1';").arg(m_statisticsContactId)); - m_db->query(TQString("DELETE FROM commonstats WHERE metacontactid LIKE '%1';").arg(m_statisticsContactId)); + m_db->query(TQString("DELETE FROM contacts WHERE statisticid LIKE '%1';").tqarg(m_statisticsContactId)); + m_db->query(TQString("DELETE FROM contactstatus WHERE metacontactid LIKE '%1';").tqarg(m_statisticsContactId)); + m_db->query(TQString("DELETE FROM commonstats WHERE metacontactid LIKE '%1';").tqarg(m_statisticsContactId)); m_statisticsContactId = TQString(); } @@ -176,7 +176,7 @@ void StatisticsContact::commonStatsSave(const TQString name, const TQString stat return; m_db->query(TQString("UPDATE commonstats SET statvalue1 = '%1', statvalue2='%2'" - "WHERE statname LIKE '%3' AND metacontactid LIKE '%4';").arg(statVar1).arg(statVar2).arg(name).arg(m_statisticsContactId)); + "WHERE statname LIKE '%3' AND metacontactid LIKE '%4';").tqarg(statVar1).tqarg(statVar2).tqarg(name).tqarg(m_statisticsContactId)); } @@ -196,7 +196,7 @@ void StatisticsContact::commonStatsCheck(const TQString name, TQString& statVar1 if (m_statisticsContactId.isEmpty()) return; - TQStringList buffer = m_db->query(TQString("SELECT statvalue1,statvalue2 FROM commonstats WHERE statname LIKE '%1' AND metacontactid LIKE '%2';").arg(name, m_statisticsContactId)); + TQStringList buffer = m_db->query(TQString("SELECT statvalue1,statvalue2 FROM commonstats WHERE statname LIKE '%1' AND metacontactid LIKE '%2';").tqarg(name, m_statisticsContactId)); if (!buffer.isEmpty()) { statVar1 = buffer[0]; @@ -204,7 +204,7 @@ void StatisticsContact::commonStatsCheck(const TQString name, TQString& statVar1 } else { - m_db->query(TQString("INSERT INTO commonstats (metacontactid, statname, statvalue1, statvalue2) VALUES('%1', '%2', 0, 0);").arg(m_statisticsContactId, name)); + m_db->query(TQString("INSERT INTO commonstats (metacontactid, statname, statvalue1, statvalue2) VALUES('%1', '%2', 0, 0);").tqarg(m_statisticsContactId, name)); statVar1 = defaultValue1; statVar2 = defaultValue2; } @@ -234,18 +234,18 @@ void StatisticsContact::commonStatsCheck(const TQString name, TQString& statVar1 void StatisticsContact::newMessageReceived(Kopete::Message& m) { kdDebug() << "statistics: new message received" << endl; - TQDateTime currentDateTime = TQDateTime::currentDateTime(); + TQDateTime tqcurrentDateTime = TQDateTime::tqcurrentDateTime(); if (m_timeBetweenTwoMessagesOn != -1 && m_isChatWindowOpen) { - m_timeBetweenTwoMessages = (m_timeBetweenTwoMessages*m_timeBetweenTwoMessagesOn + m_lastMessageReceived.secsTo(currentDateTime))/(1 + m_timeBetweenTwoMessagesOn); + m_timeBetweenTwoMessages = (m_timeBetweenTwoMessages*m_timeBetweenTwoMessagesOn + m_lastMessageReceived.secsTo(tqcurrentDateTime))/(1 + m_timeBetweenTwoMessagesOn); } setIsChatWindowOpen(true); m_timeBetweenTwoMessagesOn += 1; - m_lastMessageReceived = currentDateTime; + m_lastMessageReceived = tqcurrentDateTime; // Message lenght @@ -254,7 +254,7 @@ void StatisticsContact::newMessageReceived(Kopete::Message& m) // Last talked /// @todo do this in message sent too. So we need setLastTalk() - m_lastTalk = currentDateTime; + m_lastTalk = tqcurrentDateTime; m_messageLengthChanged = true; m_lastTalkChanged = true; @@ -269,32 +269,32 @@ void StatisticsContact::onlineStatusChanged(Kopete::OnlineStatus::StatusType sta if (m_statisticsContactId.isEmpty()) return; - TQDateTime currentDateTime = TQDateTime::currentDateTime(); + TQDateTime tqcurrentDateTime = TQDateTime::tqcurrentDateTime(); - /// We don't want to log if oldStatus is unknown + /// We don't want to log if oldtqStatus is unknown /// the change could not be a real one; see StatisticsPlugin::slotMySelfOnlineStatusChanged - if (m_oldStatus != Kopete::OnlineStatus::Unknown) + if (m_oldtqStatus != Kopete::OnlineStatus::Unknown) { - kdDebug() << "statistics - status change for "<< metaContact()->metaContactId() << " : "<< TQString::number(m_oldStatus) << endl; + kdDebug() << "statistics - status change for "<< metaContact()->metaContactId() << " : "<< TQString::number(m_oldtqStatus) << endl; m_db->query(TQString("INSERT INTO contactstatus " "(metacontactid, status, datetimebegin, datetimeend) " - "VALUES('%1', '%2', '%3', '%4'" ");").arg(m_statisticsContactId).arg(Kopete::OnlineStatus::statusTypeToString(m_oldStatus)).arg(TQString::number(m_oldStatusDateTime.toTime_t())).arg(TQString::number(currentDateTime.toTime_t()))); + "VALUES('%1', '%2', '%3', '%4'" ");").tqarg(m_statisticsContactId).tqarg(Kopete::OnlineStatus::statusTypeToString(m_oldtqStatus)).tqarg(TQString::number(m_oldStatusDateTime.toTime_t())).tqarg(TQString::number(tqcurrentDateTime.toTime_t()))); } - if (m_oldStatus == Kopete::OnlineStatus::Online || m_oldStatus == Kopete::OnlineStatus::Away) + if (m_oldtqStatus == Kopete::OnlineStatus::Online || m_oldtqStatus == Kopete::OnlineStatus::Away) // If the last status was Online or Away, the last time contact was present is the time he goes offline { - m_lastPresent = currentDateTime; + m_lastPresent = tqcurrentDateTime; m_lastPresentChanged = true; } - m_oldStatus = status; - m_oldStatusDateTime = currentDateTime; + m_oldtqStatus = status; + m_oldStatusDateTime = tqcurrentDateTime; } -bool StatisticsContact::wasStatus(TQDateTime dt, Kopete::OnlineStatus::StatusType status) +bool StatisticsContact::wastqStatus(TQDateTime dt, Kopete::OnlineStatus::StatusType status) { if (m_statisticsContactId.isEmpty()) return false; @@ -303,7 +303,7 @@ bool StatisticsContact::wasStatus(TQDateTime dt, Kopete::OnlineStatus::StatusTyp "FROM contactstatus WHERE metacontactid LIKE '%1' AND datetimebegin <= %2 AND datetimeend >= %3 " "AND status LIKE '%4' " "ORDER BY datetimebegin;" - ).arg(m_statisticsContactId).arg(dt.toTime_t()).arg(dt.toTime_t()).arg(Kopete::OnlineStatus::statusTypeToString(status))); + ).tqarg(m_statisticsContactId).tqarg(dt.toTime_t()).tqarg(dt.toTime_t()).tqarg(Kopete::OnlineStatus::statusTypeToString(status))); if (!values.isEmpty()) return true; @@ -318,7 +318,7 @@ TQString StatisticsContact::statusAt(TQDateTime dt) TQStringList values = m_db->query(TQString("SELECT status, datetimebegin, datetimeend " "FROM contactstatus WHERE metacontactid LIKE '%1' AND datetimebegin <= %2 AND datetimeend >= %3 " "ORDER BY datetimebegin;" - ).arg(m_statisticsContactId).arg(dt.toTime_t()).arg(dt.toTime_t())); + ).tqarg(m_statisticsContactId).tqarg(dt.toTime_t()).tqarg(dt.toTime_t())); if (!values.isEmpty()) return Kopete::OnlineStatus(Kopete::OnlineStatus::statusStringToType(values[0])).description(); else return ""; @@ -337,7 +337,7 @@ TQString StatisticsContact::mainStatusDate(const TQDate& date) "(datetimebegin >= %2 AND datetimebegin <= %3 OR " "datetimeend >= %4 AND datetimeend <= %5) " "ORDER BY datetimebegin;" - ).arg(m_statisticsContactId).arg(dt1.toTime_t()).arg(dt2.toTime_t()).arg(dt1.toTime_t()).arg(dt2.toTime_t()); + ).tqarg(m_statisticsContactId).tqarg(dt1.toTime_t()).tqarg(dt2.toTime_t()).tqarg(dt1.toTime_t()).tqarg(dt2.toTime_t()); kdDebug() << request << endl; TQStringList values = m_db->query(request); @@ -389,8 +389,8 @@ TQValueList<TQTime> StatisticsContact::mainEvents(const Kopete::OnlineStatus::St if (m_statisticsContactId.isEmpty()) return mainEvents; - TQDateTime currentDateTime = TQDateTime::currentDateTime(); - buffer = m_db->query(TQString("SELECT datetimebegin, datetimeend, status FROM contactstatus WHERE metacontactid LIKE '%1' ORDER BY datetimebegin").arg(m_statisticsContactId)); + TQDateTime tqcurrentDateTime = TQDateTime::tqcurrentDateTime(); + buffer = m_db->query(TQString("SELECT datetimebegin, datetimeend, status FROM contactstatus WHERE metacontactid LIKE '%1' ORDER BY datetimebegin").tqarg(m_statisticsContactId)); // Only select the events for which the previous is not Unknown AND the status is status. diff --git a/kopete/plugins/statistics/statisticscontact.h b/kopete/plugins/statistics/statisticscontact.h index 9d7f6575..1559e1fd 100644 --- a/kopete/plugins/statistics/statisticscontact.h +++ b/kopete/plugins/statistics/statisticscontact.h @@ -55,9 +55,9 @@ public: TQString statisticsContactId() { return m_statisticsContactId; } /** \brief Access method - * \return m_oldStatus + * \return m_oldtqStatus */ - Kopete::OnlineStatus::StatusType oldStatus() { return m_oldStatus; } + Kopete::OnlineStatus::StatusType oldtqStatus() { return m_oldtqStatus; } /** \brief Access method * \return m_oldStatusDateTime @@ -106,7 +106,7 @@ public: /** * \returns true if contact was status at dt, false else. */ - bool wasStatus(TQDateTime dt, Kopete::OnlineStatus::StatusType status); + bool wastqStatus(TQDateTime dt, Kopete::OnlineStatus::StatusType status); /** * \returns the status of the contact at dt. Return false if dt is invalid. @@ -209,9 +209,9 @@ private: /** * The interest of statistics contact is to manage the changes of status - * in order to correctly update the database. That's why here we keep the oldStatus + * in order to correctly update the database. That's why here we keep the oldtqStatus */ - Kopete::OnlineStatus::StatusType m_oldStatus; + Kopete::OnlineStatus::StatusType m_oldtqStatus; /// We keep the old status datetime here TQDateTime m_oldStatusDateTime; diff --git a/kopete/plugins/statistics/statisticsdcopiface.h b/kopete/plugins/statistics/statisticsdcopiface.h index 9a769935..36336ae2 100644 --- a/kopete/plugins/statistics/statisticsdcopiface.h +++ b/kopete/plugins/statistics/statisticsdcopiface.h @@ -60,15 +60,15 @@ k_dcop: /** * \returns return the status of the contact at datetime. */ - virtual TQString dcopStatus(TQString id, TQString datetime) = 0; + virtual TQString dcoptqStatus(TQString id, TQString datetime) = 0; /** * \returns return the status of the contact at timeStamp. */ - virtual TQString dcopStatus(TQString id, int timeStamp) = 0; + virtual TQString dcoptqStatus(TQString id, int timeStamp) = 0; /** * \returns the main status (most used status) of the contact id at date (not time) timeStamp. Will take the day where timeStamp is. */ - virtual TQString dcopMainStatus(TQString id, int timeStamp) = 0; + virtual TQString dcopMaintqStatus(TQString id, int timeStamp) = 0; }; #endif // STATISTICSDCOP_H diff --git a/kopete/plugins/statistics/statisticsdialog.cpp b/kopete/plugins/statistics/statisticsdialog.cpp index 9bea7995..3c0a67c1 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 <layout.h> +#include <tqlayout.h> #include <tqpushbutton.h> -#include <textedit.h> +#include <tqtextedit.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").arg(contact->metaContact()->displayName()), Close, Close), m_db(db), m_contact(contact) + i18n("Statistics for %1").tqarg(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::currentDate()); + mainWidget->datePicker->setDate(TQDate::tqcurrentDate()); 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;").arg(m_contact->statisticsContactId())); + "FROM contactstatus WHERE metacontactid LIKE '%1' ORDER BY datetimebegin;").tqarg(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;").arg(m_contact->statisticsContactId())); + "FROM contactstatus WHERE metacontactid LIKE '%1' ORDER BY datetimebegin;").tqarg(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>").arg(m_contact->metaContact()->displayName()) + - "<h3>%1</h3><hr>").arg(subTitle)); + i18n("<h1>Statistics for %1</h1>").tqarg(m_contact->metaContact()->displayName()) + + "<h3>%1</h3><hr>").tqarg(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::currentDate() || dateTime2.date() == TQDate::currentDate()) + if (dateTime1.date() == TQDate::tqcurrentDate() || dateTime2.date() == TQDate::tqcurrentDate()) 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>").arg(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>").tqarg(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>").arg(m_contact->metaContact()->displayName()).arg(stringFromSeconds(totalTime))); + "Total seen time :</b> %2 hour(s)<br>").tqarg(m_contact->metaContact()->displayName()).tqarg(stringFromSeconds(totalTime))); generalHTMLPart->write(i18n("<b title=\"The total time I have seen %1 online\">" - "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))); + "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))); 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>").arg(m_contact->messageLength())); - generalHTMLPart->write(i18n("<b>Time between two messages : </b> %1 second(s)").arg(m_contact->timeBetweenTwoMessages())); + 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(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>").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(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(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>").arg(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>").tqarg(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>").arg(mainEvents[i].toString())); + //generalHTMLPart->write(TQString("%1<br>").tqarg(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>").arg( - Kopete::OnlineStatus(m_contact->oldStatus()).description(), + generalHTMLPart->write(i18n("Is <b>%1</b> since <b>%2</b>").tqarg( + Kopete::OnlineStatus(m_contact->oldtqStatus()).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.").arg(i).arg((i+1)%24).arg(m_contact->metaContact()->displayName()).arg(hrWidth) + +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) +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;") - .arg(m_contact->statisticsContactId())); + .tqarg(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") - .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()))); + .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()))); mainWidget->answerEdit->setText(text); } else if (mainWidget->questionComboBox->currentItem()==1) diff --git a/kopete/plugins/statistics/statisticsplugin.cpp b/kopete/plugins/statistics/statisticsplugin.cpp index 5e19b73c..b28ce8ce 100644 --- a/kopete/plugins/statistics/statisticsplugin.cpp +++ b/kopete/plugins/statistics/statisticsplugin.cpp @@ -53,7 +53,7 @@ StatisticsPlugin::StatisticsPlugin( TQObject *parent, const char *name, const TQ { KAction *viewMetaContactStatistics = new KAction( i18n("View &Statistics" ), - TQString::fromLatin1( "log" ), 0, this, TQT_SLOT(slotViewStatistics()), + TQString::tqfromLatin1( "log" ), 0, this, TQT_SLOT(slotViewStatistics()), actionCollection(), "viewMetaContactStatistics" ); viewMetaContactStatistics->setEnabled(Kopete::ContactList::self()->selectedMetaContacts().count() == 1); @@ -205,59 +205,59 @@ bool StatisticsPlugin::dcopWasOnline(TQString id, int timeStamp) { TQDateTime dt; dt.setTime_t(timeStamp); - return dcopWasStatus(id, dt, Kopete::OnlineStatus::Online); + return dcopWastqStatus(id, dt, Kopete::OnlineStatus::Online); } bool StatisticsPlugin::dcopWasOnline(TQString id, TQString dateTime) { - return dcopWasStatus(id, TQDateTime::fromString(dateTime), Kopete::OnlineStatus::Online); + return dcopWastqStatus(id, TQDateTime::fromString(dateTime), Kopete::OnlineStatus::Online); } bool StatisticsPlugin::dcopWasAway(TQString id, int timeStamp) { TQDateTime dt; dt.setTime_t(timeStamp); - return dcopWasStatus(id, dt, Kopete::OnlineStatus::Away); + return dcopWastqStatus(id, dt, Kopete::OnlineStatus::Away); } bool StatisticsPlugin::dcopWasAway(TQString id, TQString dateTime) { - return dcopWasStatus(id, TQDateTime::fromString(dateTime), Kopete::OnlineStatus::Away); + return dcopWastqStatus(id, TQDateTime::fromString(dateTime), Kopete::OnlineStatus::Away); } bool StatisticsPlugin::dcopWasOffline(TQString id, int timeStamp) { TQDateTime dt; dt.setTime_t(timeStamp); - return dcopWasStatus(id, dt, Kopete::OnlineStatus::Offline); + return dcopWastqStatus(id, dt, Kopete::OnlineStatus::Offline); } bool StatisticsPlugin::dcopWasOffline(TQString id, TQString dateTime) { - return dcopWasStatus(id, TQDateTime::fromString(dateTime), Kopete::OnlineStatus::Offline); + return dcopWastqStatus(id, TQDateTime::fromString(dateTime), Kopete::OnlineStatus::Offline); } -bool StatisticsPlugin::dcopWasStatus(TQString id, TQDateTime dateTime, Kopete::OnlineStatus::StatusType status) +bool StatisticsPlugin::dcopWastqStatus(TQString id, TQDateTime dateTime, Kopete::OnlineStatus::StatusType status) { kdDebug() << k_funcinfo << "statistics - DCOP wasOnline :" << id << endl; if (dateTime.isValid() && statisticsContactMap.contains(id)) { - return statisticsContactMap[id]->wasStatus(dateTime, status); + return statisticsContactMap[id]->wastqStatus(dateTime, status); } return false; } -TQString StatisticsPlugin::dcopStatus(TQString id, int timeStamp) +TQString StatisticsPlugin::dcoptqStatus(TQString id, int timeStamp) { TQDateTime dt; dt.setTime_t(timeStamp); - return dcopStatus(id, dt.toString()); + return dcoptqStatus(id, dt.toString()); } -TQString StatisticsPlugin::dcopStatus(TQString id, TQString dateTime) +TQString StatisticsPlugin::dcoptqStatus(TQString id, TQString dateTime) { TQDateTime dt = TQDateTime::fromString(dateTime); @@ -269,7 +269,7 @@ TQString StatisticsPlugin::dcopStatus(TQString id, TQString dateTime) return ""; } -TQString StatisticsPlugin::dcopMainStatus(TQString id, int timeStamp) +TQString StatisticsPlugin::dcopMaintqStatus(TQString id, int timeStamp) { TQDateTime dt; dt.setTime_t(timeStamp); diff --git a/kopete/plugins/statistics/statisticsplugin.h b/kopete/plugins/statistics/statisticsplugin.h index d6f75c81..467bd6b8 100644 --- a/kopete/plugins/statistics/statisticsplugin.h +++ b/kopete/plugins/statistics/statisticsplugin.h @@ -61,7 +61,7 @@ class KActionCollection; * * <table> * <tr> - * <td>Event</td><td>Changes to database</td><td>oldStatus</td> + * <td>Event</td><td>Changes to database</td><td>oldtqStatus</td> * </tr> * <tr> * <td>John 17:44 Away <i>(connexion)</i></td><td> - <i>(oldstatus was offline)</i></td><td>oldstatus = away </td> @@ -191,12 +191,12 @@ public slots: bool dcopWasOffline(TQString id, int timeStamp); bool dcopWasOffline(TQString id, TQString dt); - bool dcopWasStatus(TQString id, TQDateTime dateTime, Kopete::OnlineStatus::StatusType status); + bool dcopWastqStatus(TQString id, TQDateTime dateTime, Kopete::OnlineStatus::StatusType status); - TQString dcopStatus(TQString id, TQString dateTime); - TQString dcopStatus(TQString id, int timeStamp); + TQString dcoptqStatus(TQString id, TQString dateTime); + TQString dcoptqStatus(TQString id, int timeStamp); - TQString dcopMainStatus(TQString id, int timeStamp); + TQString dcopMaintqStatus(TQString id, int timeStamp); private: StatisticsDB *m_db; diff --git a/kopete/plugins/statistics/statisticswidget.ui b/kopete/plugins/statistics/statisticswidget.ui index 4c53d8e2..87dd1b4d 100644 --- a/kopete/plugins/statistics/statisticswidget.ui +++ b/kopete/plugins/statistics/statisticswidget.ui @@ -52,7 +52,7 @@ </property> <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout11</cstring> + <cstring>tqlayout11</cstring> </property> <hbox> <property name="name"> @@ -68,7 +68,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>61</width> <height>31</height> @@ -77,7 +77,7 @@ </spacer> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout9</cstring> + <cstring>tqlayout9</cstring> </property> <vbox> <property name="name"> @@ -98,7 +98,7 @@ </widget> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout7</cstring> + <cstring>tqlayout7</cstring> </property> <hbox> <property name="name"> @@ -127,7 +127,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>40</width> <height>20</height> @@ -148,7 +148,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>60</width> <height>41</height> @@ -172,7 +172,7 @@ </property> <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <hbox> <property name="name"> @@ -181,12 +181,12 @@ <widget class="TQComboBox"> <item> <property name="text"> - <string>Contact Status at Date & Time</string> + <string>Contact tqStatus at Date & Time</string> </property> </item> <item> <property name="text"> - <string>Most Used Status at Date</string> + <string>Most Used tqStatus at Date</string> </property> </item> <property name="name"> |