Engine class for Situare Application. More...
#include <engine.h>

Public Slots | |
| void | error (const int context, const int error) |
| Slot to intercept error signal from ImageFetcher and SituareService. | |
| void | fetchUsernameFromSettings () |
| Slot to intercept signal when username is fetched from settings. | |
| void | locationSearch (QString location) |
| Slot to intercept signal when location search is issued. | |
| void | loginActionPressed () |
| Slot to intercept signal when Login/Logout action is pressed. | |
| void | loginOk () |
| Slot to intercept signal from successful login. | |
| void | loginProcessCancelled () |
| Slot to intercept signal when user has cancelled login process. | |
| void | logout () |
| Changes application state when logged out. | |
| void | requestAddress () |
| Calls reverseGeo from SituareService to translate coordinates to street address. | |
| void | requestUpdateLocation (const QString &status=QString(), bool publish=false) |
| Calls updateLocation from SituareService to send the location update to Situare server. | |
| void | refreshUserData () |
| Slot to refresh user data. | |
| void | updateWasSuccessful () |
| Slot to intercept signal from successful location update. | |
| void | userDataChanged (User *user, QList< User * > &friendsList) |
| Slot to intercept signal when new user data is available. Splits User and friendsList data and emits them as two different signals. | |
Signals | |
| void | automaticLocationUpdateEnabled (bool enabled) |
| Signals when automatic location update was enabled. | |
| void | clearUpdateLocationDialogData () |
| Signal to clear locationUpdateDialog's data. | |
| void | directionIndicatorValuesUpdate (qreal direction, qreal distance, bool draw) |
| Signal when direction and distance from current map center point to current GPS location is changed. | |
| void | friendsLocationsReady (QList< User * > &friendList) |
| Signals when new friends data is ready. | |
| void | friendImageReady (User *user) |
| Signals when friend's image is ready. | |
| void | locationDataParsed (QList< Location > &result) |
| Emited when location request is parsed and is ready for further processing. | |
| void | userLocationReady (User *user) |
| Signals when new user data is ready. | |
Public Member Functions | |
| SituareEngine () | |
| Constructor. | |
| ~SituareEngine () | |
| Destructor. | |
Private Slots | |
| void | changeAutoCenteringSetting (bool enabled) |
| Set auto centering feature enabled / disabled. | |
| void | disableAutoCentering () |
| Slot for disabling automatic centering when map is scrolled manually. | |
| void | draggingModeTriggered () |
| Calls vibration feedback. | |
| void | enableAutomaticLocationUpdate (bool enabled, int updateIntervalMsecs=0) |
| Enables automatic location update. | |
| void | imageReady (User *user) |
| Slot to intercept signal when user's/friend's image is downloaded. | |
| void | requestAutomaticUpdateIfMoved (GeoCoordinate position) |
| Requests automatic update. | |
| void | routeParsed (Route &route) |
| Route is parsed and is ready for further processing. | |
| void | routeTo (const GeoCoordinate &endPointCoordinates) |
| Routes to geo coordinates. | |
| void | routeToCursor () |
| Route to current cursor position. | |
| void | setAutoCentering (bool enabled) |
| Slot for setting auto centering state. | |
| void | setFirstStartZoomLevel () |
| Sets zoom level to default when first GPS location is received if autocentering is enabled. | |
| void | setGPS (bool enabled) |
| Slot for setting GPS state. | |
| void | setPowerSaving (bool enabled) |
| Slot for setting power saving state. | |
| void | showContactDialog (const QString &facebookId) |
| Shows contact dialog. | |
| void | startAutomaticUpdate () |
| Automatic update interval timer timeout. | |
| void | topmostWindowChanged (bool isMainWindow) |
| Called when topmost window is changed. | |
Private Member Functions | |
| void | initializeGpsAndAutocentering () |
| Read settings and determine whether to use GPS and autocentering. When values does not found on the settings, GPS and autocentering are enabled as a default. | |
| void | signalsFromFacebookAuthenticator () |
| Connect signals coming from Facebook authenticator. | |
| void | signalsFromGeocodingService () |
| Connect signals coming from GeocodingService. | |
| void | signalsFromGPS () |
| Connect signals coming from GPS. | |
| void | signalsFromMainWindow () |
| Connect signals coming from MainWindow. | |
| void | signalsFromMapEngine () |
| Connect signals coming from MapEngine. | |
| void | signalsFromMapView () |
| Connect signals coming from MapView. | |
| void | signalsFromRoutingService () |
| Connect signals coming from RoutingService. | |
| void | signalsFromSituareService () |
| Connect signals coming from Situare. | |
Private Attributes | |
| bool | m_autoCenteringEnabled |
| Auto centering flag. | |
| bool | m_automaticUpdateFirstStart |
| Automatic location update first start flag. | |
| bool | m_automaticUpdateRequest |
| Flag for automatic update request. | |
| bool | m_userMoved |
| Flag for user move. | |
| QTimer * | m_automaticUpdateIntervalTimer |
| Automatic update interval timer. | |
| ContactManager * | m_contactManager |
| Instance of contact manager. | |
| FacebookAuthentication * | m_facebookAuthenticator |
| Instance for facebook authenticator. | |
| GeocodingService * | m_geocodingService |
| Instance of the geocoding service. | |
| GeoCoordinate | m_lastUpdatedGPSPosition |
| Last updated GPS position. | |
| GPSPosition * | m_gps |
| Instance of the gps position. | |
| MainWindow * | m_ui |
| Instance of the MainWindow UI. | |
| MapEngine * | m_mapEngine |
| MapEngine. | |
| NetworkAccessManager * | m_networkAccessManager |
| NetworkAccessManager. | |
| RoutingService * | m_routingService |
| Instance of the routing service. | |
| SituareService * | m_situareService |
| Instance of the situare server communication service. | |
| MCE * | m_mce |
| Instance of the MCE. | |
Engine class for Situare Application.
This class handles all the underlaying login of the Situare application.
| void SituareEngine::automaticLocationUpdateEnabled | ( | bool | enabled | ) | [signal] |
Signals when automatic location update was enabled.
| enabled | true if enabled, false otherwise |
| void SituareEngine::changeAutoCenteringSetting | ( | bool | enabled | ) | [private, slot] |
Set auto centering feature enabled / disabled.
| enabled | true if enabled, false otherwise |
| void SituareEngine::directionIndicatorValuesUpdate | ( | qreal | direction, | |
| qreal | distance, | |||
| bool | draw | |||
| ) | [signal] |
Signal when direction and distance from current map center point to current GPS location is changed.
| direction | Direction in degrees | |
| distance | Distance in meters | |
| draw | Should the indicator triangle be drawn or not |
| void SituareEngine::enableAutomaticLocationUpdate | ( | bool | enabled, | |
| int | updateIntervalMsecs = 0 | |||
| ) | [private, slot] |
Enables automatic location update.
| enabled | true if enabled, false otherwise | |
| updateIntervalMsecs | update interval in milliseconds |
| void SituareEngine::error | ( | const int | context, | |
| const int | error | |||
| ) | [slot] |
Slot to intercept error signal from ImageFetcher and SituareService.
| context | Error context | |
| error | Error message |
| void SituareEngine::friendImageReady | ( | User * | user | ) | [signal] |
Signals when friend's image is ready.
| user | Instance of friend |
| void SituareEngine::friendsLocationsReady | ( | QList< User * > & | friendList | ) | [signal] |
Signals when new friends data is ready.
| friendList | List of User instances (friends) |
| void SituareEngine::imageReady | ( | User * | user | ) | [private, slot] |
Slot to intercept signal when user's/friend's image is downloaded.
| user | Instance of user/friend |
| void SituareEngine::locationDataParsed | ( | QList< Location > & | result | ) | [signal] |
Emited when location request is parsed and is ready for further processing.
| result | List of Location items |
| void SituareEngine::locationSearch | ( | QString | location | ) | [slot] |
Slot to intercept signal when location search is issued.
| location | QString location |
| void SituareEngine::requestAutomaticUpdateIfMoved | ( | GeoCoordinate | position | ) | [private, slot] |
Requests automatic update.
Makes automatic location update request if user has moved enough.
| position | geo coordinates |
| void SituareEngine::requestUpdateLocation | ( | const QString & | status = QString(), |
|
| bool | publish = false | |||
| ) | [slot] |
Calls updateLocation from SituareService to send the location update to Situare server.
| status | Status message | |
| publish | Publish on Facebook |
| void SituareEngine::routeParsed | ( | Route & | route | ) | [private, slot] |
| void SituareEngine::routeTo | ( | const GeoCoordinate & | endPointCoordinates | ) | [private, slot] |
Routes to geo coordinates.
Uses map center coordinates as start point.
| endPointCoordinates | end point geo coordinates |
| void SituareEngine::setAutoCentering | ( | bool | enabled | ) | [private, slot] |
Slot for setting auto centering state.
Calls gps to send last known position
| enabled | true if auto centering was enabled, false otherwise |
| void SituareEngine::setGPS | ( | bool | enabled | ) | [private, slot] |
Slot for setting GPS state.
| enabled | true if gps should be enabled, false otherwise |
| void SituareEngine::setPowerSaving | ( | bool | enabled | ) | [private, slot] |
Slot for setting power saving state.
| enabled | true if enabled, false otherwise |
| void SituareEngine::showContactDialog | ( | const QString & | facebookId | ) | [private, slot] |
Shows contact dialog.
Calls MainWindow showContactDialog with contact guid defined by contact's Facebook ID.
| facebookId | contact's facebookId |
| void SituareEngine::startAutomaticUpdate | ( | ) | [private, slot] |
Automatic update interval timer timeout.
Requests update location if user has moved.
| void SituareEngine::topmostWindowChanged | ( | bool | isMainWindow | ) | [private, slot] |
Called when topmost window is changed.
Does set power saving state.
| isMainWindow | True if MainWindow is the topmost one |
| void SituareEngine::userLocationReady | ( | User * | user | ) | [signal] |
Signals when new user data is ready.
| user | Instance of User |
1.6.1