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 ******************************************************************************/
56 * @brief Slot for enabling auto centering.
58 * @param enabled true if map should center to GPS position, false otherwise
60 void enableAutoCentering(bool enabled);
63 * @brief Slot for drawing the Open Street Map license text
65 * @param width Width of the viewport
66 * @param height Height of the viewport
68 void drawOsmLicense(int width, int height);
71 * @brief Slot for map location change.
73 void locationChanged();
76 * @brief Slot for GPS position.
78 * @param position latitude and longitude values
79 * @param accuracy coordinate accuracy in metres
81 void positionReceived(QPointF position, qreal accuracy);
83 /*******************************************************************************
85 ******************************************************************************/
88 * @brief Signal when friend list locations are fetched
90 * Forwarded to map engine and friends list panel
92 * @param friendsList Friends list data
94 void friendsLocationsReady(QList<User *> &friendsList);
97 * @brief Signal for map location change.
99 void mapLocationChanged();
102 * @brief Signal when user location is fetched
104 * @param user User data
106 void userLocationReady(User *user);
109 * @brief Signal for HW increase button
111 void zoomInKeyPressed();
114 * @brief Signal for HW decrease button
116 void zoomOutKeyPressed();
118 /*******************************************************************************
120 ******************************************************************************/
122 MapEngine *m_mapEngine; ///< MapEngine
123 UserInfoPanel *m_userPanel; ///< Instance of the user information panel
124 FriendListPanel *m_friendsListPanel; ///< Instance of friends list panel
125 ZoomButtonPanel *m_zoomButtonPanel; ///< Instance of zoom button panel
126 QLabel *m_osmLicense; ///< Label for Open Street Map license
127 bool m_autoCenteringEnabled; ///< Enable
130 #endif // MAPVIEWTAB_H