diff options
author | Arno <am@disconnect.de> | 2013-07-10 12:25:04 +0200 |
---|---|---|
committer | Arno <am@disconnect.de> | 2013-07-10 12:25:04 +0200 |
commit | 493b6f3020dcd97697bb785fa47b8712b97189f8 (patch) | |
tree | 02c0098c157dd5e313b3083ddf5bcc03bc9d32c5 /archivemodel.h | |
parent | 59300b5b8663ecfdd8a55935641cbd0f04c79773 (diff) | |
download | SheMov-493b6f3020dcd97697bb785fa47b8712b97189f8.tar.gz SheMov-493b6f3020dcd97697bb785fa47b8712b97189f8.tar.bz2 SheMov-493b6f3020dcd97697bb785fa47b8712b97189f8.zip |
Make experimental view editable
Create new dialogs for editing actors, genres and metadata. IMHO like
this it's much clearer who does what. KISS!
Diffstat (limited to 'archivemodel.h')
-rw-r--r-- | archivemodel.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/archivemodel.h b/archivemodel.h index 991d4da..5b84492 100644 --- a/archivemodel.h +++ b/archivemodel.h @@ -24,6 +24,8 @@ class ArchiveModel : public SmTreeModel { public: enum CustomRoles { NameRole = Qt::UserRole + 1, GenericIdRole = Qt::UserRole + 2, SeriesPartIdRole = Qt::UserRole + 3, SeriesPartRole = Qt::UserRole + 4, TypeRole = Qt::UserRole + 5, FavoriteRole = Qt::UserRole + 6, SubtitleRole = Qt::UserRole + 7, CountRole = Qt::UserRole + 8 }; enum Fields { Name = 0, GenericId = 1, SeriesPartId = 2, SeriesPart = 3, Type = 4, Favorite = 5, Subtitle = 6, Count = 7 }; + enum MetadataFields { ReleaseYear = 0, Source = 1, Subject = 2, ReleaseGroup = 3, EncoderOpts = 4, Comment = 5, Passes = 6, Added = 7 }; + enum { MetadataNumFields = 8 }; enum Order { SeriesName, Actor, Genre, NoOrder }; enum { NumFields = 8 }; enum NodeType { SeriesNode, SeriesPartNode, GenreNode, ActorNode }; @@ -39,8 +41,16 @@ class ArchiveModel : public SmTreeModel { QModelIndexList pathToIndex(const QStringList &path) const; QSet<int> seriesPartIds(const QModelIndex &idx) const; QStringList actors(const QSet<int> &partIds) const; + QStringList allActors() const; + void setActors(int partId, const QStringList &actors); QStringList genres(const QSet<int> &genreIds) const; + QStringList allGenres() const; + void setGenres(int partId, const QStringList &genres); QString metadata(int partId) const; + QList<QVariant> metadataList(int partId) const; + void setMetadata(int partId, const QList<QVariant> &data); + QStringList allSources() const; + QStringList allReleaseGroups() const; signals: void needRefresh(); |