diff options
author | Arno <am@disconnect.de> | 2010-07-18 14:42:26 +0200 |
---|---|---|
committer | Arno <am@disconnect.de> | 2010-07-18 14:42:26 +0200 |
commit | a59ac6eb3cebdd4e3f41552c21f14165203c1ab2 (patch) | |
tree | 0ff0cec23fce7b08f02bc9acffa4adda02b906c2 /seriestreewidget.h | |
parent | 6d00ae1d57ed37a8d3d6d35181cb6b155dd7801c (diff) | |
download | SheMov-a59ac6eb3cebdd4e3f41552c21f14165203c1ab2.tar.gz SheMov-a59ac6eb3cebdd4e3f41552c21f14165203c1ab2.tar.bz2 SheMov-a59ac6eb3cebdd4e3f41552c21f14165203c1ab2.zip |
Implemented add covers
Finally we can add covers to already existsing series. Seems to work,
but I encountered a crash when merging series while testing...
Unfortunately I don't know the cause.
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 |