diff options
author | Arno <am@disconnect.de> | 2010-05-22 16:53:14 +0200 |
---|---|---|
committer | Arno <am@disconnect.de> | 2010-05-22 16:53:14 +0200 |
commit | 1ec8aa7048416a3267ee3ff654d078739644296c (patch) | |
tree | 8b36d12eaf8c244fca1c7afc83606a61a29bf111 /archiveviewwidget.cpp | |
parent | 4ec6696968f7536e067e3a728ffdb423f985ef5a (diff) | |
download | SheMov-1ec8aa7048416a3267ee3ff654d078739644296c.tar.gz SheMov-1ec8aa7048416a3267ee3ff654d078739644296c.tar.bz2 SheMov-1ec8aa7048416a3267ee3ff654d078739644296c.zip |
Use singletons for models
Created singletons for the ListModel* and MovieModel*. There should only
be one of each and they were passed around quite a lot.
Diffstat (limited to 'archiveviewwidget.cpp')
-rw-r--r-- | archiveviewwidget.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/archiveviewwidget.cpp b/archiveviewwidget.cpp index 42532c5..59ec354 100644 --- a/archiveviewwidget.cpp +++ b/archiveviewwidget.cpp @@ -32,6 +32,7 @@ #include "textenterdialog.h" #include "helper.h" #include "moviepropertiesdialog.h" +#include "addmoviewizard.h" ArchiveViewWidget::ArchiveViewWidget(MovieModel *model, ListModel *genre, ListModel *actors, QWidget *parent) : QWidget(parent), mMovieModel(model), mGenreModel(genre), mActorsModel(actors), mSize(0){ //filter bar @@ -110,7 +111,9 @@ void ArchiveViewWidget::editCovers(){ } void ArchiveViewWidget::addMovie(){ - TextEnterDialog dlg(tr("Enter movie title"), this); + AddMovieWizard wiz(this); + wiz.exec(); + /*TextEnterDialog dlg(tr("Enter movie title"), this); dlg.exec(); QString title; if(dlg.result() == QDialog::Accepted){ @@ -147,7 +150,7 @@ void ArchiveViewWidget::addMovie(){ movieData[MovieItem::Quality] = 0; movieData[MovieItem::SeriesNo] = seriesno; movieData[MovieItem::PartNo] = -1; - mMovieModel->addMovie(movieData, QList<QVariant>(), QList<CoverItem>()); + mMovieModel->addMovie(movieData, QList<QVariant>(), QList<CoverItem>());*/ } void ArchiveViewWidget::showMovie(const QModelIndex &movie){ |