From 3699ffafe4864a1e20c8980a610d68756c37f5cf Mon Sep 17 00:00:00 2001 From: Arno Date: Sun, 22 May 2011 09:41:36 +0200 Subject: Propagate changes from SeriesTreeModel::IsLocaL Propagate changes to SeriesTreeModel::IsLocal to all attached views. For some reason this wasn't as easy as I thought... --- filestreemodel.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'filestreemodel.h') diff --git a/filestreemodel.h b/filestreemodel.h index ac47faa..9054368 100644 --- a/filestreemodel.h +++ b/filestreemodel.h @@ -26,18 +26,16 @@ 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 { Normal = 0, Archived = 1, Local = 2 }; explicit FilesTreeModel(QStringList &headers, QObject *parent = 0); const QHash fileTypes() const { return mFileTypes; } const QHash coverTypes() const { return mCoverTypes; } - const QString modeName(int mode = -1) const; const QHash editableColumns() const { return mEditableColumns; } int mode() const { return mMode; } ~FilesTreeModel(); //data + flags void setIds(const QList &seriesPartIds); - void setMode(int mode); + void setMode(int mode) { mMode = mode; } QVariant data(const QModelIndex &index, int role) const; bool setData(const QModelIndex &index, const QVariant &value, int role); Qt::ItemFlags flags(const QModelIndex &index) const; @@ -79,7 +77,6 @@ class FilesTreeModel : public SmTreeModel { //misc QHash mFileTypes; QHash mCoverTypes; - QHash mModeNames; QHash mPicsDurationCache; QHash mEditableColumns; SeriesTreeModel *mSeriesModel; -- cgit v1.2.3-70-g09d2