/**
* @brief Map View class. Used to display Map
-*
-* @class MapViewScreen mainwindow.h "src/ui/mainwindow.h"
*/
class MapViewScreen : public QWidget
{
private slots:
/**
- * @brief Slot for enabling auto centering.
- *
- * @param enabled true if map should center to GPS position, false otherwise
- */
- void enableAutoCentering(bool enabled);
-
- /**
* @brief Slot for drawing the Open Street Map license text
*
* @param width Width of the viewport
*/
void drawOwnLocationCrosshair(int width, int height);
- /**
- * @brief Slot for map location change.
- */
- void locationChanged();
+// /**
+// * @brief Slot for map location change.
+// */
+// void locationChanged();
/**
* @brief Set correnct view port size to datamembers
*/
void setViewPortSize(const int width, const int height);
- /**
- * @brief Slot for GPS position.
- *
- * @param position latitude and longitude values
- * @param accuracy coordinate accuracy in metres
- */
- void positionReceived(QPointF position, qreal accuracy);
-
/*******************************************************************************
* SIGNALS
******************************************************************************/
signals:
/**
+ * @brief Signal for enabling auto centering.
+ *
+ * @param enabled true if map should center to GPS position, false otherwise
+ */
+ void enableAutoCentering(bool enabled);
+
+ /**
* @brief Signal when friend list locations are fetched
*
* Forwarded to map engine and friends list panel
*/
void friendsLocationsReady(QList<User *> &friendsList);
- /**
+ /**
+ * @brief Signal for GPS enabling / disabling
+ *
+ * @param enabled True is GPS is enabled, otherwise false
+ */
+ void gpsEnabled(bool enabled);
+
+ /**
* @brief Signal for map location change.
*/
void mapLocationChanged();
/**
+ * @brief Slot for GPS position.
+ *
+ * @param position latitude and longitude values
+ * @param accuracy coordinate accuracy in metres
+ */
+ void positionReceived(QPointF position, qreal accuracy);
+
+ /**
* @brief Signal from MapEngine to SituareEngine is travelling here
*/
void ownLocation(QPointF ownLatitudeLongitudeLocation);
* DATA MEMBERS
******************************************************************************/
private:
- MapEngine *m_mapEngine; ///< MapEngine
- UserInfoPanel *m_userPanel; ///< Instance of the user information panel
- FriendListPanel *m_friendsListPanel; ///< Instance of friends list panel
- ZoomButtonPanel *m_zoomButtonPanel; ///< Instance of zoom button panel
- QLabel *m_osmLicense; ///< Label for Open Street Map license
- bool m_autoCenteringEnabled; ///< Enable
- QLabel *m_ownLocationCrosshair; ///< Label that show ownLocationCrosshair
- bool m_drawOwnLocationCrosshair; ///< Flag for making ownLocationCrosshair visible or not
- int m_viewPortWidth; ///< Width of view port
- int m_viewPortHeight; ///< Height of view port
+ bool m_drawOwnLocationCrosshair; ///< Flag for making ownLocationCrosshair visible or not
+ FriendListPanel *m_friendsListPanel; ///< Instance of friends list panel
+ MapEngine *m_mapEngine; ///< MapEngine
+ QLabel *m_osmLicense; ///< Label for Open Street Map license
+ QLabel *m_ownLocationCrosshair; ///< Label that show ownLocationCrosshair
+ UserInfoPanel *m_userPanel; ///< Instance of the user information panel
+ int m_viewPortHeight; ///< Height of view port
+ int m_viewPortWidth; ///< Width of view port
+ ZoomButtonPanel *m_zoomButtonPanel; ///< Instance of zoom button panel
};
#endif // MAPVIEWTAB_H