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 LOCATIONCONTROLLER_H
19 #define LOCATIONCONTROLLER_H
21 #include "data/location.h"
28 class LocationController : public QObject
32 explicit LocationController(MainWindow *main_window, Settings *settings);
35 Q_SLOT void OpenLocationDialog();
37 void CancelAllGpsSearchs();
40 Q_SIGNAL void Search(Location location);
43 Q_SLOT void SearchLocationFromCityDatabase(Location location);
44 Q_SLOT void SearchLocation(Location location);
45 Q_SLOT void SearchGPS();
46 Q_SLOT void CancelLocation();
47 Location CleanLocation(const Location &location);
48 void RememberLocation(const Location &location);
50 Q_SLOT void GpsSearchStarted(int search_task_id);
51 Q_SLOT void GpsPositionUpdate(int search_task_id);
52 Q_SLOT void GpsSearchForTownStarted(int search_task_id);
53 Q_SLOT void GpsTownUpdate(int search_task_id, QString town);
54 Q_SLOT void GpsSearchError(int search_task_id);
55 Q_SLOT void GpsSearchFinished(int search_task_id, bool success);
58 MainWindow *_main_window;
60 int _active_search_task_id;
63 #endif // LOCATIONCONTROLLER_H