2 Situare - A location system for Facebook
3 Copyright (C) 2010 Ixonos Plc. Authors:
5 Kaj Wallin - kaj.wallin@ixonos.com
7 Situare is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License
9 version 2 as published by the Free Software Foundation.
11 Situare is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with Situare; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
28 #include "map/mapengine.h"
29 #include "friendlistpanel.h"
30 #include "userpanel.h"
31 #include "zoombuttonpanel.h"
34 * @brief Map View class. Used to display Map
36 * @class MapViewScreen mainwindow.h "src/ui/mainwindow.h"
38 class MapViewScreen : public QWidget
46 * @param parent Parent
48 MapViewScreen(QWidget *parent = 0);
50 /*******************************************************************************
51 * MEMBER FUNCTIONS AND SLOTS
52 ******************************************************************************/
55 * @brief Slot for setting own location crosshair visibility
57 * @param visibility false <-> show, true <-> hide
59 void setOwnLocationCrosshairVisibility(bool visibility);
63 * @brief Slot for enabling auto centering.
65 * @param enabled true if map should center to GPS position, false otherwise
67 void enableAutoCentering(bool enabled);
70 * @brief Slot for drawing the Open Street Map license text
72 * @param width Width of the viewport
73 * @param height Height of the viewport
75 void drawOsmLicense(int width, int height);
78 * @brief Slot for drawing the own location crosshair
80 * @param width Width of the viewport
81 * @param height Height of the viewport
83 void drawOwnLocationCrosshair(int width, int height);
86 * @brief Slot for map location change.
88 void locationChanged();
91 * @brief Set correnct view port size to datamembers
93 * @param width Width of the viewport
94 * @param height Height of the viewport
96 void setViewPortSize(const int width, const int height);
99 * @brief Slot for GPS position.
101 * @param position latitude and longitude values
102 * @param accuracy coordinate accuracy in metres
104 void positionReceived(QPointF position, qreal accuracy);
106 /*******************************************************************************
108 ******************************************************************************/
111 * @brief Signal when friend list locations are fetched
113 * Forwarded to map engine and friends list panel
115 * @param friendsList Friends list data
117 void friendsLocationsReady(QList<User *> &friendsList);
120 * @brief Signal for map location change.
122 void mapLocationChanged();
125 * @brief Signal from MapEngine to SituareEngine is travelling here
127 void ownLocation(QPointF ownLatitudeLongitudeLocation);
130 * @brief Signal from SituareEngine to MapEngine is travelling here
132 void requestOwnLocation();
135 * @brief Signal when user location is fetched
137 * @param user User data
139 void userLocationReady(User *user);
142 * @brief Signal for HW increase button
144 void zoomInKeyPressed();
147 * @brief Signal for HW decrease button
149 void zoomOutKeyPressed();
151 /*******************************************************************************
153 ******************************************************************************/
155 MapEngine *m_mapEngine; ///< MapEngine
156 UserInfoPanel *m_userPanel; ///< Instance of the user information panel
157 FriendListPanel *m_friendsListPanel; ///< Instance of friends list panel
158 ZoomButtonPanel *m_zoomButtonPanel; ///< Instance of zoom button panel
159 QLabel *m_osmLicense; ///< Label for Open Street Map license
160 bool m_autoCenteringEnabled; ///< Enable
161 QLabel *m_ownLocationCrosshair; ///< Label that show ownLocationCrosshair
162 bool m_drawOwnLocationCrosshair; ///< Flag for making ownLocationCrosshair visible or not
163 int m_viewPortWidth; ///< Width of view port
164 int m_viewPortHeight; ///< Height of view port
167 #endif // MAPVIEWTAB_H