networkhandlerprivatestub classes.
echo "" >> $REPORT
# find all test .pro files pahts, cut .pro extension
- UNIT_TEST_PROJECTS=(`find $UNIT_TESTS_ROOT_DIR_ABSOLUTE | egrep .pro$ | sed -e s/.pro//g`)
+ UNIT_TEST_PROJECTS=(`find $UNIT_TESTS_ROOT_DIR_ABSOLUTE | egrep \.pro$ | sed -e s,[^/]pro,,g`)
echo "###################################################"
echo "All unit test executables will be deleted"
#include <QNetworkRequest>
#include <QNetworkAccessManager>
+#include <QDebug>
#include "networkhandler.h"
#include "networkaccessmanager.h"
: m_networkHandler(0),
m_networkAccessManagerPrivate(0)
{
+ qDebug() << __PRETTY_FUNCTION__;
+
m_networkHandler = new NetworkHandler(this);
m_networkAccessManagerPrivate = new QNetworkAccessManager(this);
USA.
*/
-#include <icd/dbus_api.h>
+#include <QDebug>
#include "networkhandler.h"
-const int CONNECTION_STATE_INDEX = 7;
-
-static QDBusConnection dBusConnection = QDBusConnection::systemBus();
+#if defined(Q_WS_MAEMO_5) | defined(Q_WS_SIMULATOR)
+#include "networkhandlerprivate.h"
+#else
+#include "networkhandlerprivatestub.h"
+#endif
NetworkHandler::NetworkHandler(QObject *parent)
- : QObject(parent),
- m_connected(false),
- m_connecting(false)
-{
- dBusInterface = new QDBusInterface(ICD_DBUS_API_INTERFACE, ICD_DBUS_API_PATH,
- ICD_DBUS_API_INTERFACE, dBusConnection);
-
- dBusConnection.connect(ICD_DBUS_API_INTERFACE, ICD_DBUS_API_PATH, ICD_DBUS_API_INTERFACE,
- ICD_DBUS_API_STATE_SIG,
- this, SLOT(stateChanged(const QDBusMessage &)));
-
- state();
-}
-
-void NetworkHandler::stateChanged(const QDBusMessage &message)
+ : QObject(parent)
{
- qDebug() << __PRETTY_FUNCTION__;
-
- if (message.arguments().count() > CONNECTION_STATE_INDEX) {
-
- bool conversionOk;
- int connectionState = message.arguments().at(CONNECTION_STATE_INDEX).toInt(&conversionOk);
-
- if (conversionOk) {
- if ((connectionState == ICD_STATE_DISCONNECTED) && (isConnected())) {
- m_connected = false;
- m_connecting = false;
- emit disconnected();
- }
- else if ((connectionState == ICD_STATE_CONNECTED) &&(!isConnected())) {
- m_connected = true;
- m_connecting = false;
- emit connected();
- }
- }
- }
+ m_networkHandlerPrivate = new NetworkHandlerPrivate(this);
}
void NetworkHandler::connect()
{
qDebug() << __PRETTY_FUNCTION__;
- if (!m_connecting && !m_connected) {
- m_connecting = true;
- dBusInterface->call(ICD_DBUS_API_CONNECT_REQ,
- QVariant((unsigned int)ICD_CONNECTION_FLAG_USER_EVENT));
- }
+ m_networkHandlerPrivate->connect();
}
void NetworkHandler::disconnect()
{
qDebug() << __PRETTY_FUNCTION__;
- dBusInterface->call(ICD_DBUS_API_DISCONNECT_REQ,
- QVariant((unsigned int)ICD_CONNECTION_FLAG_USER_EVENT));
+ m_networkHandlerPrivate->disconnect();
}
bool NetworkHandler::isConnected()
{
qDebug() << __PRETTY_FUNCTION__;
- return m_connected;
+ return m_networkHandlerPrivate->isConnected();
}
void NetworkHandler::state()
{
qDebug() << __PRETTY_FUNCTION__;
- dBusInterface->call(ICD_DBUS_API_STATE_REQ);
+ m_networkHandlerPrivate->state();
}
#ifndef NETWORKHANDLER_H
#define NETWORKHANDLER_H
-#include <QtDBus>
+#include <QObject>
+
+class NetworkHandlerPrivate;
/**
* @brief NetworkHandler class.
public:
/**
+ * @brief Friend class for NetworkHandlerPrivate.
+ */
+ friend class NetworkHandlerPrivate;
+
+
+ /**
* @brief Constructor.
*
* Creates ICD D-Bus interface.
*/
void state();
-private slots:
- /**
- * @brief Slot for ICD D-Bus state change.
- *
- * @param message received D-Bus message
- */
- void stateChanged(const QDBusMessage &message);
-
/*******************************************************************************
* SIGNALS
******************************************************************************/
* DATA MEMBERS
******************************************************************************/
private:
- QDBusInterface *dBusInterface; ///< D-Bus interface
- bool m_connected; ///< Connection state variable
- bool m_connecting; ///< Connecting state variable
+ NetworkHandlerPrivate *m_networkHandlerPrivate; ///< Instance of NetworkHandlerPrivate
};
#endif // NETWORKHANDLER_H
--- /dev/null
+/*
+ Situare - A location system for Facebook
+ Copyright (C) 2010 Ixonos Plc. Authors:
+
+ Jussi Laitinen - jussi.laitinen@ixonos.com
+
+ Situare is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ version 2 as published by the Free Software Foundation.
+
+ Situare is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Situare; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ USA.
+*/
+
+#include <icd/dbus_api.h>
+
+#include "networkhandler.h"
+#include "networkhandlerprivate.h"
+
+const int CONNECTION_STATE_INDEX = 7;
+
+static QDBusConnection dBusConnection = QDBusConnection::systemBus();
+
+NetworkHandlerPrivate::NetworkHandlerPrivate(QObject *parent)
+ : QObject(parent),
+ m_connected(false),
+ m_connecting(false)
+{
+ m_parent = static_cast<NetworkHandler*>(parent);
+
+ dBusInterface = new QDBusInterface(ICD_DBUS_API_INTERFACE, ICD_DBUS_API_PATH,
+ ICD_DBUS_API_INTERFACE, dBusConnection);
+
+ dBusConnection.connect(ICD_DBUS_API_INTERFACE, ICD_DBUS_API_PATH, ICD_DBUS_API_INTERFACE,
+ ICD_DBUS_API_STATE_SIG,
+ this, SLOT(stateChanged(const QDBusMessage &)));
+
+ state();
+}
+
+void NetworkHandlerPrivate::stateChanged(const QDBusMessage &message)
+{
+ qDebug() << __PRETTY_FUNCTION__;
+
+ if (message.arguments().count() > CONNECTION_STATE_INDEX) {
+
+ bool conversionOk;
+ int connectionState = message.arguments().at(CONNECTION_STATE_INDEX).toInt(&conversionOk);
+
+ if (conversionOk) {
+ if ((connectionState == ICD_STATE_DISCONNECTED) && (isConnected())) {
+ m_connected = false;
+ m_connecting = false;
+ emit m_parent->disconnected();
+ }
+ else if ((connectionState == ICD_STATE_CONNECTED) &&(!isConnected())) {
+ m_connected = true;
+ m_connecting = false;
+ emit m_parent->connected();
+ }
+ }
+ }
+}
+
+void NetworkHandlerPrivate::connect()
+{
+ qDebug() << __PRETTY_FUNCTION__;
+
+ if (!m_connecting && !m_connected) {
+ m_connecting = true;
+ dBusInterface->call(ICD_DBUS_API_CONNECT_REQ,
+ QVariant((unsigned int)ICD_CONNECTION_FLAG_USER_EVENT));
+ }
+}
+
+void NetworkHandlerPrivate::disconnect()
+{
+ qDebug() << __PRETTY_FUNCTION__;
+
+ dBusInterface->call(ICD_DBUS_API_DISCONNECT_REQ,
+ QVariant((unsigned int)ICD_CONNECTION_FLAG_USER_EVENT));
+}
+
+bool NetworkHandlerPrivate::isConnected()
+{
+ qDebug() << __PRETTY_FUNCTION__;
+
+ return m_connected;
+}
+
+void NetworkHandlerPrivate::state()
+{
+ qDebug() << __PRETTY_FUNCTION__;
+
+ dBusInterface->call(ICD_DBUS_API_STATE_REQ);
+}
--- /dev/null
+/*
+ Situare - A location system for Facebook
+ Copyright (C) 2010 Ixonos Plc. Authors:
+
+ Jussi Laitinen - jussi.laitinen@ixonos.com
+
+ Situare is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ version 2 as published by the Free Software Foundation.
+
+ Situare is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Situare; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ USA.
+*/
+
+#ifndef NETWORKHANDLERPRIVATE_H
+#define NETWORKHANDLERPRIVATE_H
+
+#include <QtDBus>
+
+class NetworkHandler;
+
+/**
+* @brief NetworkHandlerPrivate class.
+*
+* This class handles network connection. Class notifies about
+* network connection states.
+*/
+class NetworkHandlerPrivate : public QObject
+{
+ Q_OBJECT
+
+public:
+ /**
+ * @brief Constructor.
+ *
+ * Creates ICD D-Bus interface.
+ */
+ NetworkHandlerPrivate(QObject *parent);
+
+/*******************************************************************************
+ * MEMBER FUNCTIONS AND SLOTS
+ ******************************************************************************/
+public:
+ /**
+ * @brief Requests network connection.
+ *
+ * Request is done via ICD D-Bus.
+ */
+ void connect();
+
+ /**
+ * @brief Requests to disconnect a connection.
+ *
+ * Request is done via ICD D-Bus.
+ */
+ void disconnect();
+
+ /**
+ * @brief Checks if connected to network.
+ *
+ * @return true if connected, false otherwise
+ */
+ bool isConnected();
+
+ /**
+ * @brief Requests network state.
+ */
+ void state();
+
+private slots:
+ /**
+ * @brief Slot for ICD D-Bus state change.
+ *
+ * @param message received D-Bus message
+ */
+ void stateChanged(const QDBusMessage &message);
+
+/*******************************************************************************
+ * DATA MEMBERS
+ ******************************************************************************/
+private:
+ QDBusInterface *dBusInterface; ///< D-Bus interface
+ bool m_connected; ///< Connection state variable
+ bool m_connecting; ///< Connecting state variable
+
+ NetworkHandler *m_parent; ///< Parent object
+};
+
+#endif // NETWORKHANDLERPRIVATE_H
--- /dev/null
+/*
+ Situare - A location system for Facebook
+ Copyright (C) 2010 Ixonos Plc. Authors:
+
+ Jussi Laitinen - jussi.laitinen@ixonos.com
+
+ Situare is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ version 2 as published by the Free Software Foundation.
+
+ Situare is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Situare; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ USA.
+*/
+
+#include <QDebug>
+
+#include "networkhandler.h"
+#include "networkhandlerprivatestub.h"
+
+
+NetworkHandlerPrivate::NetworkHandlerPrivate(QObject *parent)
+ : QObject(parent)
+{
+ qDebug() << __PRETTY_FUNCTION__;
+}
+
+void NetworkHandlerPrivate::connect()
+{
+ qDebug() << __PRETTY_FUNCTION__;
+}
+
+void NetworkHandlerPrivate::disconnect()
+{
+ qDebug() << __PRETTY_FUNCTION__;
+}
+
+bool NetworkHandlerPrivate::isConnected()
+{
+ qDebug() << __PRETTY_FUNCTION__;
+
+ return true;
+}
+
+void NetworkHandlerPrivate::state()
+{
+ qDebug() << __PRETTY_FUNCTION__;
+}
--- /dev/null
+/*
+ Situare - A location system for Facebook
+ Copyright (C) 2010 Ixonos Plc. Authors:
+
+ Jussi Laitinen - jussi.laitinen@ixonos.com
+
+ Situare is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ version 2 as published by the Free Software Foundation.
+
+ Situare is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Situare; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ USA.
+*/
+
+#ifndef NETWORKHANDLERPRIVATESTUB_H
+#define NETWORKHANDLERPRIVATESTUB_H
+
+#include <QObject>
+
+/**
+* @brief NetworkHandlerPrivate class does nothing.
+*
+* Class is used when compiling in desktop.
+*/
+class NetworkHandlerPrivate : public QObject
+{
+public:
+ /**
+ * @brief Constructor.
+ *
+ * @param parent QObject
+ */
+ NetworkHandlerPrivate(QObject *parent);
+
+/*******************************************************************************
+ * MEMBER FUNCTIONS AND SLOTS
+ ******************************************************************************/
+public:
+ /**
+ * @brief Requests network connection.
+ *
+ * DOES NOTHING.
+ */
+ void connect();
+
+ /**
+ * @brief Requests to disconnect a connection.
+ *
+ * DOES NOTHING.
+ */
+ void disconnect();
+
+ /**
+ * @brief Checks if connected to network.
+ *
+ * RETURNS TRUE.
+ */
+ bool isConnected();
+
+ /**
+ * @brief Requests network state.
+ *
+ * DOES NOTHING.
+ */
+ void state();
+};
+
+#endif // NETWORKHANDLERPRIVATESTUB_H
# -------------------------------------------------
TARGET = ../situare
TEMPLATE = app
-INCLUDEPATH += /usr/include/qjson /usr/include/glib-2.0 /usr/lib/glib-2.0/include
+INCLUDEPATH += /usr/include/qjson
LIBS += -lqjson
-CONFIG += icd2
-QT += dbus
RESOURCES += ../images.qrc
SOURCES += main.cpp \
ui/mainwindow.cpp \
DEFINES += QT_NO_DEBUG_OUTPUT
maemo5 | simulator {
- SOURCES += gps/gpspositionprivate.cpp
- HEADERS += gps/gpspositionprivate.h
- QT += maemo5
- CONFIG += mobility
+ INCLUDEPATH += /usr/include/glib-2.0 /usr/lib/glib-2.0/include
+ SOURCES += gps/gpspositionprivate.cpp \
+ network/networkhandlerprivate.cpp
+ HEADERS += gps/gpspositionprivate.h \
+ network/networkhandlerprivate.h
+ QT += maemo5 dbus
+ CONFIG += mobility icd2
MOBILITY = location
message([QJson])
message(Make sure you have QJson development headers installed)
message(Make sure you have QtMobility development headers installed)
message(install headers with: apt-get install libqtm-dev)
} else {
- SOURCES += gps/gpspositionprivatestub.cpp
- HEADERS += gps/gpspositionprivatestub.h
+ SOURCES += gps/gpspositionprivatestub.cpp \
+ network/networkhandlerprivatestub.cpp
+ HEADERS += gps/gpspositionprivatestub.h \
+ network/networkhandlerprivatestub.h
message(QJson built in)
message(Make sure you have QJson development headers installed)
message(install headers with: sudo apt-get install libqjson-dev)
if(user) {
m_user = user;
- m_findButton->setButtonIcon(m_user->profileImage());
+ if (!m_user->profileImage().isNull())
+ m_findButton->setButtonIcon(m_user->profileImage());
QString unit;
double value;
qDebug() << __PRETTY_FUNCTION__;
// If there is a file name provided for icon image, use it as the icon for the button
- if (normalIconPictureFileName != "") {
+ if (!normalIconPictureFileName.isEmpty()) {
QPixmap iconPixmap(normalIconPictureFileName);
QSize buttonSize = iconPixmap.size(); // Get the button size from the normal state icon picture
QIcon icon(iconPixmap);
// If there is a picture for selected state, use it instead of a simple highlight change
- if(selectedIconPictureFileName != "")
+ if(!selectedIconPictureFileName.isEmpty())
icon.addFile(selectedIconPictureFileName, buttonSize, QIcon::Selected);
setIcon(icon);
void ImageButton::setButtonIcon(const QPixmap &image)
{
+ qDebug() << __PRETTY_FUNCTION__;
+
QSize buttonSize = image.size(); // Get the button size from the normal state icon picture
QIcon icon(image);
{
qDebug() << __PRETTY_FUNCTION__;
- m_findButton->setIcon(image);
+ m_findButton->setButtonIcon(image);
}
void UserInfo::setTime(const QString &time)
{
qDebug() << __PRETTY_FUNCTION__;
+ m_dragStartTimer->stop();
+
Q_UNUSED(event);
if(m_isDraggable) {
setDraggable(false);
QSettings settings(DIRECTORY_NAME, FILE_NAME);
settings.setValue(ZOOMPANEL_POSITION, pos());
releaseMouse();
- m_dragStartTimer->stop();
m_zoomInButton->setDown(false);
m_zoomOutButton->setDown(false);
}
# Automatically generated by qmake (2.01a) Fri Mar 26 15:09:16 2010
# #####################################################################
CONFIG += qtestlib
-QT += network
+QT += network dbus
TEMPLATE = app
-TARGET =
DEPENDPATH += .
INCLUDEPATH += . \
- ../../../src/
+ ../../../src/ \
+ /usr/include/glib-2.0 /usr/lib/glib-2.0/include
# Input
SOURCES += testfriendgroupitem.cpp \
../../../src/map/mapfetcher.cpp \
../../../src/map/frienditemshandler.cpp \
../../../src/user/user.cpp \
- ../../../src/map/gpslocationitem.cpp
+ ../../../src/map/gpslocationitem.cpp \
+ ../../../src/network/networkaccessmanager.cpp \
+ ../../../src/network/networkhandler.cpp \
+ ../../../src/network/networkreply.cpp
HEADERS += ../../../src/map/friendgroupitem.h \
../../../src/map/friendlocationitem.h \
../../../src/map/baselocationitem.h \
../../../src/map/mapcommon.h \
../../../src/map/frienditemshandler.h \
../../../src/user/user.h \
- ../../../src/map/gpslocationitem.h
+ ../../../src/map/gpslocationitem.h \
+ ../../../src/network/networkaccessmanager.h \
+ ../../../src/network/networkhandler.h \
+ ../../../src/network/networkreply.h
DEFINES += QT_NO_DEBUG_OUTPUT
RESOURCES += ../../../images.qrc
+
+maemo5 | simulator {
+ INCLUDEPATH += /usr/include/glib-2.0 /usr/lib/glib-2.0/include
+ SOURCES += ../../../src/network/networkhandlerprivate.cpp
+ HEADERS += ../../../src/network/networkhandlerprivate.h
+ QT += maemo5 dbus
+ CONFIG += icd2
+ message([QJson])
+ message(Make sure you have QJson development headers installed)
+ message(add: deb http://repository.maemo.org/extras-devel fremantle free non-free)
+ message(to Scratchbox's sources.list in /etc/apt)
+ message(run: apt-get update)
+ message(install headers with: apt-get install libqjson-dev)
+ message([QtMobility])
+ message(Make sure you have QtMobility development headers installed)
+ message(install headers with: apt-get install libqtm-dev)
+} else {
+ SOURCES += ../../../src/network/networkhandlerprivatestub.cpp
+ HEADERS += ../../../src/network/networkhandlerprivatestub.h
+ message(QJson built in)
+ message(Make sure you have QJson development headers installed)
+ message(install headers with: sudo apt-get install libqjson-dev)
+}
# Automatically generated by qmake (2.01a) Tue Apr 27 14:52:31 2010
# #####################################################################
CONFIG += qtestlib
-QT += network
+QT += network dbus
TEMPLATE = app
DEPENDPATH += .
INCLUDEPATH += . \
- ../../../src/
+ ../../../src/ \
+ /usr/include/glib-2.0 /usr/lib/glib-2.0/include
RESOURCES += ../../../images.qrc
# Input
../../../src/map/maptilerequest.cpp \
../../../src/map/frienditemshandler.cpp \
../../../src/map/friendgroupitem.cpp \
- ../../../src/map/gpslocationitem.cpp
+ ../../../src/map/gpslocationitem.cpp \
+ ../../../src/network/networkaccessmanager.cpp \
+ ../../../src/network/networkhandler.cpp \
+ ../../../src/network/networkreply.cpp
HEADERS += ../../../src/map/ownlocationitem.h \
../../../src/map/mapscene.h \
../../../src/map/maptile.h \
../../../src/map/maptilerequest.h \
../../../src/map/frienditemshandler.h \
../../../src/map/friendgroupitem.h \
- ../../../src/map/gpslocationitem.h
+ ../../../src/map/gpslocationitem.h \
+ ../../../src/network/networkaccessmanager.h \
+ ../../../src/network/networkhandler.h \
+ ../../../src/network/networkreply.h
DEFINES += QT_NO_DEBUG_OUTPUT
+
+maemo5 | simulator {
+ INCLUDEPATH += /usr/include/glib-2.0 /usr/lib/glib-2.0/include
+ SOURCES += ../../../src/network/networkhandlerprivate.cpp
+ HEADERS += ../../../src/network/networkhandlerprivate.h
+ QT += maemo5 dbus
+ CONFIG += icd2
+ message([QJson])
+ message(Make sure you have QJson development headers installed)
+ message(add: deb http://repository.maemo.org/extras-devel fremantle free non-free)
+ message(to Scratchbox's sources.list in /etc/apt)
+ message(run: apt-get update)
+ message(install headers with: apt-get install libqjson-dev)
+ message([QtMobility])
+ message(Make sure you have QtMobility development headers installed)
+ message(install headers with: apt-get install libqtm-dev)
+} else {
+ SOURCES += ../../../src/network/networkhandlerprivatestub.cpp
+ HEADERS += ../../../src/network/networkhandlerprivatestub.h
+ message(QJson built in)
+ message(Make sure you have QJson development headers installed)
+ message(install headers with: sudo apt-get install libqjson-dev)
+}
+
../../../src/map/gpslocationitem.h
DEFINES += QT_NO_DEBUG_OUTPUT
RESOURCES += ../../../images.qrc
+
+maemo5 | simulator {
+ INCLUDEPATH += /usr/include/glib-2.0 /usr/lib/glib-2.0/include
+ SOURCES += ../../../src/network/networkhandlerprivate.cpp
+ HEADERS += ../../../src/network/networkhandlerprivate.h
+ QT += maemo5 dbus
+ CONFIG += icd2
+ message([QJson])
+ message(Make sure you have QJson development headers installed)
+ message(add: deb http://repository.maemo.org/extras-devel fremantle free non-free)
+ message(to Scratchbox's sources.list in /etc/apt)
+ message(run: apt-get update)
+ message(install headers with: apt-get install libqjson-dev)
+ message([QtMobility])
+ message(Make sure you have QtMobility development headers installed)
+ message(install headers with: apt-get install libqtm-dev)
+} else {
+ SOURCES += ../../../src/network/networkhandlerprivatestub.cpp
+ HEADERS += ../../../src/network/networkhandlerprivatestub.h
+ message(QJson built in)
+ message(Make sure you have QJson development headers installed)
+ message(install headers with: sudo apt-get install libqjson-dev)
+}
+
../../../src/user/user.cpp \
../../../src/map/friendlocationitem.cpp \
../../../src/map/gpslocationitem.cpp \
- ../../../src/engine/networkaccessmanager.cpp \
- ../../../src/engine/networkhandler.cpp \
- ../../../src/engine/networkreply.cpp
+ ../../../src/network/networkaccessmanager.cpp \
+ ../../../src/network/networkhandler.cpp \
+ ../../../src/network/networkreply.cpp
HEADERS += ../../../src/map/mapengine.h \
../../../src/map/mapscene.h \
../../../src/map/maptile.h \
../../../src/user/user.h \
../../../src/map/friendlocationitem.h \
../../../src/map/gpslocationitem.h \
- ../../../src/engine/networkaccessmanager.h \
- ../../../src/engine/networkhandler.h \
- ../../../src/engine/networkreply.h
+ ../../../src/network/networkaccessmanager.h \
+ ../../../src/network/networkhandler.h \
+ ../../../src/network/networkreply.h
DEFINES += QT_NO_DEBUG_OUTPUT
+
+maemo5 | simulator {
+ INCLUDEPATH += /usr/include/glib-2.0 /usr/lib/glib-2.0/include
+ SOURCES += ../../../src/network/networkhandlerprivate.cpp
+ HEADERS += ../../../src/network/networkhandlerprivate.h
+ QT += maemo5 dbus
+ CONFIG += icd2
+ message([QJson])
+ message(Make sure you have QJson development headers installed)
+ message(add: deb http://repository.maemo.org/extras-devel fremantle free non-free)
+ message(to Scratchbox's sources.list in /etc/apt)
+ message(run: apt-get update)
+ message(install headers with: apt-get install libqjson-dev)
+ message([QtMobility])
+ message(Make sure you have QtMobility development headers installed)
+ message(install headers with: apt-get install libqtm-dev)
+} else {
+ SOURCES += ../../../src/network/networkhandlerprivatestub.cpp
+ HEADERS += ../../../src/network/networkhandlerprivatestub.h
+ message(QJson built in)
+ message(Make sure you have QJson development headers installed)
+ message(install headers with: sudo apt-get install libqjson-dev)
+}
+
# Automatically generated by qmake (2.01a) Mon Mar 29 10:06:28 2010
# #####################################################################
CONFIG += qtestlib
-QT += network
+QT += network dbus
TEMPLATE = app
-TARGET =
DEPENDPATH += .
INCLUDEPATH += . \
- ../../../src/
+ ../../../src/ \
+ /usr/include/glib-2.0 /usr/lib/glib-2.0/include
# Input
SOURCES += testmapscene.cpp \
../../../src/map/frienditemshandler.cpp \
../../../src/map/friendgroupitem.cpp \
../../../src/map/baselocationitem.cpp \
- ../../../src/map/gpslocationitem.cpp
+ ../../../src/map/gpslocationitem.cpp \
+ ../../../src/network/networkaccessmanager.cpp \
+ ../../../src/network/networkhandler.cpp \
+ ../../../src/network/networkreply.cpp
HEADERS += ../../../src/map/mapscene.h \
../../../src/map/maptile.h \
../../../src/map/mapengine.h \
../../../src/map/frienditemshandler.h \
../../../src/map/friendgroupitem.h \
../../../src/map/baselocationitem.h \
- ../../../src/map/gpslocationitem.h
+ ../../../src/map/gpslocationitem.h \
+ ../../../src/network/networkaccessmanager.h \
+ ../../../src/network/networkhandler.h \
+ ../../../src/network/networkreply.h
DEFINES += QT_NO_DEBUG_OUTPUT
+
+maemo5 | simulator {
+ INCLUDEPATH += /usr/include/glib-2.0 /usr/lib/glib-2.0/include
+ SOURCES += ../../../src/network/networkhandlerprivate.cpp
+ HEADERS += ../../../src/network/networkhandlerprivate.h
+ QT += maemo5 dbus
+ CONFIG += icd2
+ message([QJson])
+ message(Make sure you have QJson development headers installed)
+ message(add: deb http://repository.maemo.org/extras-devel fremantle free non-free)
+ message(to Scratchbox's sources.list in /etc/apt)
+ message(run: apt-get update)
+ message(install headers with: apt-get install libqjson-dev)
+ message([QtMobility])
+ message(Make sure you have QtMobility development headers installed)
+ message(install headers with: apt-get install libqtm-dev)
+} else {
+ SOURCES += ../../../src/network/networkhandlerprivatestub.cpp
+ HEADERS += ../../../src/network/networkhandlerprivatestub.h
+ message(QJson built in)
+ message(Make sure you have QJson development headers installed)
+ message(install headers with: sudo apt-get install libqjson-dev)
+}
# Automatically generated by qmake (2.01a) Mon Mar 29 10:06:28 2010
# #####################################################################
CONFIG += qtestlib
-QT += network
+QT += network dbus
TEMPLATE = app
TARGET =
DEPENDPATH += .
INCLUDEPATH += . \
- ../../../src/
+ ../../../src/ \
+ /usr/include/glib-2.0 /usr/lib/glib-2.0/include
# Input
SOURCES += testmaptile.cpp \
../../../src/map/friendgroupitem.cpp \
../../../src/map/baselocationitem.cpp \
../../../src/user/user.cpp \
- ../../../src/map/gpslocationitem.cpp
+ ../../../src/map/gpslocationitem.cpp \
+ ../../../src/network/networkaccessmanager.cpp \
+ ../../../src/network/networkhandler.cpp \
+ ../../../src/network/networkreply.cpp
HEADERS += ../../../src/map/maptile.h \
../../../src/map/mapfetcher.h \
../../../src/map/mapengine.h \
../../../src/map/friendgroupitem.h \
../../../src/map/baselocationitem.h \
../../../src/user/user.h \
- ../../../src/map/gpslocationitem.h
+ ../../../src/map/gpslocationitem.h \
+ ../../../src/network/networkaccessmanager.h \
+ ../../../src/network/networkhandler.h \
+ ../../../src/network/networkreply.h
DEFINES += QT_NO_DEBUG_OUTPUT
+
+maemo5 | simulator {
+ INCLUDEPATH += /usr/include/glib-2.0 /usr/lib/glib-2.0/include
+ SOURCES += ../../../src/network/networkhandlerprivate.cpp
+ HEADERS += ../../../src/network/networkhandlerprivate.h
+ QT += maemo5 dbus
+ CONFIG += icd2
+ message([QJson])
+ message(Make sure you have QJson development headers installed)
+ message(add: deb http://repository.maemo.org/extras-devel fremantle free non-free)
+ message(to Scratchbox's sources.list in /etc/apt)
+ message(run: apt-get update)
+ message(install headers with: apt-get install libqjson-dev)
+ message([QtMobility])
+ message(Make sure you have QtMobility development headers installed)
+ message(install headers with: apt-get install libqtm-dev)
+} else {
+ SOURCES += ../../../src/network/networkhandlerprivatestub.cpp
+ HEADERS += ../../../src/network/networkhandlerprivatestub.h
+ message(QJson built in)
+ message(Make sure you have QJson development headers installed)
+ message(install headers with: sudo apt-get install libqjson-dev)
+}
../../../src/map/frienditemshandler.cpp \
../../../src/map/friendgroupitem.cpp \
../../../src/map/gpslocationitem.cpp \
- ../../../src/engine/networkaccessmanager.cpp \
- ../../../src/engine/networkhandler.cpp \
- ../../../src/engine/networkreply.cpp
+ ../../../src/network/networkaccessmanager.cpp \
+ ../../../src/network/networkhandler.cpp \
+ ../../../src/network/networkreply.cpp
HEADERS += ../../../src/map/ownlocationitem.h \
../../../src/map/mapscene.h \
../../../src/map/maptile.h \
../../../src/map/frienditemshandler.h \
../../../src/map/friendgroupitem.h \
../../../src/map/gpslocationitem.h \
- ../../../src/engine/networkaccessmanager.h \
- ../../../src/engine/networkhandler.h \
- ../../../src/engine/networkreply.h
+ ../../../src/network/networkaccessmanager.h \
+ ../../../src/network/networkhandler.h \
+ ../../../src/network/networkreply.h
DEFINES += QT_NO_DEBUG_OUTPUT
+
+maemo5 | simulator {
+ INCLUDEPATH += /usr/include/glib-2.0 /usr/lib/glib-2.0/include
+ SOURCES += ../../../src/network/networkhandlerprivate.cpp
+ HEADERS += ../../../src/network/networkhandlerprivate.h
+ QT += maemo5 dbus
+ CONFIG += icd2
+ message([QJson])
+ message(Make sure you have QJson development headers installed)
+ message(add: deb http://repository.maemo.org/extras-devel fremantle free non-free)
+ message(to Scratchbox's sources.list in /etc/apt)
+ message(run: apt-get update)
+ message(install headers with: apt-get install libqjson-dev)
+ message([QtMobility])
+ message(Make sure you have QtMobility development headers installed)
+ message(install headers with: apt-get install libqtm-dev)
+} else {
+ SOURCES += ../../../src/network/networkhandlerprivatestub.cpp
+ HEADERS += ../../../src/network/networkhandlerprivatestub.h
+ message(QJson built in)
+ message(Make sure you have QJson development headers installed)
+ message(install headers with: sudo apt-get install libqjson-dev)
+}
../../../src/ui/avatarimage.cpp \
../../../src/ui/imagebutton.cpp \
testfriendlist.cpp
+RESOURCES += ../../../images.qrc
User *user1 = new User(QString("Address"), QPointF(12.22, 23.33), QString("Name"),
QString("Note"), QUrl("http://image.url"), QString("Timestamp"), true,
QString("UserID1"), QString("Units"), 44.12);
+ user1->setProfileImage(QPixmap("situare_user.gif"));
User *user2 = new User(QString("Address"), QPointF(12.22, 23.33), QString("Name"),
QString("Note"), QUrl("http://image.url"), QString("Timestamp"), true,
QString("UserID2"), QString("Units"), 44.12);
+ user2->setProfileImage(QPixmap("situare_user.gif"));
FriendListItem *item1 = new FriendListItem(view);
item1->setData(user1);
User *user3 = new User(QString("Address"), QPointF(12.22, 23.33), QString("Name"),
QString("Note"), QUrl("http://image.url"), QString("Timestamp"), true,
QString("UserID3"), QString("Units"), 44.12);
+ user3->setProfileImage(QPixmap("situare_user.gif"));
FriendListItem *item3 = new FriendListItem(view);
item3->setData(user3);
User *user1 = new User(QString("Address"), QPointF(12.22, 23.33), QString("Name"),
QString("Note"), QUrl("http://image.url"), QString("Timestamp"), true,
QString("UserID1"), QString("Units"), 44.12);
+ user1->setProfileImage(QPixmap("situare_user.gif"));
User *user2 = new User(QString("Address"), QPointF(12.22, 23.33), QString("Name"),
QString("Note"), QUrl("http://image.url"), QString("Timestamp"), true,
QString("UserID2"), QString("Units"), 44.12);
+ user2->setProfileImage(QPixmap("situare_user.gif"));
FriendListItem *item1 = new FriendListItem(view);
item1->setData(user1);