From 349fab04ee6b4864a5cc0b103196d8e49e359889 Mon Sep 17 00:00:00 2001 From: Arno Date: Sat, 3 Nov 2018 08:44:27 +0100 Subject: Put MovieInfoPage into separate file Lots of code shuffle and headers cleanup, but no functional changes. --- movieinfopage.h | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 movieinfopage.h (limited to 'movieinfopage.h') diff --git a/movieinfopage.h b/movieinfopage.h new file mode 100644 index 0000000..87f5376 --- /dev/null +++ b/movieinfopage.h @@ -0,0 +1,70 @@ +/* + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version + 2 of the License, or (at your option) any later version. +*/ + +#ifndef MOVIEINFOPAGE_H +#define MOVIEINFOPAGE_H + +#include + +class WizardTreeModel; +class SmTreeView; +class SmTreeItem; +class QSpinBox; +class QLineEdit; +class QSortFilterProxyModel; +class QStringListModel; +class QCompleter; + +class MovieInfoPage : public QWizardPage { + Q_OBJECT + public: + explicit MovieInfoPage(QWidget *parent = nullptr); + WizardTreeModel *model() { return mFileModel; } + virtual void initializePage(); + void addFile(const QString &file); + void setCurrentDir(const QString &dir) { mCurrentDir = dir; } + void selectFirst(); + void saveData(); + void restoreData(); + const QStringList &origins() const { return mOrigins; } + + public slots: + void initCompleters(); + void guessOld(const QString &fullPath); + + private slots: + void extractTitle(); + void addOld(); + void addFiles(); + void removeFile(); + + private: + void setupGui(); + SmTreeView *mFileView; + QLineEdit *mTitle; + QLineEdit *mSubtitle; + QSpinBox *mSeriesNo; + QSpinBox *mQuality; + QPushButton *mExtractTitle; + QPushButton *mAddOld; + QPushButton *mAddFile; + QPushButton *mRemoveFile; + WizardTreeModel *mFileModel; + SmTreeItem *mMoviesItem; + SmTreeItem *mCoversItem; + QCompleter *mSeriesCompleter; + QStringListModel *mSeriesCompleterModel; + QSortFilterProxyModel *mProxy; + QString mCurrentDir; + QString mCurTitle; + QString mCurSubtitle; + QStringList mOrigins; + int mCurSeriesno; + int mCurQuality; +}; + +#endif // MOVIEINFOPAGE_H -- cgit v1.2.3-70-g09d2