diff options
author | Arno <am@disconnect.de> | 2014-12-07 12:40:35 +0100 |
---|---|---|
committer | Arno <am@disconnect.de> | 2014-12-07 12:40:35 +0100 |
commit | 51bc87ebc73b5777ad36e35ec20445b07a0d7639 (patch) | |
tree | 71b7b02041a5a728cf7dc2b62892328d3bd2d907 /newmoviewizard.h | |
parent | bd3716dcab86c7d3e018004a1f26b470a7f6cfb7 (diff) | |
download | SheMov-51bc87ebc73b5777ad36e35ec20445b07a0d7639.tar.gz SheMov-51bc87ebc73b5777ad36e35ec20445b07a0d7639.tar.bz2 SheMov-51bc87ebc73b5777ad36e35ec20445b07a0d7639.zip |
Redesign of NewMovieWizard
Make it possible to add parent files to files, so we can identify
already downloaded files even if we reencoded them. Record the md5sum in
a new table files_origin.
Diffstat (limited to 'newmoviewizard.h')
-rw-r--r-- | newmoviewizard.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/newmoviewizard.h b/newmoviewizard.h index 20c0b89..b198267 100644 --- a/newmoviewizard.h +++ b/newmoviewizard.h @@ -18,6 +18,7 @@ class QSpinBox; class QComboBox; class QCheckBox; class QPlainTextEdit; +class QSortFilterProxyModel; class SeriesMetadataModel; class WizardTreeModel; class MovieInfoPage; @@ -60,6 +61,7 @@ class MovieInfoPage : public QWizardPage { void initCompleters(); private slots: + void addOld(); void addFiles(); void removeFile(); @@ -70,6 +72,7 @@ class MovieInfoPage : public QWizardPage { QLineEdit *mSubtitle; QSpinBox *mSeriesNo; QSpinBox *mQuality; + QPushButton *mAddOld; QPushButton *mAddFile; QPushButton *mRemoveFile; WizardTreeModel *mFileModel; @@ -77,6 +80,7 @@ class MovieInfoPage : public QWizardPage { SmTreeItem *mCoversItem; QCompleter *mSeriesCompleter; QStringListModel *mSeriesCompleterModel; + QSortFilterProxyModel *mProxy; }; class MovieMappingPage : public QWizardPage { @@ -99,9 +103,6 @@ class MovieMetadataPage : public QWizardPage { MetadataEditorWidget *widget() { return mWidget; } virtual void initializePage(); - private slots: - void toggleMetadata(int state); - private: void setupGui(); /* defined in archiveview.h */ @@ -115,14 +116,14 @@ class WizardTreeModel : public SmTreeModel { 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 { NumFields = 5 }; - enum Types { Movie = 1, FrontCover = 2, BackCover = 3, GeneralCover = 4 }; + enum Types { Movie = 1, FrontCover = 2, BackCover = 3, GeneralCover = 4, Origin = 5 }; explicit WizardTreeModel(QStringList &headers, QObject *parent = 0); //data + flags virtual QVariant data(const QModelIndex &index, int role) const; virtual bool setData(const QModelIndex &index, const QVariant &value, int role); virtual Qt::ItemFlags flags(const QModelIndex &index) const; - QList<QVariant> fileData(int row) const; + QList<QVariant> fileData(const QModelIndex &idx) const; void clear(); private: |