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 LOCATIONSEARCHPANEL_H
24 #define LOCATIONSEARCHPANEL_H
28 #include "panelbase.h"
30 class ExtendedListItemDelegate;
34 class LocationListView;
37 * @brief Location search panel
39 * @author Jussi Laitinen - jussi.laitinen (at) ixonos.com
40 * @author Sami Rämö - sami.ramo (at) ixonos.com
42 class LocationSearchPanel : public PanelBase
48 * @brief Default constructor
52 LocationSearchPanel(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 Set text for header
74 * @param count Search result count
76 void setHeaderText(int count);
80 * @brief Clears lists' selections.
82 * Does call setRouteButtonDisabled().
84 void clearListsSelections();
87 * @brief Populates location list view.
89 * @param locations list of Location objects
91 void populateLocationListView(const QList<Location> &locations);
94 * @brief Routes to selected location.
96 * Emits routeToLocation if location is selected from list.
98 void routeToSelectedLocation();
101 * @brief Sets route button disabled.
103 * Disabled if there isn't any list item selected.
105 void setRouteButtonDisabled();
107 /*******************************************************************************
109 ******************************************************************************/
112 * @brief Signal for location item clicked.
114 * @param swBound south-west bound GeoCoordinate
115 * @param neBound north-east bound GeoCoordinate
117 void locationItemClicked(const GeoCoordinate &swBound, const GeoCoordinate &neBound);
120 * @brief Signal for requesting searching location.
122 void requestSearchLocation();
125 * @brief Signal for routing to location.
127 * @param coordinates location's geo coordinates
129 void routeToLocation(const GeoCoordinate &coordinates);
132 * @brief Signal for route waypoint item clicked.
134 * @param coordinate waypoint item's coordinate
136 void routeWaypointItemClicked(const GeoCoordinate &coordinate);
138 /*******************************************************************************
140 ******************************************************************************/
142 QLabel *m_resultsLabel; ///< Location list label
144 ImageButton *m_routeButton; ///< Route to location button
145 LocationListView *m_locationListView; ///< Search results list view
148 #endif // LOCATIONSEARCHPANEL_H