Initial Commit
[uktrainplanner] / src / favouritestations.h
1 #ifndef FAVOURITESTATIONS_H
2 #define FAVOURITESTATIONS_H
3
4 #include <QDialog>
5 #include <QSettings>
6 #include <src/stationchooser.h>
7
8 namespace Ui {
9     class FavouriteStations;
10 }
11
12 class FavouriteStations : public QDialog {
13     Q_OBJECT
14 public:
15     FavouriteStations(QWidget *parent = 0);
16     ~FavouriteStations();
17
18     int exec(QString names, QString codes);
19
20 public slots:
21     void addFavourite(); //When the user clicks the button to add a new favourite station
22     void deleteFavourite(); //When the user clicks the delete button
23
24     void accept();
25     void reject();
26
27 protected:
28     void changeEvent(QEvent *e);
29
30 private:
31     Ui::FavouriteStations *ui;
32     QSettings settings;
33
34     QString names; //The QSettings key for the favourite station names
35     QString codes; //The QSettings key for the favourite station CRS codes
36
37     void save();
38 };
39
40 #endif // FAVOURITESTATIONS_H