From 9fbf13241d8a2aa0698f23c8e8f0626f3f237fb3 Mon Sep 17 00:00:00 2001 From: Arno Date: Thu, 7 Feb 2013 14:08:52 +0100 Subject: Revamp Show all Files Action Change action to show all local movies, no favorites, no pictures, to ease selection of files to burn. --- filestreemodel.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'filestreemodel.h') diff --git a/filestreemodel.h b/filestreemodel.h index 278f257..88dc81f 100644 --- a/filestreemodel.h +++ b/filestreemodel.h @@ -26,15 +26,18 @@ class FilesTreeModel : public SmTreeModel { enum CustomRoles { FileNameRole = Qt::UserRole + 1, FullPathRole = Qt::UserRole + 2, SizeRole = Qt::UserRole + 3, DvdNoRole = Qt::UserRole + 4, SizeDisplayRole = Qt::UserRole + 5, FileTypeRole = Qt::UserRole + 6, Md5SumRole = Qt::UserRole + 7, PartNoRole = Qt::UserRole + 8, SeriesPartIdRole = Qt::UserRole + 9, QualityRole = Qt::UserRole + 10, FilesIdRole = Qt::UserRole + 11, SeriesPartRole = Qt::UserRole + 12, DisplayNameRole = Qt::UserRole + 13, SizeDurationRole = Qt::UserRole + 14, SeriesNameRole = Qt::UserRole + 15, FavoriteRole = Qt::UserRole + 16 }; enum FileTypes { Movie = 1, FrontCover = 2, BackCover = 3, GeneralCover = 4 }; enum Fields { FileName = 0, PartNo = 1, SizeDisplay = 2, Quality = 3, DvdNo = 4, FullPath = 5, Size = 6, FileType = 7, Md5Sum = 8, SeriesPartId = 9, FilesId = 10, SeriesPart = 11, DisplayName = 12, SizeDuration = 13, SeriesName = 14, Favorite = 15 }; + enum Mode { Ids, Burn }; explicit FilesTreeModel(QStringList &headers, QObject *parent = 0); const QHash fileTypes() const { return mFileTypes; } const QHash coverTypes() const { return mCoverTypes; } const QHash editableColumns() const { return mEditableColumns; } int mode() const { return mMode; } + int displayMode() const { return mDisplayMode; } ~FilesTreeModel(); //data + flags void setIds(const QList &seriesPartIds); + void setForBurn(); void setMode(int mode) { mMode = mode; } QVariant data(const QModelIndex &index, int role) const; bool setData(const QModelIndex &index, const QVariant &value, int role); @@ -85,13 +88,14 @@ class FilesTreeModel : public SmTreeModel { QHash mPicsDurationCache; QHash mEditableColumns; SeriesTreeModel *mSeriesModel; - int mMode; + int mMode; const int mMagic; QColor mLocalColor; QColor mArchivedColor; QColor mFavoriteColor; qint64 mDvdSize; QList mCurrentIds; + int mDisplayMode; }; #endif // FILESTREEMODEL_H -- cgit v1.2.3-70-g09d2