Updated tests cases matching the new tabs
[situare] / src / map / maprouteitem.h
1 /*
2     Situare - A location system for Facebook
3     Copyright (C) 2010  Ixonos Plc. Authors:
4
5         Sami Rämö - sami.ramo@ixonos.com
6
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.
10
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.
15
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,
19     USA.
20 */
21
22 #ifndef MAPROUTEITEM_H
23 #define MAPROUTEITEM_H
24
25 #include <QGraphicsItemGroup>
26
27 class Route;
28
29 /**
30  * @brief Graphics item for map route (a.k.a track)
31  *
32  * Class is derived from QGraphicsItemGroup and is used as a container for QGraphicsLineItem items
33  * which are created between Route geometry points.
34  *
35  * @author Sami Rämö - sami.ramo@ixonos.com
36  */
37 class MapRouteItem : public QGraphicsItemGroup
38 {
39 public:
40     /**
41     * @brief Constructor
42     *
43     * @param parent Parent QGraphicsItem
44     */
45     explicit MapRouteItem(QGraphicsItem *parent = 0);
46
47     /**
48     * @brief Constructor with building the route lines
49     *
50     * @param route Route information used for building the lines presenting a track
51     * @param parent Parent QGraphicsItem
52     */
53     explicit MapRouteItem(Route *route, QGraphicsItem *parent = 0);
54
55 /*******************************************************************************
56  * MEMBER FUNCTIONS AND SLOTS
57  ******************************************************************************/
58 public:
59     /**
60     * @brief Clear the route
61     *
62     * Deletes all line items.
63     */
64     void clear();
65
66     /**
67     * @brief Set route
68     *
69     * Does clear old route before setting the new one. Does create lines presenting a track.
70     *
71     * @param route Route information used for building the lines presenting a track
72     */
73     void setRoute(Route *route);
74 };
75
76 #endif // MAPROUTEITEM_H