1 // Copyright 2010 Jochen Becher
3 // This file is part of MovieSchedule.
5 // MovieSchedule is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
10 // MovieSchedule is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with MovieSchedule. If not, see <http://www.gnu.org/licenses/>.
18 #ifndef LOCATIONDIALOG_H
19 #define LOCATIONDIALOG_H
21 #include "data/location.h"
33 class LocationDialog : public QDialog {
37 typedef QList<Location> Locations;
40 explicit LocationDialog(QWidget *parent = 0);
43 void SetLocation(const Location &location);
45 void SetPreviousLocations(const Locations &);
47 void SetGPSEnabled(bool gps_enabled);
52 Q_SIGNAL void Search(Location location);
53 Q_SIGNAL void SearchPreviousLocation(Location location);
54 Q_SIGNAL void SearchGPS();
55 Q_SIGNAL void Cancel();
58 Q_SLOT void SearchClicked();
59 Q_SLOT void GPSClicked();
60 Q_SLOT void PreviousLocation1Clicked();
61 Q_SLOT void PreviousLocation2Clicked();
62 Q_SLOT void PreviousLocation3Clicked();
63 Q_SLOT void PreviousLocation4Clicked();
64 Q_SLOT void PreviousLocation5Clicked();
67 void PreviousLocationClicked(int i);
70 void changeEvent(QEvent *e);
73 Ui::LocationDialog *ui;
74 Locations _previous_locations;
75 QVector<QPushButton *> _location_buttons;
78 #endif // LOCATIONDIALOG_H