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 SCHEDULEENTRYKEY_H
19 #define SCHEDULEENTRYKEY_H
21 #include "data/cinemakey.h"
22 #include "data/moviekey.h"
28 class ScheduleEntryKey
32 ScheduleEntryKey(const CinemaKey &cinema_key, const MovieKey &movie_key, const QTime &start_time, const QDate &date);
34 CinemaKey GetCinemaKey() const { return _cinema_key; }
35 void SetCinemaKey(const CinemaKey &cinema_key) { _cinema_key = cinema_key; }
37 MovieKey GetMovieKey() const { return _movie_key; }
38 void SetMovieKey(const MovieKey &movie_key) { _movie_key = movie_key; }
40 QTime GetStartTime() const { return _start_time; }
41 void SetStartTime(const QTime &start_time) { _start_time = start_time; }
43 QDate GetDate() const { return _date; }
44 void SetDate(const QDate &date) { _date = date; }
47 CinemaKey _cinema_key;
53 Q_DECLARE_METATYPE(ScheduleEntryKey);
55 bool operator==(const ScheduleEntryKey &lhs, const ScheduleEntryKey &rhs);
57 uint qHash(const ScheduleEntryKey &);
59 #endif // SCHEDULEENTRYKEY_H