From ff8fdb92b8c2dfaa4818150d75c32fc303b438cb Mon Sep 17 00:00:00 2001 From: Arno Date: Wed, 28 Jul 2010 22:21:38 +0200 Subject: Reset NewMovieWizard Well, the point of this commit was to have one NewMovieWizard in memory all the time and just show it when it's needed. For this several things were necessary: 1. implement initializePage() for every QWizardPage. For this I had to implement reset functions in some models. 2. setOption(QWizard::IndependentPages, true) in Wizard constructor. 3. Make NewMovieWizard a member of SheMov... Well, it was, already, but I didn't remove the ptr. The good news: the Wizard works. Bad News: 1. Program crashes in ArchiveViewWizard::currentChanged (see TODOS) 2. Cover files also have a quality Attribute attached. --- shemov.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'shemov.cpp') diff --git a/shemov.cpp b/shemov.cpp index 03b9271..6c443de 100644 --- a/shemov.cpp +++ b/shemov.cpp @@ -61,6 +61,10 @@ SheMov::SheMov(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, fla connect(mATree->filesWidget()->filesTree()->selectionModel(), SIGNAL(selectionChanged(const QItemSelection &, const QItemSelection &)), this, SLOT(updateSelectionCount(const QItemSelection &, const QItemSelection &))); connect(mATree->seriesWidget()->seriesTree()->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), this, SLOT(updateSelectionCount(QItemSelection,QItemSelection))); + //newmoviewizard + mNewMovieWizard = new NewMovieWizard(this); + connect(mNewMovieWizard, SIGNAL(seriesAdded(QString,int)), mATree->seriesWidget(), SLOT(seriesAdded(QString,int))); + QVBoxLayout *mainLayout = new QVBoxLayout; mainLayout->addWidget(mTab); @@ -207,8 +211,8 @@ void SheMov::showStatistics(){ } void SheMov::newMovieWizard(){ - NewMovieWizard wiz(this); - wiz.exec(); + mNewMovieWizard->restart(); + mNewMovieWizard->show(); } void SheMov::setSize(qint64 size){ -- cgit v1.2.3-70-g09d2