Fixed searchclients to handle new Google URLs correctly; added GUI
[movie-schedule] / src / ui / moviewindow.h
1 // Copyright 2010 Jochen Becher
2 //
3 // This file is part of MovieSchedule.
4 //
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.
9 //
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.
14 //
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/>.
17
18 #ifndef MOVIEWINDOW_H
19 #define MOVIEWINDOW_H
20
21 #include "abstractmainwindow.h"
22 #include "data/scheduleentrykey.h"
23
24 #include <QModelIndex>
25
26 class CinemaSchedule;
27 class QAbstractItemModel;
28
29 namespace Ui {
30     class MovieWindow;
31 }
32
33 class MovieWindow : public AbstractMainWindow {
34     Q_OBJECT
35 public:
36     explicit MovieWindow(CinemaSchedule *cinema_schedule, QWidget *parent = 0);
37     ~MovieWindow();
38
39 public:
40     Q_SLOT void SetMovieName(QString movie_name);
41     Q_SLOT void SetMovieScheduleModel(QAbstractItemModel *movie_schedule_model);
42     Q_SLOT void SetError(QString error_text);
43
44     bool IsIdle();
45
46 public:
47     Q_SIGNAL void ScheduleEntrySelected(ScheduleEntryKey);
48
49 protected:
50     void changeEvent(QEvent *e);
51
52 private:
53     Q_SLOT void ScheduleEntrySelected(QModelIndex);
54
55 private:
56     Ui::MovieWindow *ui;
57     CinemaSchedule *_cinema_schedule;
58     QAbstractItemModel *_movie_schedule_model;
59 };
60
61 #endif // MOVIEWINDOW_H