00001 /* 00002 Situare - A location system for Facebook 00003 Copyright (C) 2010 Ixonos Plc. Authors: 00004 00005 Kaj Wallin - kaj.wallin@ixonos.com 00006 00007 Situare is free software; you can redistribute it and/or 00008 modify it under the terms of the GNU General Public License 00009 version 2 as published by the Free Software Foundation. 00010 00011 Situare is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 GNU General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with Situare; if not, write to the Free Software 00018 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 00019 USA. 00020 */ 00021 00022 00023 #ifndef MAPVIEWTAB_H 00024 #define MAPVIEWTAB_H 00025 00026 #include <QtGui> 00027 00028 #include "map/mapengine.h" 00029 #include "friendlistpanel.h" 00030 #include "userpanel.h" 00031 #include "zoombuttonpanel.h" 00032 00036 class MapViewScreen : public QWidget 00037 { 00038 Q_OBJECT 00039 00040 public: 00046 MapViewScreen(QWidget *parent = 0); 00047 00048 /******************************************************************************* 00049 * MEMBER FUNCTIONS AND SLOTS 00050 ******************************************************************************/ 00051 public slots: 00057 void setOwnLocationCrosshairVisibility(bool visibility); 00058 00059 private slots: 00066 void drawOsmLicense(int width, int height); 00067 00074 void drawOwnLocationCrosshair(int width, int height); 00075 00076 // /** 00077 // * @brief Slot for map location change. 00078 // */ 00079 // void locationChanged(); 00080 00087 void setViewPortSize(const int width, const int height); 00088 00089 /******************************************************************************* 00090 * SIGNALS 00091 ******************************************************************************/ 00092 signals: 00098 void enableAutoCentering(bool enabled); 00099 00107 void friendsLocationsReady(QList<User *> &friendsList); 00108 00114 void gpsEnabled(bool enabled); 00115 00119 void mapLocationChanged(); 00120 00127 void positionReceived(QPointF position, qreal accuracy); 00128 00132 void ownLocation(QPointF ownLatitudeLongitudeLocation); 00133 00137 void requestOwnLocation(); 00138 00143 void refreshUserData(); 00144 00149 void requestReverseGeo(); 00150 00156 void reverseGeoReady(const QString &address); 00157 00164 void statusUpdate(const QString &status, const bool &publish); 00165 00171 void userLocationReady(User *user); 00172 00176 void zoomInKeyPressed(); 00177 00181 void zoomOutKeyPressed(); 00182 00183 /******************************************************************************* 00184 * DATA MEMBERS 00185 ******************************************************************************/ 00186 private: 00187 bool m_drawOwnLocationCrosshair; 00188 FriendListPanel *m_friendsListPanel; 00189 MapEngine *m_mapEngine; 00190 QLabel *m_osmLicense; 00191 QLabel *m_ownLocationCrosshair; 00192 UserInfoPanel *m_userPanel; 00193 int m_viewPortHeight; 00194 int m_viewPortWidth; 00195 ZoomButtonPanel *m_zoomButtonPanel; 00196 }; 00197 00198 #endif // MAPVIEWTAB_H