summaryrefslogtreecommitdiffstats
path: root/kopete/plugins/statistics
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-18 18:33:51 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-18 18:33:51 -0600
commit089118c18533dfa3e6ce5065dbebdd4db94051f1 (patch)
treece014fb2326a80fcfafa2362b7ff88486aa17c96 /kopete/plugins/statistics
parent83677e35509b4dafac63b76995652bdf3b49f209 (diff)
downloadtdenetwork-089118c18533dfa3e6ce5065dbebdd4db94051f1.tar.gz
tdenetwork-089118c18533dfa3e6ce5065dbebdd4db94051f1.zip
Rename old tq methods that no longer need a unique name
Diffstat (limited to 'kopete/plugins/statistics')
-rw-r--r--kopete/plugins/statistics/statisticscontact.cpp36
-rw-r--r--kopete/plugins/statistics/statisticscontact.h10
-rw-r--r--kopete/plugins/statistics/statisticsdcopiface.h6
-rw-r--r--kopete/plugins/statistics/statisticsdialog.cpp6
-rw-r--r--kopete/plugins/statistics/statisticsplugin.cpp26
-rw-r--r--kopete/plugins/statistics/statisticsplugin.h10
-rw-r--r--kopete/plugins/statistics/statisticswidget.ui10
7 files changed, 52 insertions, 52 deletions
diff --git a/kopete/plugins/statistics/statisticscontact.cpp b/kopete/plugins/statistics/statisticscontact.cpp
index c178b39b..3a03b7bc 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_oldtqStatus(Kopete::OnlineStatus::Unknown)
+StatisticsContact::StatisticsContact(Kopete::MetaContact *mc, StatisticsDB *db) : m_metaContact(mc),m_db(db), m_oldStatus(Kopete::OnlineStatus::Unknown)
{
m_isChatWindowOpen = false;
- m_oldStatusDateTime = TQDateTime::tqcurrentDateTime();
+ m_oldStatusDateTime = TQDateTime::currentDateTime();
// Last*Changed are always false at start
m_timeBetweenTwoMessagesChanged = false;
@@ -107,7 +107,7 @@ void StatisticsContact::initialize(Kopete::Contact *c)
// Get last time a message was received
- m_lastMessageReceived = TQDateTime::tqcurrentDateTime();
+ m_lastMessageReceived = TQDateTime::currentDateTime();
// Check for lastPresent
@@ -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 tqcurrentDateTime = TQDateTime::tqcurrentDateTime();
+ TQDateTime currentDateTime = TQDateTime::currentDateTime();
if (m_timeBetweenTwoMessagesOn != -1 && m_isChatWindowOpen)
{
- m_timeBetweenTwoMessages = (m_timeBetweenTwoMessages*m_timeBetweenTwoMessagesOn + m_lastMessageReceived.secsTo(tqcurrentDateTime))/(1 + m_timeBetweenTwoMessagesOn);
+ m_timeBetweenTwoMessages = (m_timeBetweenTwoMessages*m_timeBetweenTwoMessagesOn + m_lastMessageReceived.secsTo(currentDateTime))/(1 + m_timeBetweenTwoMessagesOn);
}
setIsChatWindowOpen(true);
m_timeBetweenTwoMessagesOn += 1;
- m_lastMessageReceived = tqcurrentDateTime;
+ m_lastMessageReceived = currentDateTime;
// 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 = tqcurrentDateTime;
+ m_lastTalk = currentDateTime;
m_messageLengthChanged = true;
m_lastTalkChanged = true;
@@ -269,32 +269,32 @@ void StatisticsContact::onlineStatusChanged(Kopete::OnlineStatus::StatusType sta
if (m_statisticsContactId.isEmpty())
return;
- TQDateTime tqcurrentDateTime = TQDateTime::tqcurrentDateTime();
+ TQDateTime currentDateTime = TQDateTime::currentDateTime();
- /// We don't want to log if oldtqStatus is unknown
+ /// We don't want to log if oldStatus is unknown
/// the change could not be a real one; see StatisticsPlugin::slotMySelfOnlineStatusChanged
- if (m_oldtqStatus != Kopete::OnlineStatus::Unknown)
+ if (m_oldStatus != Kopete::OnlineStatus::Unknown)
{
- kdDebug() << "statistics - status change for "<< metaContact()->metaContactId() << " : "<< TQString::number(m_oldtqStatus) << endl;
+ kdDebug() << "statistics - status change for "<< metaContact()->metaContactId() << " : "<< TQString::number(m_oldStatus) << endl;
m_db->query(TQString("INSERT INTO contactstatus "
"(metacontactid, status, datetimebegin, datetimeend) "
- "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())));
+ "VALUES('%1', '%2', '%3', '%4'" ");").tqarg(m_statisticsContactId).tqarg(Kopete::OnlineStatus::statusTypeToString(m_oldStatus)).tqarg(TQString::number(m_oldStatusDateTime.toTime_t())).tqarg(TQString::number(currentDateTime.toTime_t())));
}
- if (m_oldtqStatus == Kopete::OnlineStatus::Online || m_oldtqStatus == Kopete::OnlineStatus::Away)
+ if (m_oldStatus == Kopete::OnlineStatus::Online || m_oldStatus == 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 = tqcurrentDateTime;
+ m_lastPresent = currentDateTime;
m_lastPresentChanged = true;
}
- m_oldtqStatus = status;
- m_oldStatusDateTime = tqcurrentDateTime;
+ m_oldStatus = status;
+ m_oldStatusDateTime = currentDateTime;
}
-bool StatisticsContact::wastqStatus(TQDateTime dt, Kopete::OnlineStatus::StatusType status)
+bool StatisticsContact::wasStatus(TQDateTime dt, Kopete::OnlineStatus::StatusType status)
{
if (m_statisticsContactId.isEmpty())
return false;
@@ -389,7 +389,7 @@ TQValueList<TQTime> StatisticsContact::mainEvents(const Kopete::OnlineStatus::St
if (m_statisticsContactId.isEmpty())
return mainEvents;
- TQDateTime tqcurrentDateTime = TQDateTime::tqcurrentDateTime();
+ TQDateTime currentDateTime = TQDateTime::currentDateTime();
buffer = m_db->query(TQString("SELECT datetimebegin, datetimeend, status FROM contactstatus WHERE metacontactid LIKE '%1' ORDER BY datetimebegin").tqarg(m_statisticsContactId));
diff --git a/kopete/plugins/statistics/statisticscontact.h b/kopete/plugins/statistics/statisticscontact.h
index 1559e1fd..9d7f6575 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_oldtqStatus
+ * \return m_oldStatus
*/
- Kopete::OnlineStatus::StatusType oldtqStatus() { return m_oldtqStatus; }
+ Kopete::OnlineStatus::StatusType oldStatus() { return m_oldStatus; }
/** \brief Access method
* \return m_oldStatusDateTime
@@ -106,7 +106,7 @@ public:
/**
* \returns true if contact was status at dt, false else.
*/
- bool wastqStatus(TQDateTime dt, Kopete::OnlineStatus::StatusType status);
+ bool wasStatus(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 oldtqStatus
+ * in order to correctly update the database. That's why here we keep the oldStatus
*/
- Kopete::OnlineStatus::StatusType m_oldtqStatus;
+ Kopete::OnlineStatus::StatusType m_oldStatus;
/// 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 36336ae2..9a769935 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 dcoptqStatus(TQString id, TQString datetime) = 0;
+ virtual TQString dcopStatus(TQString id, TQString datetime) = 0;
/**
* \returns return the status of the contact at timeStamp.
*/
- virtual TQString dcoptqStatus(TQString id, int timeStamp) = 0;
+ virtual TQString dcopStatus(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 dcopMaintqStatus(TQString id, int timeStamp) = 0;
+ virtual TQString dcopMainStatus(TQString id, int timeStamp) = 0;
};
#endif // STATISTICSDCOP_H
diff --git a/kopete/plugins/statistics/statisticsdialog.cpp b/kopete/plugins/statistics/statisticsdialog.cpp
index 3c0a67c1..b4ca0861 100644
--- a/kopete/plugins/statistics/statisticsdialog.cpp
+++ b/kopete/plugins/statistics/statisticsdialog.cpp
@@ -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();
@@ -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;
@@ -417,7 +417,7 @@ void StatisticsDialog::generatePageFromTQStringList(TQStringList values, const T
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(),
+ Kopete::OnlineStatus(m_contact->oldStatus()).description(),
KGlobal::locale()->formatDateTime(m_contact->oldStatusDateTime())));
generalHTMLPart->write(TQString("</div>"));
}
diff --git a/kopete/plugins/statistics/statisticsplugin.cpp b/kopete/plugins/statistics/statisticsplugin.cpp
index b28ce8ce..5e19b73c 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::tqfromLatin1( "log" ), 0, this, TQT_SLOT(slotViewStatistics()),
+ TQString::fromLatin1( "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 dcopWastqStatus(id, dt, Kopete::OnlineStatus::Online);
+ return dcopWasStatus(id, dt, Kopete::OnlineStatus::Online);
}
bool StatisticsPlugin::dcopWasOnline(TQString id, TQString dateTime)
{
- return dcopWastqStatus(id, TQDateTime::fromString(dateTime), Kopete::OnlineStatus::Online);
+ return dcopWasStatus(id, TQDateTime::fromString(dateTime), Kopete::OnlineStatus::Online);
}
bool StatisticsPlugin::dcopWasAway(TQString id, int timeStamp)
{
TQDateTime dt;
dt.setTime_t(timeStamp);
- return dcopWastqStatus(id, dt, Kopete::OnlineStatus::Away);
+ return dcopWasStatus(id, dt, Kopete::OnlineStatus::Away);
}
bool StatisticsPlugin::dcopWasAway(TQString id, TQString dateTime)
{
- return dcopWastqStatus(id, TQDateTime::fromString(dateTime), Kopete::OnlineStatus::Away);
+ return dcopWasStatus(id, TQDateTime::fromString(dateTime), Kopete::OnlineStatus::Away);
}
bool StatisticsPlugin::dcopWasOffline(TQString id, int timeStamp)
{
TQDateTime dt;
dt.setTime_t(timeStamp);
- return dcopWastqStatus(id, dt, Kopete::OnlineStatus::Offline);
+ return dcopWasStatus(id, dt, Kopete::OnlineStatus::Offline);
}
bool StatisticsPlugin::dcopWasOffline(TQString id, TQString dateTime)
{
- return dcopWastqStatus(id, TQDateTime::fromString(dateTime), Kopete::OnlineStatus::Offline);
+ return dcopWasStatus(id, TQDateTime::fromString(dateTime), Kopete::OnlineStatus::Offline);
}
-bool StatisticsPlugin::dcopWastqStatus(TQString id, TQDateTime dateTime, Kopete::OnlineStatus::StatusType status)
+bool StatisticsPlugin::dcopWasStatus(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]->wastqStatus(dateTime, status);
+ return statisticsContactMap[id]->wasStatus(dateTime, status);
}
return false;
}
-TQString StatisticsPlugin::dcoptqStatus(TQString id, int timeStamp)
+TQString StatisticsPlugin::dcopStatus(TQString id, int timeStamp)
{
TQDateTime dt;
dt.setTime_t(timeStamp);
- return dcoptqStatus(id, dt.toString());
+ return dcopStatus(id, dt.toString());
}
-TQString StatisticsPlugin::dcoptqStatus(TQString id, TQString dateTime)
+TQString StatisticsPlugin::dcopStatus(TQString id, TQString dateTime)
{
TQDateTime dt = TQDateTime::fromString(dateTime);
@@ -269,7 +269,7 @@ TQString StatisticsPlugin::dcoptqStatus(TQString id, TQString dateTime)
return "";
}
-TQString StatisticsPlugin::dcopMaintqStatus(TQString id, int timeStamp)
+TQString StatisticsPlugin::dcopMainStatus(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 467bd6b8..d6f75c81 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>oldtqStatus</td>
+ * <td>Event</td><td>Changes to database</td><td>oldStatus</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 dcopWastqStatus(TQString id, TQDateTime dateTime, Kopete::OnlineStatus::StatusType status);
+ bool dcopWasStatus(TQString id, TQDateTime dateTime, Kopete::OnlineStatus::StatusType status);
- TQString dcoptqStatus(TQString id, TQString dateTime);
- TQString dcoptqStatus(TQString id, int timeStamp);
+ TQString dcopStatus(TQString id, TQString dateTime);
+ TQString dcopStatus(TQString id, int timeStamp);
- TQString dcopMaintqStatus(TQString id, int timeStamp);
+ TQString dcopMainStatus(TQString id, int timeStamp);
private:
StatisticsDB *m_db;
diff --git a/kopete/plugins/statistics/statisticswidget.ui b/kopete/plugins/statistics/statisticswidget.ui
index 87dd1b4d..b0f6ea27 100644
--- a/kopete/plugins/statistics/statisticswidget.ui
+++ b/kopete/plugins/statistics/statisticswidget.ui
@@ -68,7 +68,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="tqsizeHint">
+ <property name="sizeHint">
<size>
<width>61</width>
<height>31</height>
@@ -127,7 +127,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="tqsizeHint">
+ <property name="sizeHint">
<size>
<width>40</width>
<height>20</height>
@@ -148,7 +148,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="tqsizeHint">
+ <property name="sizeHint">
<size>
<width>60</width>
<height>41</height>
@@ -181,12 +181,12 @@
<widget class="TQComboBox">
<item>
<property name="text">
- <string>Contact tqStatus at Date &amp; Time</string>
+ <string>Contact Status at Date &amp; Time</string>
</property>
</item>
<item>
<property name="text">
- <string>Most Used tqStatus at Date</string>
+ <string>Most Used Status at Date</string>
</property>
</item>
<property name="name">