summaryrefslogtreecommitdiffstats
path: root/kopete/plugins/statistics/statisticsplugin.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
commit47c8a359c5276062c4bc17f0e82410f29081b502 (patch)
tree2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /kopete/plugins/statistics/statisticsplugin.cpp
parent6f82532777a35e0e60bbd2b290b2e93e646f349b (diff)
downloadtdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz
tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/plugins/statistics/statisticsplugin.cpp')
-rw-r--r--kopete/plugins/statistics/statisticsplugin.cpp98
1 files changed, 49 insertions, 49 deletions
diff --git a/kopete/plugins/statistics/statisticsplugin.cpp b/kopete/plugins/statistics/statisticsplugin.cpp
index f0d190b3..bef49af8 100644
--- a/kopete/plugins/statistics/statisticsplugin.cpp
+++ b/kopete/plugins/statistics/statisticsplugin.cpp
@@ -14,9 +14,9 @@
*************************************************************************
*/
-#include <qfile.h>
-#include <qdict.h>
-#include <qtimer.h>
+#include <tqfile.h>
+#include <tqdict.h>
+#include <tqtimer.h>
#include <kgenericfactory.h>
#include <kaboutdata.h>
@@ -46,34 +46,34 @@ typedef KGenericFactory<StatisticsPlugin> StatisticsPluginFactory;
static const KAboutData aboutdata("kopete_statistics", I18N_NOOP("Statistics") , "0.1" );
K_EXPORT_COMPONENT_FACTORY( kopete_statistics, StatisticsPluginFactory( &aboutdata ) )
-StatisticsPlugin::StatisticsPlugin( QObject *parent, const char *name, const QStringList &)
+StatisticsPlugin::StatisticsPlugin( TQObject *parent, const char *name, const TQStringList &)
: DCOPObject("StatisticsDCOPIface"),
Kopete::Plugin( StatisticsPluginFactory::instance(), parent, name )
{
KAction *viewMetaContactStatistics = new KAction( i18n("View &Statistics" ),
- QString::fromLatin1( "log" ), 0, this, SLOT(slotViewStatistics()),
+ TQString::fromLatin1( "log" ), 0, this, TQT_SLOT(slotViewStatistics()),
actionCollection(), "viewMetaContactStatistics" );
viewMetaContactStatistics->setEnabled(Kopete::ContactList::self()->selectedMetaContacts().count() == 1);
- connect(Kopete::ChatSessionManager::self(),SIGNAL(chatSessionCreated(Kopete::ChatSession*)),
- this, SLOT(slotViewCreated(Kopete::ChatSession*)));
- connect(Kopete::ChatSessionManager::self(),SIGNAL(aboutToReceive(Kopete::Message&)),
- this, SLOT(slotAboutToReceive(Kopete::Message&)));
+ connect(Kopete::ChatSessionManager::self(),TQT_SIGNAL(chatSessionCreated(Kopete::ChatSession*)),
+ this, TQT_SLOT(slotViewCreated(Kopete::ChatSession*)));
+ connect(Kopete::ChatSessionManager::self(),TQT_SIGNAL(aboutToReceive(Kopete::Message&)),
+ this, TQT_SLOT(slotAboutToReceive(Kopete::Message&)));
- connect(Kopete::ContactList::self(), SIGNAL(metaContactSelected(bool)),
- viewMetaContactStatistics, SLOT(setEnabled(bool)));
- connect(Kopete::ContactList::self(), SIGNAL(metaContactAdded(Kopete::MetaContact*)),
- this, SLOT(slotMetaContactAdded(Kopete::MetaContact*)));
- connect(Kopete::ContactList::self(), SIGNAL(metaContactRemoved(Kopete::MetaContact*)),
- this, SLOT(slotMetaContactRemoved(Kopete::MetaContact*)));
+ connect(Kopete::ContactList::self(), TQT_SIGNAL(metaContactSelected(bool)),
+ viewMetaContactStatistics, TQT_SLOT(setEnabled(bool)));
+ connect(Kopete::ContactList::self(), TQT_SIGNAL(metaContactAdded(Kopete::MetaContact*)),
+ this, TQT_SLOT(slotMetaContactAdded(Kopete::MetaContact*)));
+ connect(Kopete::ContactList::self(), TQT_SIGNAL(metaContactRemoved(Kopete::MetaContact*)),
+ this, TQT_SLOT(slotMetaContactRemoved(Kopete::MetaContact*)));
setXMLFile("statisticsui.rc");
/* Initialization reads the database, so it could be a bit time-consuming
due to disk access. This should overcome the problem and makes it non-blocking. */
- QTimer::singleShot(0, this, SLOT(slotInitialize()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotInitialize()));
}
void StatisticsPlugin::slotInitialize()
@@ -81,8 +81,8 @@ void StatisticsPlugin::slotInitialize()
// Initializes the database
m_db = new StatisticsDB();
- QPtrList<Kopete::MetaContact> list = Kopete::ContactList::self()->metaContacts();
- QPtrListIterator<Kopete::MetaContact> it( list );
+ TQPtrList<Kopete::MetaContact> list = Kopete::ContactList::self()->metaContacts();
+ TQPtrListIterator<Kopete::MetaContact> it( list );
for (; it.current(); ++it)
{
slotMetaContactAdded(it.current());
@@ -91,7 +91,7 @@ void StatisticsPlugin::slotInitialize()
StatisticsPlugin::~StatisticsPlugin()
{
- QMap<Kopete::MetaContact*, StatisticsContact*>::Iterator it;
+ TQMap<Kopete::MetaContact*, StatisticsContact*>::Iterator it;
for ( it = statisticsMetaContactMap.begin(); it != statisticsMetaContactMap.end(); ++it )
{
delete it.data();
@@ -107,13 +107,13 @@ void StatisticsPlugin::slotAboutToReceive(Kopete::Message& m)
void StatisticsPlugin::slotViewCreated(Kopete::ChatSession* session)
{
- connect(session, SIGNAL(closing(Kopete::ChatSession*)), this, SLOT(slotViewClosed(Kopete::ChatSession*)));
+ connect(session, TQT_SIGNAL(closing(Kopete::ChatSession*)), this, TQT_SLOT(slotViewClosed(Kopete::ChatSession*)));
}
void StatisticsPlugin::slotViewClosed(Kopete::ChatSession* session)
{
- QPtrList<Kopete::Contact> list = session->members();
- QPtrListIterator<Kopete::Contact> it( list );
+ TQPtrList<Kopete::Contact> list = session->members();
+ TQPtrListIterator<Kopete::Contact> it( list );
for (; it.current(); ++it)
{
@@ -145,7 +145,7 @@ void StatisticsPlugin::slotMetaContactAdded(Kopete::MetaContact *mc)
{
statisticsMetaContactMap[mc] = new StatisticsContact(mc, db());
- QPtrList<Kopete::Contact> clist = mc->contacts();
+ TQPtrList<Kopete::Contact> clist = mc->contacts();
Kopete::Contact *contact;
// we need to call slotContactAdded if MetaContact allready have contacts
@@ -154,12 +154,12 @@ void StatisticsPlugin::slotMetaContactAdded(Kopete::MetaContact *mc)
this->slotContactAdded(contact);
}
- connect(mc, SIGNAL(onlineStatusChanged( Kopete::MetaContact *, Kopete::OnlineStatus::StatusType)), this,
- SLOT(slotOnlineStatusChanged(Kopete::MetaContact*, Kopete::OnlineStatus::StatusType)));
- connect(mc, SIGNAL(contactAdded( Kopete::Contact *)), this,
- SLOT(slotContactAdded( Kopete::Contact *)));
- connect(mc, SIGNAL(contactRemoved( Kopete::Contact *)), this,
- SLOT(slotContactRemoved( Kopete::Contact *)));
+ connect(mc, TQT_SIGNAL(onlineStatusChanged( Kopete::MetaContact *, Kopete::OnlineStatus::StatusType)), this,
+ TQT_SLOT(slotOnlineStatusChanged(Kopete::MetaContact*, Kopete::OnlineStatus::StatusType)));
+ connect(mc, TQT_SIGNAL(contactAdded( Kopete::Contact *)), this,
+ TQT_SLOT(slotContactAdded( Kopete::Contact *)));
+ connect(mc, TQT_SIGNAL(contactRemoved( Kopete::Contact *)), this,
+ TQT_SLOT(slotContactRemoved( Kopete::Contact *)));
}
void StatisticsPlugin::slotMetaContactRemoved(Kopete::MetaContact *mc)
@@ -191,7 +191,7 @@ void StatisticsPlugin::slotContactRemoved( Kopete::Contact *c)
statisticsContactMap.remove(c->contactId());
}
-void StatisticsPlugin::dcopStatisticsDialog(QString id)
+void StatisticsPlugin::dcopStatisticsDialog(TQString id)
{
kdDebug() << k_funcinfo << "statistics - DCOP dialog :" << id << endl;
@@ -201,43 +201,43 @@ void StatisticsPlugin::dcopStatisticsDialog(QString id)
}
}
-bool StatisticsPlugin::dcopWasOnline(QString id, int timeStamp)
+bool StatisticsPlugin::dcopWasOnline(TQString id, int timeStamp)
{
- QDateTime dt;
+ TQDateTime dt;
dt.setTime_t(timeStamp);
return dcopWasStatus(id, dt, Kopete::OnlineStatus::Online);
}
-bool StatisticsPlugin::dcopWasOnline(QString id, QString dateTime)
+bool StatisticsPlugin::dcopWasOnline(TQString id, TQString dateTime)
{
- return dcopWasStatus(id, QDateTime::fromString(dateTime), Kopete::OnlineStatus::Online);
+ return dcopWasStatus(id, TQDateTime::fromString(dateTime), Kopete::OnlineStatus::Online);
}
-bool StatisticsPlugin::dcopWasAway(QString id, int timeStamp)
+bool StatisticsPlugin::dcopWasAway(TQString id, int timeStamp)
{
- QDateTime dt;
+ TQDateTime dt;
dt.setTime_t(timeStamp);
return dcopWasStatus(id, dt, Kopete::OnlineStatus::Away);
}
-bool StatisticsPlugin::dcopWasAway(QString id, QString dateTime)
+bool StatisticsPlugin::dcopWasAway(TQString id, TQString dateTime)
{
- return dcopWasStatus(id, QDateTime::fromString(dateTime), Kopete::OnlineStatus::Away);
+ return dcopWasStatus(id, TQDateTime::fromString(dateTime), Kopete::OnlineStatus::Away);
}
-bool StatisticsPlugin::dcopWasOffline(QString id, int timeStamp)
+bool StatisticsPlugin::dcopWasOffline(TQString id, int timeStamp)
{
- QDateTime dt;
+ TQDateTime dt;
dt.setTime_t(timeStamp);
return dcopWasStatus(id, dt, Kopete::OnlineStatus::Offline);
}
-bool StatisticsPlugin::dcopWasOffline(QString id, QString dateTime)
+bool StatisticsPlugin::dcopWasOffline(TQString id, TQString dateTime)
{
- return dcopWasStatus(id, QDateTime::fromString(dateTime), Kopete::OnlineStatus::Offline);
+ return dcopWasStatus(id, TQDateTime::fromString(dateTime), Kopete::OnlineStatus::Offline);
}
-bool StatisticsPlugin::dcopWasStatus(QString id, QDateTime dateTime, Kopete::OnlineStatus::StatusType status)
+bool StatisticsPlugin::dcopWasStatus(TQString id, TQDateTime dateTime, Kopete::OnlineStatus::StatusType status)
{
kdDebug() << k_funcinfo << "statistics - DCOP wasOnline :" << id << endl;
@@ -249,17 +249,17 @@ bool StatisticsPlugin::dcopWasStatus(QString id, QDateTime dateTime, Kopete::Onl
return false;
}
-QString StatisticsPlugin::dcopStatus(QString id, int timeStamp)
+TQString StatisticsPlugin::dcopStatus(TQString id, int timeStamp)
{
- QDateTime dt;
+ TQDateTime dt;
dt.setTime_t(timeStamp);
return dcopStatus(id, dt.toString());
}
-QString StatisticsPlugin::dcopStatus(QString id, QString dateTime)
+TQString StatisticsPlugin::dcopStatus(TQString id, TQString dateTime)
{
- QDateTime dt = QDateTime::fromString(dateTime);
+ TQDateTime dt = TQDateTime::fromString(dateTime);
if (dt.isValid() && statisticsContactMap.contains(id))
{
@@ -269,9 +269,9 @@ QString StatisticsPlugin::dcopStatus(QString id, QString dateTime)
return "";
}
-QString StatisticsPlugin::dcopMainStatus(QString id, int timeStamp)
+TQString StatisticsPlugin::dcopMainStatus(TQString id, int timeStamp)
{
- QDateTime dt;
+ TQDateTime dt;
dt.setTime_t(timeStamp);
if (dt.isValid() && statisticsContactMap.contains(id))
{