New ui for adding new saved locations. Also many small fixes and
[ptas] / zouba / src / gui / searchdisplay.h
1 #ifndef SEARCHDISPLAY_H
2 #define SEARCHDISPLAY_H
3
4 #include <QMainWindow>
5 #include <QLineEdit>
6
7 #include "routeresultwidget.h"
8 #include "locationsdisplaywidget.h"
9 #include "favoriteselectiondialog.h"
10
11 #include "src/logic/routefinder.h"
12
13
14 namespace Ui {
15     class SearchDisplay;
16 }
17
18 class SearchDisplay : public QMainWindow
19 {
20     Q_OBJECT
21
22 public:
23     explicit SearchDisplay(QWidget *parent = 0);
24     ~SearchDisplay();
25
26 public slots:
27     void locations_changed();
28
29 private slots:
30     void on_dest_favorites_clicked();
31     void on_from_favorites_clicked();
32     void on_dest_combo_currentIndexChanged(QString );
33     void on_from_combo_currentIndexChanged(QString );
34     void on_searchButton_clicked();
35
36     void route_finder_finished();
37     void customize_requested();
38     void gps_status_change_requested(bool status);
39
40 private:
41     void setEditText(QLineEdit*, QString&);
42     void updateLocationLists();
43
44     Ui::SearchDisplay *ui;
45     RouteFinder *route_finder;
46     QMutex one_search;
47     bool search_restarted;
48     LocationsDisplayWidget *edit_window;
49
50 #ifdef Q_WS_MAEMO_5
51 private slots:
52     void from_selection_selected(Location*);
53     void dest_selection_selected(Location*);
54 private:
55     Location *from_selected;
56     Location *dest_selected;
57 #else
58 private slots:
59     void tabclosed(int index);
60 private:
61     QTabWidget *tabs;
62 #endif
63 };
64
65
66 #endif // SEARCHDISPLAY_H