summaryrefslogtreecommitdiffstats
path: root/newmoviewizard.h
diff options
context:
space:
mode:
Diffstat (limited to 'newmoviewizard.h')
-rw-r--r--newmoviewizard.h43
1 files changed, 14 insertions, 29 deletions
diff --git a/newmoviewizard.h b/newmoviewizard.h
index ecc416a..b793ea0 100644
--- a/newmoviewizard.h
+++ b/newmoviewizard.h
@@ -8,7 +8,8 @@
#ifndef NEWMOVIEWIZARD_H
#define NEWMOVIEWIZARD_H
-#include <QtWidgets/QWizardPage>
+#include <QWizardPage>
+#include <QStyledItemDelegate>
#include "smtreemodel.h"
#include "mappingtablewidget.h"
@@ -23,6 +24,8 @@ class MovieInfoPage;
class MovieMappingPage;
class MovieMetadataPage;
class PictureViewer2;
+class QCompleter;
+class QStringListModel;
class NewMovieWizard : public QWizard {
Q_OBJECT
@@ -36,11 +39,7 @@ class NewMovieWizard : public QWizard {
protected:
void showEvent(QShowEvent *);
- signals:
- void seriesAdded(const QString series, int seriesPart);
-
private:
- void doMetadata(const QModelIndex &idx);
MovieInfoPage *mInfoPage;
MovieMappingPage *mActorPage;
MovieMappingPage *mGenrePage;
@@ -56,17 +55,12 @@ class MovieInfoPage : public QWizardPage {
virtual void initializePage();
void addFile(const QString &file);
+ public slots:
+ void initCompleters();
+
private slots:
void addFiles();
void removeFile();
- void onDvd(int);
- void typeChanged(QString);
- void seriesPartChanged(int);
- void setNextDvdNo();
- void initModel();
- void fileSelectionChanged(const QModelIndex &current, const QModelIndex &previous);
- void itemClicked(const QModelIndex &index);
- void hasPartnoStateChanged(int state);
private:
void setupGui();
@@ -74,20 +68,14 @@ class MovieInfoPage : public QWizardPage {
QLineEdit *mTitle;
QLineEdit *mSubtitle;
QSpinBox *mSeriesNo;
- QSpinBox *mPartno;
QSpinBox *mQuality;
- QSpinBox *mDvdNo;
QPushButton *mAddFile;
QPushButton *mRemoveFile;
- QComboBox *mFileType;
- QCheckBox *mOnDvd;
- QCheckBox *mHasPartno;
- QCheckBox *mUsePicViewer;
- QPushButton *mNextDvdNo;
WizardTreeModel *mFileModel;
SmTreeItem *mMoviesItem;
SmTreeItem *mCoversItem;
- PictureViewer2 *mPicViewer;
+ QCompleter *mSeriesCompleter;
+ QStringListModel *mSeriesCompleterModel;
};
class MovieMappingPage : public QWizardPage {
@@ -136,23 +124,20 @@ class WizardTreeModel : public SmTreeModel {
public:
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 };
explicit WizardTreeModel(QStringList &headers, QObject *parent = 0);
virtual ~WizardTreeModel() {}
//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;
- QHash<QString, int> files();
- int filesPart(const QString &fullPath) const;
-
- //file types
- QStringList types() const;
- int typeId(const QString &value) const;
- QString typeName(int typeId) const;
+ QList<QVariant> fileData(int column) const;
+ void clear();
private:
- QHash<int, QString> mFileTypeMap;
+ QHash<int, QString> mFiletypeMap;
QHash<QString, int> mFilePartMap;
};