2 Situare - A location system for Facebook
3 Copyright (C) 2010 Ixonos Plc. Authors:
5 Jussi Laitinen - jussi.laitinen@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 ROUTINGPANEL_H
24 #define ROUTINGPANEL_H
28 #include "panelbase.h"
30 class ExtendedListItemDelegate;
34 class RouteWaypointListView;
37 * @brief Routing panel
39 * @author Jussi Laitinen - jussi.laitinen (at) ixonos.com
40 * @author Sami Rämö - sami.ramo (at) ixonos.com
42 class RoutingPanel : public PanelBase
48 * @brief Default constructor
52 RoutingPanel(QWidget *parent = 0);
54 /*******************************************************************************
55 * BASE CLASS INHERITED AND REIMPLEMENTED MEMBER FUNCTIONS
56 ******************************************************************************/
59 * @brief Re-implemented from QWidget::hideEvent()
61 * Calls clearListsSelections()
65 void hideEvent(QHideEvent *event);
67 /*******************************************************************************
68 * MEMBER FUNCTIONS AND SLOTS
69 ******************************************************************************/
72 * @brief Clears lists' selections.
74 void clearListsSelections();
77 * @brief Handler for clear route button clicks
79 void clearRouteButtonClicked();
82 * @brief Sets route to the panel.
84 * Appends route waypoint list with route segments.
86 * @param route Route item containing parsed route details
88 void setRoute(Route &route);
90 /*******************************************************************************
92 ******************************************************************************/
95 * @brief Emitted when route is cleared
100 * @brief Request routing to current cursor position
102 void routeToCursor();
105 * @brief Signal for route waypoint item clicked.
107 * @param coordinate waypoint item's coordinate
109 void routeWaypointItemClicked(const GeoCoordinate &coordinate);
112 * @brief Signal for requesting a panel to be opened
114 * @param widget Pointer to the widget that emitted the signal
116 void showPanelRequested(QWidget *widget);
118 /*******************************************************************************
120 ******************************************************************************/
122 QLabel *m_resultsLabel; ///< Location list label
124 ImageButton *m_clearRouteButton; ///< Search location button
125 RouteWaypointListView *m_routeWaypointListView; ///< Route instructions list view
128 #endif // ROUTINGPANEL_H