enableAutoCentering(enabled);
}
- void SituareEngine::connectedToNetwork()
- {
- qDebug() << __PRETTY_FUNCTION__;
-
- disconnect(m_networkHandler, SIGNAL(connected()),
- this, SLOT(connectedToNetwork()));
-
- disconnect(m_networkHandler, SIGNAL(disconnected()),
- this, SLOT(disconnectedFromNetwork()));
-
- m_facebookAuthenticator->start();
- m_mapEngine->init();
- m_ui->show();
- //TODO: Start map image fetching
- }
+
void SituareEngine::disableAutoCentering()
{
qDebug() << __PRETTY_FUNCTION__;
MainWindow *m_ui; ///< Instance of the MainWindow UI
MapEngine *m_mapEngine; ///< MapEngine
SituareService *m_situareService; ///< Instance of the situare server communication service
- NetworkHandler *m_networkHandler; ///< Instance of NetworkHandler
-
};
#endif // ENGINE_H
#include <QtAlgorithms>
#include <QDebug>
--#include <QNetworkAccessManager>
#include <QString>
#include <QStringList>
#include <QUrl>
#include "ownlocationitem.h"
#include "mapengine.h"
++#include "engine/networkaccessmanager.h"
MapEngine::MapEngine(QObject *parent)
: QObject(parent),
#include "situarecommon.h"
#include "parser.h"
#include "ui/avatarimage.h"
+#include "engine/networkaccessmanager.h"
SituareService::SituareService(QObject *parent)
- : QObject(parent)
+ : QObject(parent),
+ m_user(0)
{
qDebug() << __PRETTY_FUNCTION__;
-- m_networkManager = new QNetworkAccessManager;
++ m_networkManager = new NetworkAccessManager(this);
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), SLOT(requestFinished(QNetworkReply*)));
- m_imageFetcher = new ImageFetcher(new QNetworkAccessManager(this), this);
+ m_imageFetcher = new ImageFetcher(new NetworkAccessManager(this), this);
connect(this, SIGNAL(fetchImage(QUrl)), m_imageFetcher, SLOT(fetchImage(QUrl)));
connect(m_imageFetcher, SIGNAL(imageReceived(QUrl,QPixmap)), this,
SLOT(imageReceived(QUrl, QPixmap)));
#include "../user/user.h"
#include "imagefetcher.h"
--class QNetworkAccessManager;
++class NetworkAccessManager;
class QNetworkReply;
class QNetworkRequest;
class QPointF;
private:
- FacebookCredentials m_credentials; ///< handle for FacebookCredentials
- QList<QNetworkReply *> m_currentRequests; ///< List of current http requests
- QNetworkAccessManager *m_networkManager; ///< Pointer to QNetworkAccessManager
- ImageFetcher *m_imageFetcher; ///< Instance of the image fetcher
+ int m_nbrOfImages; ///< Indicates number of friends whose images has been downloaded
+ int m_visited; ///< Indicates number of friends with images
+
+ bool m_defaultImage; ///< Indicates if some of the friends/user doesn't have a image
+
+ QList<QNetworkReply *> m_currentRequests; ///< List of current http requests
+ QList<User *> m_friendsList; ///< List of friends(User)
+
- QNetworkAccessManager *m_networkManager; ///< Pointer to QNetworkAccessManager
++ NetworkAccessManager *m_networkManager; ///< Pointer to QNetworkAccessManager
+
+ FacebookCredentials m_credentials; ///< handle for FacebookCredentials
+ ImageFetcher *m_imageFetcher; ///< Instance of the image fetcher
+ User *m_user; ///< Pointer to User
+
+
- User *m_user; ///< Pointer to User
- QList<User *> m_friendsList; ///< List of friends(User)
- int m_visited; ///< Indicates number of friends with profile images
- int m_nbrOfImages; ///< Indicates number of friends whose profile images have been downloaded
- bool m_defaultImage; ///< Indicates if some of the friends or the user does not have a profile image
};
#endif // SITUARESERVICE_H
map/gpslocationitem.cpp \
ui/zoombuttonpanel.cpp \
ui/userinfo.cpp \
+ engine/networkhandler.cpp \
ui/sidepanel.cpp \
+ engine/networkaccessmanager.cpp \
- engine/networkreply.cpp
++ engine/networkreply.cpp \
+ ui/zoombutton.cpp
HEADERS += ui/mainwindow.h \
map/mapengine.h \
map/mapview.h \
ui/zoombuttonpanel.h \
common.h \
ui/userinfo.h \
+ engine/networkhandler.h \
ui/sidepanel.h \
+ engine/networkaccessmanager.h \
- engine/networkreply.h
++ engine/networkreply.h \
+ ui/zoombutton.h
QT += network \
webkit
+
- #DEFINES += QT_NO_DEBUG_OUTPUT
+ DEFINES += QT_NO_DEBUG_OUTPUT
maemo5 | simulator {
SOURCES += gps/gpspositionprivate.cpp