Modified MainWindow::automaticUpdateDialogFinished.
[situare] / src / map / baselocationitem.h
1 /*
2    Situare - A location system for Facebook
3    Copyright (C) 2010  Ixonos Plc. Authors:
4
5        Ville Tiensuu - ville.tiensuu@ixonos.com
6        Sami Rämö - sami.ramo@ixonos.com
7
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.
11
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.
16
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,
20    USA.
21 */
22
23 #ifndef BASELOCATIONITEM_H
24 #define BASELOCATIONITEM_H
25
26 #include <QGraphicsPixmapItem>
27
28
29 /**
30 * @brief Baseclass for showing own and friends locations on the map.
31 *
32 * @author Ville Tiensuu - ville.tiensuu@ixonos.com
33 * @author Sami Rämö - sami.ramo@ixonos.com
34 */
35 class BaseLocationItem : public QGraphicsPixmapItem, public QObject
36 {
37
38 public:
39     /**
40     * @brief Constructor of BaseLocationItem.
41     *        Sets parent.
42     *
43     * @param parent
44     */
45     BaseLocationItem(QObject *parent = 0);
46
47 /*******************************************************************************
48  * MEMBER FUNCTIONS AND SLOTS
49  ******************************************************************************/
50 public:
51     /**
52     * @brief Return item sceneBoundingRect transformed to given zoom level
53     *
54     * Because of using ItemIgnoresTransformations, and not scaling the item, the default
55     * sceneBoundingRect does always return the lowest map tile level scene bounding rect which
56     * is scaled to current zoom level.
57     *
58     * @param zoomLevel Zoom level for which the sceneBoundingRect should be transformed
59     * @return sceneBoundingRect transformed to given zoom level
60     */
61     QRect sceneTransformedBoundingRect(int zoomLevel) const;
62 };
63
64
65 #endif // BASELOCATIONITEM_H