2 Situare - A location system for Facebook
3 Copyright (C) 2010 Ixonos Plc. Authors:
5 Sami Rämö - sami.ramo@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,
23 #ifndef GPSLOCATIONITEM_H
24 #define GPSLOCATIONITEM_H
26 #include <QGraphicsPixmapItem>
29 * @brief Class for indicating current position accuired from GPS on the map.
31 * Also GPS fix accuracy is indicated by using two different color indicator images
32 * based on current accuracy
34 class GPSLocationItem : public QGraphicsPixmapItem
42 /*******************************************************************************
43 * MEMBER FUNCTIONS AND SLOTS
44 ******************************************************************************/
47 * @brief Enable / disable item
49 * @param enable True if item should be enabled, otherwise false
51 void setEnabled(bool enable);
54 * @brief Update position item
56 * Use yellow led image when using network positioning and green led image when using GPS.
58 * @param scenePosition Scene coordinate
59 * @param accuracy Accuracy of the GPS fix
61 void updatePosition(QPoint scenePosition, qreal accuracy);
63 /*******************************************************************************
65 ******************************************************************************/
68 * @brief Enum for current pixmap state
70 enum Accuracy { NOT_SET, ACCURATE, COARSE };
72 QPixmap m_accuratePixmap; ///< pixmap used when GPS fix is accurate
73 QPixmap m_coarsePixmap; ///< pixmap used when GPS fix is coarse
74 Accuracy m_currentAccuracy; ///< current accuracy
77 #endif // GPSLOCATIONITEM_H