X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=src%2Fui%2Froutingpanel.h;h=1f4d8cd1d33995d8e22f061b9f2f87f831fe6777;hb=4e24baa5a6731fefacb54c4b4a7adae5846f8a7f;hp=73cb03fec78f34bfb9c305bf07248e736a8c2214;hpb=fdca8886c6d6599cf83f7381dc4fb8c7a8665ab4;p=situare diff --git a/src/ui/routingpanel.h b/src/ui/routingpanel.h index 73cb03f..1f4d8cd 100644 --- a/src/ui/routingpanel.h +++ b/src/ui/routingpanel.h @@ -3,6 +3,7 @@ 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 @@ -24,17 +25,21 @@ #include +#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 @@ -47,33 +52,74 @@ public: RoutingPanel(QWidget *parent = 0); /******************************************************************************* + * BASE CLASS INHERITED AND REIMPLEMENTED MEMBER FUNCTIONS + ******************************************************************************/ +protected: + /** + * @brief Re-implemented from QWidget::hideEvent() + * + * Calls clearListsSelections() + * + * @param event + */ + void hideEvent(QHideEvent *event); + +/******************************************************************************* * MEMBER FUNCTIONS AND SLOTS ******************************************************************************/ private slots: /** - * @brief Populates location list view. + * @brief Clears lists' selections. + */ + void clearListsSelections(); + + void clearRouteButtonClicked(); + + /** + * @brief Sets route to the panel. * - * @param result list of Location objects + * Appends route waypoint list with route segments. + * + * @param route Route item containing parsed route details */ - void populateLocationListView(QList &locations); + void setRoute(Route &route); /******************************************************************************* * SIGNALS ******************************************************************************/ signals: /** - * @brief Signal for location item clicked. + * @brief Emitted when route is cleared + */ + void clearRoute(); + + /** + * @brief Request routing to current cursor position + */ + void routeToCursor(); + + /** + * @brief Signal for route waypoint item clicked. * - * @param swBound south-west bound GeoCoordinate - * @param neBound north-east bound GeoCoordinate + * @param coordinate waypoint item's coordinate */ - void locationItemClicked(GeoCoordinate &swBound, GeoCoordinate &neBound); + void routeWaypointItemClicked(const GeoCoordinate &coordinate); + + /** + * @brief Signal for requesting a panel to be opened + * + * @param widget Pointer to the widget that emitted the signal + */ + void showPanelRequested(QWidget *widget); /******************************************************************************* * DATA MEMBERS ******************************************************************************/ private: - LocationListView *m_locationListView; ///< Location list view + QLabel *m_resultsLabel; ///< Location list label + + ImageButton *m_clearRouteButton; ///< Search location button + RouteWaypointListView *m_routeWaypointListView; ///< Route instructions list view }; #endif // ROUTINGPANEL_H