Port DataEngineTracker example,

add a note in TODO
This commit is contained in:
Bhushan Shah 2013-09-04 20:12:21 +05:30
parent 8ead7fd0f9
commit 772e97459a
2 changed files with 6 additions and 9 deletions

View File

@ -2,14 +2,10 @@ Still to be ported
Applets:
* nowplaying
* nowplaying (Requires nowplaying DataEngine to be ported)
* pairsgame
* samegame
Dataengines:
* dataEngineTracker
Kpart: only example still to be ported
KRunner: only example still to be ported

View File

@ -26,6 +26,7 @@
#include "dataenginetracker.h"
#include <QTime>
#include <QDebug>
DataEngineTracker::DataEngineTracker(Plasma::DataEngine *engine, QObject *parent)
: QObject(parent),
@ -38,23 +39,23 @@ DataEngineTracker::DataEngineTracker(Plasma::DataEngine *engine, QObject *parent
void DataEngineTracker::dataUpdated(const QString &source, const Plasma::DataEngine::Data &data)
{
kDebug() << QTime::currentTime() << source;
qDebug() << QTime::currentTime() << source;
QHashIterator<QString, QVariant> it(data);
while (it.hasNext()) {
it.next();
kDebug() << " " << it.key() << it.value();
qDebug() << " " << it.key() << it.value();
}
}
void DataEngineTracker::sourceAdded(const QString &source)
{
kDebug() << QTime::currentTime() << source;
qDebug() << QTime::currentTime() << source;
m_engine->connectSource(source, this);
}
void DataEngineTracker::sourceRemoved(const QString &source)
{
kDebug() << QTime::currentTime() << source;
qDebug() << QTime::currentTime() << source;
}
#include <dataenginetracker.moc>