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. --- newmoviewizard.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'newmoviewizard.h') diff --git a/newmoviewizard.h b/newmoviewizard.h index 7c671cd..d79531f 100644 --- a/newmoviewizard.h +++ b/newmoviewizard.h @@ -41,6 +41,7 @@ class MovieInfoPage : public QWizardPage { public: explicit MovieInfoPage(QWidget *parent = 0); WizardTreeModel *model() { return mFileModel; } + virtual void initializePage(); private slots: void addFiles(); @@ -48,6 +49,7 @@ class MovieInfoPage : public QWizardPage { void onDvd(int); void typeChanged(QString); void setNextDvdNo(); + void initModel(); private: QTreeView *mFileView; @@ -71,6 +73,7 @@ class MovieMappingPage : public QWizardPage { public: explicit MovieMappingPage(const QString &table, QWidget *parent = 0); MappingTableItemModel *model() { return mWidget->model(); } + virtual void initializePage(); private: MappingTableWidget *mWidget; -- cgit v1.2.3-70-g09d2