diff options
author | am <am@f440f766-f032-0410-8965-dc7d17de2ca0> | 2009-07-20 17:37:08 +0000 |
---|---|---|
committer | am <am@f440f766-f032-0410-8965-dc7d17de2ca0> | 2009-07-20 17:37:08 +0000 |
commit | ec3418479b28ca8e162f84d76c2eed78c27a114c (patch) | |
tree | a947550fc9821999baf728dbf33adef71fa67576 /moviemodel.cpp | |
parent | d2b854121266e32164290ee4e683c0c8388d7d41 (diff) | |
download | SheMov-ec3418479b28ca8e162f84d76c2eed78c27a114c.tar.gz SheMov-ec3418479b28ca8e162f84d76c2eed78c27a114c.tar.bz2 SheMov-ec3418479b28ca8e162f84d76c2eed78c27a114c.zip |
-started on editing the archive
-big probs with the covers, I'll stop for now, can't think straight any more
-changes to MovieModel
-changes to MovieItem
-modified CoverEditor to allow adding files (untested)
git-svn-id: file:///var/svn/repos2/shemov/trunk@392 f440f766-f032-0410-8965-dc7d17de2ca0
Diffstat (limited to 'moviemodel.cpp')
-rw-r--r-- | moviemodel.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/moviemodel.cpp b/moviemodel.cpp index 389f456..d34113a 100644 --- a/moviemodel.cpp +++ b/moviemodel.cpp @@ -86,6 +86,15 @@ QVariant MovieModel::data(const QModelIndex &index, int role) const{ if(role == ActorsRole){ return item->actors(); } + if(role == ActorsMap){ + return QVariant(item->actorMap()); + } + if(role == CoverRole){ + return item->covers(); + } + if(role == IdRole){ + return item->id(); + } if((role == Qt::DecorationRole) && (index.column() == 0)){ return QIcon(":/dildo.png"); } @@ -196,6 +205,11 @@ void MovieModel::setActors(int id, const QList<QVariant> &actors){ mInsertActorsForMovie->bindValue(":actorid", a); mInsertActorsForMovie->exec(); } + foreach(MovieItem *m, mItems){ + if(m->id() == id){ + m->setActors(); + } + } } void MovieModel::setCovers(int id, const QList<CoverItem> &covers){ @@ -208,6 +222,11 @@ void MovieModel::setCovers(int id, const QList<CoverItem> &covers){ mInsertCovers->bindValue(":md5", c.md5()); mInsertCovers->exec(); } + foreach(MovieItem *m, mItems){ + if(m->id() == id){ + m->setCovers(); + } + } } void MovieModel::addMovie(const QList<QVariant> &data, const QList<QVariant> &actors, const QList<CoverItem> &covers){ |