Copyright (C) 2010 Ixonos Plc. Authors:
Jussi Laitinen - jussi.laitinen@ixonos.com
+ Sami Rämö - sami.ramo@ixonos.com
Situare is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
#include <QtGui>
+#include "panelbase.h"
+
class ExtendedListItemDelegate;
class GeoCoordinate;
-class LocationListView;
-class Location;
+class ImageButton;
class Route;
class RouteWaypointListView;
/**
- * @brief Class for sliding routing panel
+ * @brief Routing panel
*
* @author Jussi Laitinen - jussi.laitinen (at) ixonos.com
+ * @author Sami Rämö - sami.ramo (at) ixonos.com
*/
-class RoutingPanel : public QWidget
+class RoutingPanel : public PanelBase
{
Q_OBJECT
private slots:
/**
* @brief Clears lists' selections.
- *
- * Does call setRouteButtonDisabled().
*/
void clearListsSelections();
/**
- * @brief Populates location list view.
- *
- * @param locations list of Location objects
- */
- void populateLocationListView(const QList<Location> &locations);
-
- /**
- * @brief Routes to selected location.
- *
- * Emits routeToLocation if location is selected from list.
+ * @brief Handler for clear route button clicks
*/
- void routeToSelectedLocation();
+ void clearRouteButtonClicked();
/**
* @brief Sets route to the panel.
*
* Appends route waypoint list with route segments.
+ *
* @param route Route item containing parsed route details
*/
void setRoute(Route &route);
- /**
- * @brief Sets route button disabled.
- *
- * Disabled if there isn't any list item selected.
- */
- void setRouteButtonDisabled();
-
/*******************************************************************************
* SIGNALS
******************************************************************************/
signals:
/**
- * @brief Signal for location item clicked.
- *
- * @param swBound south-west bound GeoCoordinate
- * @param neBound north-east bound GeoCoordinate
+ * @brief Emitted when route is cleared
*/
- void locationItemClicked(const GeoCoordinate &swBound, const GeoCoordinate &neBound);
+ void clearRoute();
/**
- * @brief Signal for requesting searching location.
+ * @brief Request routing to current cursor position
*/
- void requestSearchLocation();
-
- /**
- * @brief Signal for routing to location.
- *
- * @param coordinates location's geo coordinates
- */
- void routeToLocation(const GeoCoordinate &coordinates);
+ void routeToCursor();
/**
* @brief Signal for route waypoint item clicked.
* DATA MEMBERS
******************************************************************************/
private:
- QLabel *m_locationListLabel; ///< Location list label
-
- QPushButton *m_routeButton; ///< Route to location button
- QPushButton *m_searchLocationButton; ///< Search location button
-
- QWidget *m_locationListHeaderWidget; ///< Location list header widget
+ QLabel *m_resultsLabel; ///< Location list label
- LocationListView *m_locationListView; ///< Location list view
- RouteWaypointListView *m_routeWaypointListView; ///< Route waypoint list view
+ ImageButton *m_clearRouteButton; ///< Search location button
+ RouteWaypointListView *m_routeWaypointListView; ///< Route instructions list view
};
#endif // ROUTINGPANEL_H