Exemple #1
0
QAppManager::QAppManager(QObject *parent) :
    QObject(parent)
{
    registerMetaType();

    m_Proxy = new Proxy("com.contact.info","/DemoObject",QDBusConnection::sessionBus(),NULL);
}
/*!
    Constructs a new category by using all fields of the given category \a other.
*/
RepositoryCategory::RepositoryCategory(const RepositoryCategory &other)
    : m_displayname(other.m_displayname), m_data(other.m_data), m_enabled(other.m_enabled),
      m_tooltip(other.m_tooltip)
{
    registerMetaType();
}
/*!
    Constructs an uninitialized RepositoryCategory object.
*/
RepositoryCategory::RepositoryCategory()
    : m_enabled(false)
{
    registerMetaType();
}
#include <shared/util.h>    // QTRY_VERIFY
#include <qtopiaipcmarshal.h>
#include <qtopialog.h>

#include <QWhereabouts>
#include <QWhereaboutsUpdate>
#include <QWhereaboutsFactory>

Q_DECLARE_METATYPE(QWhereaboutsUpdate);
Q_DECLARE_METATYPE(QWhereabouts::State);
Q_DECLARE_METATYPE(QList<int>);
Q_DECLARE_METATYPE(QList<QDateTime>);

// need to call qRegisterMetaType() within a function
static int registerMetaType() { qRegisterMetaType<QWhereaboutsUpdate>("QWhereaboutsUpdate"); return 0; }
static int dummy = registerMetaType();



/*
    Records the intervals between each update emitted by a QWhereabouts instance.
*/
class QUpdateIntervalLogger : public QObject
{
    Q_OBJECT
public:
    QUpdateIntervalLogger(QWhereabouts *whereabouts, QObject *parent = 0)
        : QObject(parent),
          m_whereabouts(whereabouts)
    {
    }