From 40cedb64e32383f488000f89c2084c2bda98310f Mon Sep 17 00:00:00 2001 From: Arno Date: Sat, 7 Aug 2010 19:57:16 +0200 Subject: Bugfix in NewMovieWizard Make Part no work in NewMovieWizard. The logic for this was totally borked. Well, it was not really present. One could only assign one Part number to all files. --- newmoviewizard.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'newmoviewizard.h') diff --git a/newmoviewizard.h b/newmoviewizard.h index d79531f..88667b9 100644 --- a/newmoviewizard.h +++ b/newmoviewizard.h @@ -48,6 +48,7 @@ class MovieInfoPage : public QWizardPage { void removeFile(); void onDvd(int); void typeChanged(QString); + void seriesPartChanged(int); void setNextDvdNo(); void initModel(); @@ -82,8 +83,8 @@ class MovieMappingPage : public QWizardPage { class WizardTreeModel : public SmTreeModel { Q_OBJECT public: - enum CustomRoles { FileNameRole = Qt::UserRole + 1, FileSizeRole = Qt::UserRole + 2, FileTypeRole = Qt::UserRole + 3, FullPathRole = Qt::UserRole + 4 }; - enum Fields { FileName = 0, FileSize = 1, FileType = 2, FullPath = 3 }; + enum CustomRoles { FileNameRole = Qt::UserRole + 1, FileSizeRole = Qt::UserRole + 2, FileTypeRole = Qt::UserRole + 3, FilePartRole = Qt::UserRole + 4, FullPathRole = Qt::UserRole + 5 }; + enum Fields { FileName = 0, FileSize = 1, FileType = 2, FilePart = 3, FullPath = 4 }; enum Types { Movie = 1, FrontCover = 2, BackCover = 3, GeneralCover = 4 }; explicit WizardTreeModel(QStringList &headers, QObject *parent = 0); virtual ~WizardTreeModel() {} @@ -91,7 +92,8 @@ class WizardTreeModel : public SmTreeModel { //data + flags virtual QVariant data(const QModelIndex &index, int role) const; virtual Qt::ItemFlags flags(const QModelIndex &index) const; - QHash files() const; + QHash files(); + int filesPart(const QString &fullPath) const; //file types QStringList types() const; @@ -99,7 +101,7 @@ class WizardTreeModel : public SmTreeModel { private: QHash mFileTypeMap; - + QHash mFilePartMap; }; #endif -- cgit v1.2.3-70-g09d2