diff options
Diffstat (limited to 'seriestreewidget.h')
-rw-r--r-- | seriestreewidget.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/seriestreewidget.h b/seriestreewidget.h index 0db8873..815b5f5 100644 --- a/seriestreewidget.h +++ b/seriestreewidget.h @@ -11,13 +11,17 @@ #include <QWidget> #include <QTreeView> #include <QSortFilterProxyModel> +#include <QDialog> class QLineEdit; class QPushButton; class QSortFilterProxyModel; +class QComboBox; class SeriesTreeModel; class SeriesTreeView; class SeriesTreeSortModel; +class FilesTreeModel; +class AddCoverDialog; class SeriesTreeWidget : public QWidget { Q_OBJECT @@ -33,6 +37,7 @@ class SeriesTreeWidget : public QWidget { void readSettings(); void writeSettings(); void expandCurrent(); + void addCover(); private slots: void filter(); @@ -40,12 +45,16 @@ class SeriesTreeWidget : public QWidget { void itemExpanded(const QModelIndex &); void itemCollaped(const QModelIndex &); + signals: + void filesReload(); + private: QLineEdit *mFilterEdit; QPushButton *mFilter; SeriesTreeView *mView; SeriesTreeSortModel *mProxy; SeriesTreeModel *mModel; + AddCoverDialog *mCoverDialog; QStringList mExpandedItems; }; @@ -68,4 +77,26 @@ class SeriesTreeSortModel : public QSortFilterProxyModel { virtual bool lessThan(const QModelIndex &left, const QModelIndex &right) const; }; +class AddCoverDialog : public QDialog { + Q_OBJECT + public: + explicit AddCoverDialog(QWidget *parent = 0, Qt::WindowFlags f = 0); + const QString file() const; + int fileType() const { return mCurrentType; } + + private slots: + void selectFile(); + void typeChanged(const QString &type); + + private: + QLineEdit *mFile; + QComboBox *mFileType; + QPushButton *mSelectFile; + QPushButton *mOk; + QPushButton *mCancel; + QString mLastOpenedDir; + int mCurrentType; + FilesTreeModel *mFilesModel; +}; + #endif |