diff options
Diffstat (limited to 'movieinfopage.h')
| -rw-r--r-- | movieinfopage.h | 70 | 
1 files changed, 70 insertions, 0 deletions
| 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 <QWizardPage> + +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 | 
