Documenting
[situare] / src / engine / engine.h
index 581ef5b..71bfc7a 100644 (file)
 
 #include "coordinates/geocoordinate.h"
 
-#ifdef Q_WS_MAEMO_5
+class QTimer;
+
 class Application;
-#endif
 class FacebookAuthentication;
 class FacebookCredentials;
+class GeocodingService;
 class GPSPosition;
 class Location;
 class MainWindow;
 class MapEngine;
+class MCE;
 class NetworkAccessManager;
+class Route;
 class RoutingService;
 class SituareService;
 class User;
-class MCE;
-
-class QTimer;
 
 /**
 * @brief Engine class for Situare Application
@@ -88,13 +88,6 @@ public slots:
     void fetchUsernameFromSettings();
 
     /**
-    * @brief Slot to intercept signal when location search results are ready
-    *
-    * @param result list if location search results
-    */
-    void locationDataReady(QList<Location> &result);
-
-    /**
     * @brief Slot to intercept signal when location search is issued
     *
     * @param location QString location
@@ -167,11 +160,16 @@ private:
     void initializeGpsAndAutocentering();
 
     /**
-      * @brief Connect signals coming from Facdebook authenticator
+      * @brief Connect signals coming from Facebook authenticator
       */
     void signalsFromFacebookAuthenticator();
 
     /**
+      * @brief Connect signals coming from GeocodingService
+      */
+    void signalsFromGeocodingService();
+
+    /**
       * @brief Connect signals coming from GPS
       */
     void signalsFromGPS();
@@ -215,19 +213,17 @@ private slots:
     void disableAutoCentering();
 
     /**
-    * @brief Enables automatic location update.
-    *
-    * @param enabled true if enabled, false otherwise
-    * @param updateIntervalMsecs update interval in milliseconds
+    * @brief Calls vibration feedback.
     */
-    void enableAutomaticLocationUpdate(bool enabled, int updateIntervalMsecs = 0);
+    void draggingModeTriggered();
 
     /**
-    * @brief Slot for enabling power saving.
+    * @brief Enables automatic location update.
     *
     * @param enabled true if enabled, false otherwise
+    * @param updateIntervalMsecs update interval in milliseconds
     */
-    void enablePowerSave(bool enabled);
+    void enableAutomaticLocationUpdate(bool enabled, int updateIntervalMsecs = 0);
 
     /**
     * @brief Slot to intercept signal when user's/friend's image is downloaded
@@ -246,6 +242,21 @@ private slots:
     void requestAutomaticUpdateIfMoved(GeoCoordinate position);
 
     /**
+    * @brief Route is parsed and is ready for further processing.
+    *
+    * @param route Route item containing parsed route details
+    */
+    void routeParsed(Route &route);
+
+    /**
+    * @brief Routes to geo coordinates.
+    *
+    * Uses map center coordinates as start point.
+    * @param endPointCoordinates end point geo coordinates
+    */
+    void routeTo(const GeoCoordinate &endPointCoordinates);
+
+    /**
     * @brief Slot for setting auto centering state.
     *
     * Calls gps to send last known position
@@ -268,12 +279,28 @@ private slots:
     void setGPS(bool enabled);
 
     /**
+    * @brief Slot for setting power saving state.
+    *
+    * @param enabled true if enabled, false otherwise
+    */
+    void setPowerSaving(bool enabled);
+
+    /**
     * @brief Automatic update interval timer timeout.
     *
     * Requests update location if user has moved.
     */
     void startAutomaticUpdate();
 
+    /**
+    * @brief Called when topmost window is changed
+    *
+    * Does set power saving state.
+    *
+    * @param isMainWindow True if MainWindow is the topmost one
+    */
+    void topmostWindowChanged(bool isMainWindow);
+
 /*******************************************************************************
  * SIGNALS
  ******************************************************************************/
@@ -292,6 +319,16 @@ signals:
     void clearUpdateLocationDialogData();
 
     /**
+    * @brief Signal when direction and distance from current map center point to current GPS
+    *        location is changed
+    *
+    * @param direction Direction in degrees
+    * @param distance Distance in meters
+    * @param draw Should the indicator triangle be drawn or not
+    */
+    void directionIndicatorValuesUpdate(qreal direction, qreal distance, bool draw);
+
+    /**
     * @brief Signals when new friends data is ready
     *
     * @param friendList List of User instances (friends)
@@ -328,10 +365,11 @@ private:
     bool m_automaticUpdateRequest;      ///< Flag for automatic update request
     bool m_userMoved;                   ///< Flag for user move
 
-#ifdef Q_WS_MAEMO_5
-    Application *m_app;                              ///< Pointer to Application
-#endif
+    QTimer *m_automaticUpdateIntervalTimer; ///< Automatic update interval timer
+
     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
@@ -339,10 +377,6 @@ private:
     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
-
-    QTimer *m_automaticUpdateIntervalTimer; ///< Automatic update interval timer
-    GeoCoordinate m_lastUpdatedGPSPosition; ///< Last updated GPS position
-
 };
 
 #endif // ENGINE_H