diff options
author | am <am@f440f766-f032-0410-8965-dc7d17de2ca0> | 2009-07-04 14:42:16 +0000 |
---|---|---|
committer | am <am@f440f766-f032-0410-8965-dc7d17de2ca0> | 2009-07-04 14:42:16 +0000 |
commit | 2b2b3b79bf8b2d9be52a6058e3af03bf314bd9db (patch) | |
tree | 108261a66ec40e88b1b04fe963379037f75e7b2b /moviemodel.h | |
parent | 9a43a9abb164583656e36a87b6ccf3b7f5ba48e2 (diff) | |
download | SheMov-2b2b3b79bf8b2d9be52a6058e3af03bf314bd9db.tar.gz SheMov-2b2b3b79bf8b2d9be52a6058e3af03bf314bd9db.tar.bz2 SheMov-2b2b3b79bf8b2d9be52a6058e3af03bf314bd9db.zip |
-finished model, I think
-started gui
git-svn-id: file:///var/svn/repos2/shemov/trunk@376 f440f766-f032-0410-8965-dc7d17de2ca0
Diffstat (limited to 'moviemodel.h')
-rw-r--r-- | moviemodel.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/moviemodel.h b/moviemodel.h index acfa8fa..2f3587a 100644 --- a/moviemodel.h +++ b/moviemodel.h @@ -32,15 +32,20 @@ class MovieModel : public QAbstractItemModel { QVariant headerData(int section, Qt::Orientation o, int role) const; bool insertRows(int row, int count, const QModelIndex &); bool removeRows(int row, int count, const QModelIndex &); - bool setDataAt(const QModelIndex &index, const QList<QVariant> &data, const QList<QVariant> &actors, const QList<CoverItem> &covers); + bool setRow(const QModelIndex &idx, const QList<QVariant> &data, const QList<QVariant> &actors, const QList<CoverItem> &covers); + bool setDataAt(const QModelIndex &idx, const QVariant &data); void setActors(int id, const QList<QVariant> &actors); void setCovers(int id, const QList<CoverItem> &covers); + void addMovie(const QList<QVariant> &data, const QList<QVariant> &actors, const QList<CoverItem> &covers); + void removeMovie(const QModelIndex &idx); private: void populate(); QList<MovieItem*> mItems; QList<QVariant> mHeaders; + QList<QSqlQuery*> mColumnQueries; QSqlQuery *mInsertQuery; + QSqlQuery *mDeleteQuery; QSqlQuery *mDeleteActorsForMovie; QSqlQuery *mInsertActorsForMovie; QSqlQuery *mDeleteCovers; |