Initial Commit
[uktrainplanner] / src / stationchooser.h
1 #ifndef STATIONCHOOSER_H
2 #define STATIONCHOOSER_H
3
4 #include <QDialog>
5 #include <QFile>
6 #include <QTextStream>
7 #include <QSettings>
8
9 namespace Ui {
10     class StationChooser;
11 }
12
13 class StationChooser : public QDialog
14 {
15     Q_OBJECT
16 public:
17     StationChooser(QWidget *parent = 0);
18     ~StationChooser();
19
20     void accept();
21     QString getChoice() { return choice; }
22     QString getChoiceCRS() { return choiceCRS; }
23
24     int exec();
25
26     static QStringList names;
27     static QStringList codes;
28
29     static void loadStations();
30
31 public slots:
32     void typing(QString);
33
34 protected:
35     void changeEvent(QEvent *e);
36
37 private:
38     Ui::StationChooser *ui;
39     QString choice;
40     QString choiceCRS;
41     void reset();
42     QSettings settings;
43 };
44
45 #endif // STATIONCHOOSER_H