From 3c86ae36f5048929ed43e1d49060d45e927953e8 Mon Sep 17 00:00:00 2001 From: Arno Date: Sat, 11 Sep 2010 18:28:48 +0200 Subject: Fix oddities in NewMovieWizard Well, this one should have been easy, but there's always a way to make things complicated. Select proper entries for mPartno and mFileType in NewMovieWizard. Note to self: never ever forget about QObject::blockSignals(bool) again. This is way easier than fiddling around with boolean logic... --- newmoviewizard.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'newmoviewizard.h') diff --git a/newmoviewizard.h b/newmoviewizard.h index 88667b9..9f476ed 100644 --- a/newmoviewizard.h +++ b/newmoviewizard.h @@ -51,6 +51,7 @@ class MovieInfoPage : public QWizardPage { void seriesPartChanged(int); void setNextDvdNo(); void initModel(); + void fileSelectionChanged(const QModelIndex ¤t, const QModelIndex &previous); private: QTreeView *mFileView; @@ -83,7 +84,7 @@ 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, FilePartRole = Qt::UserRole + 4, FullPathRole = Qt::UserRole + 5 }; + 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); @@ -98,6 +99,7 @@ class WizardTreeModel : public SmTreeModel { //file types QStringList types() const; int typeId(const QString &value) const; + QString typeName(int typeId) const; private: QHash mFileTypeMap; -- cgit v1.2.3-70-g09d2