2 Situare - A location system for Facebook
3 Copyright (C) 2010 Ixonos Plc. Authors:
5 Ville Tiensuu - ville.tiensuu@ixonos.com
6 Sami Rämö - sami.ramo@ixonos.com
8 Situare is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 version 2 as published by the Free Software Foundation.
12 Situare is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with Situare; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
23 #ifndef BASELOCATIONITEM_H
24 #define BASELOCATIONITEM_H
26 #include <QGraphicsPixmapItem>
29 * @brief Baseclass for showing own and friends locations on the map.
31 * @author Ville Tiensuu - ville.tiensuu@ixonos.com
32 * @author Sami Rämö - sami.ramo@ixonos.com
34 class BaseLocationItem : public QGraphicsPixmapItem, public QObject
38 * @brief Constructor of BaseLocationItem.
43 BaseLocationItem(QObject *parent = 0);
45 /*******************************************************************************
46 * MEMBER FUNCTIONS AND SLOTS
47 ******************************************************************************/
50 * @brief Return item rect transformed to given zoom level
52 * Because of using ItemIgnoresTransformations, and not scaling the item, the default
53 * sceneBoundingRect can't be used because it always returns the lowest map tile level scene
54 * bounding rect. This method does return rect scaled to given zoom level. Rect's center
55 * point is also normalized to be inside the map.
57 * @param zoomLevel Zoom level for which the sceneBoundingRect should be transformed
58 * @return sceneBoundingRect transformed to given zoom level
60 QRect sceneTransformedBoundingRect(int zoomLevel) const;
64 #endif // BASELOCATIONITEM_H