diff options
Diffstat (limited to 'seriestreemodel.h')
-rw-r--r-- | seriestreemodel.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/seriestreemodel.h b/seriestreemodel.h index 8488cd7..348ff2c 100644 --- a/seriestreemodel.h +++ b/seriestreemodel.h @@ -20,10 +20,11 @@ class QSqlQuery; class SeriesTreeModel : public SmTreeModel { Q_OBJECT public: - enum CustomRoles { NameRole = Qt::UserRole + 1, SeriesIdRole = Qt::UserRole + 2, SeriesPartIdRole = Qt::UserRole + 3, SeriesPartRole = Qt::UserRole + 4, TypeRole = Qt::UserRole + 5, FavoriteRole = Qt::UserRole + 6, SubtitleRole = Qt::UserRole + 7 }; - enum Fields { Name = 0, SeriesId = 1, SeriesPartId = 2, SeriesPart = 3, Type = 4, Favorite = 5, Subtitle = 6 }; + enum CustomRoles { NameRole = Qt::UserRole + 1, SeriesIdRole = Qt::UserRole + 2, SeriesPartIdRole = Qt::UserRole + 3, SeriesPartRole = Qt::UserRole + 4, TypeRole = Qt::UserRole + 5, FavoriteRole = Qt::UserRole + 6, SubtitleRole = Qt::UserRole + 7, IsLocalRole = Qt::UserRole + 8 }; + enum Fields { Name = 0, SeriesId = 1, SeriesPartId = 2, SeriesPart = 3, Type = 4, Favorite = 5, Subtitle = 6, IsLocal = 7 }; enum Types { Series, Part, NewSeries }; enum QueryType { NumericQuery, TextQuery }; + enum { NumFields = 8 }; explicit SeriesTreeModel(QStringList &headers, QObject *parent = 0); ~SeriesTreeModel(); @@ -38,6 +39,7 @@ class SeriesTreeModel : public SmTreeModel { QFileInfoList findFiles(const QModelIndex &where) const; QFileInfoList findMovies(const QModelIndexList &from) const; QFileInfoList findSortedMovies(const QModelIndex &from) const; + bool hasLocals(int sPartId) const; int seriesIdByPartId(int partId); int findNextDvdNo() const; @@ -86,6 +88,7 @@ class SeriesTreeModel : public SmTreeModel { QSqlQuery *mGenreFilterQuery; QSqlQuery *mFavoriteSeriesIdQuery; QSqlQuery *mFavoriteSeriesPartsQuery; + QSqlQuery *mIsLocalQuery; QHash<int, int> mSeriesPartSeriesMap; QHash<int, QString> mUpdateGenericMap; QColor mFavoriteColor; |