/***************************************************************************
 *   Copyright (c) 2009  Peter Mylemans <peter.mylemans@gmail.com>         *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
 ***************************************************************************/

#ifndef MOVIE_H
#define MOVIE_H

#include "ContextModel.h"
#include <QPixmap>
#include <QSet>
#include <QList>

class Movie : public ContextModel
{
public:
    Movie();

    virtual const QString modelId() const;

    const QString& title() const;
    void setTitle(const QString &title);

    const QString& tagline() const;
    void setTagline(const QString &tagline);

    quint16 year() const;
    void setYear(quint16 year);

    const QString& plot() const;
    void setPlot(const QString &plot);

    const QPixmap& poster() const;
    void setPoster(const QPixmap &poster);

    enum Genre
    {
        Action,
        Fantasy,
        Sci_Fi,
        Thriller
    };
        
    const QSet<Genre>& genres() const;
    void setGenres(const QSet<Genre> &genres);
    static QString genreString(Genre genre);

    int runtime() const;
    void setRuntime(int runtime);

    int rating() const;
    void setRating(int rating);

    struct ActorRole
    {
        QString actor;
        QString role;
    };

    const QList<ActorRole>& actors() const;
    void addActor(const ActorRole &actorRole);

private:
    QString             m_title;
    QString             m_tagline;
    quint16             m_year;
    QString             m_plot;
    QPixmap             m_poster;
    QSet<Genre>         m_genres;
    int                 m_runtime;
    int                 m_rating;
    QList<ActorRole>    m_actors;
};

#endif
 
