1 #ifndef ADDRESSDIALOG_H
2 #define ADDRESSDIALOG_H
13 class QListWidgetItem;
16 * - Name and andress text input fields in a form layout on the left
17 * - Name text input field not enabled if editing an existing location
18 * - Buttons on the right
20 * - Enabled if search once and no typing has been done to address
22 * - Searches for the address in the address text input field
24 class AddressDialog : public QDialog
28 explicit AddressDialog(QWidget *parent = 0, const Location *location = 0);
34 void searchFinished();
35 void locationSelected(Location* location);
40 void typedInAddress();
45 QPushButton *m_addButton;
47 QNetworkReply *m_reply;
49 QList<Location*> m_places;
50 QList<Location*> m_roadNames;
51 QList<Location*> m_stops;
59 * - One list of found locations
60 * - Clicking one selects the location
61 * - If the clicked one is disabled, nothing happens (clicked signal might not be enabled so this needs to implemented only if selecting a heading line emits clicked signal
62 * - When selected emits locationSelected(Location *location) signal with the selected locations copy.
63 * - When selected calls close
65 class AddressDialogSelection : public QDialog
69 explicit AddressDialogSelection(const QList<Location*> &places, const QList<Location*> &roads, const QList<Location*> &stops, QWidget *parent = 0);
72 void locationSelected(Location* location);
75 void itemSelected(QListWidgetItem *item);
78 const QList<Location*>& m_places;
79 const QList<Location*>& m_roads;
80 const QList<Location*>& m_stops;
83 #endif // ADDRESSDIALOGNEW_H