21 #ifndef ALBUMCOVERMODEL_H 22 #define ALBUMCOVERMODEL_H 24 #include "Gui/Library/ItemModel.h" 25 #include "Utils/Pimpl.h" 54 AlbumRole=Qt::UserRole,
55 ArtistRole=Qt::UserRole + 1
62 int rowCount(
const QModelIndex& parent=QModelIndex())
const override;
63 int columnCount(
const QModelIndex& paren=QModelIndex())
const override;
64 QVariant data(
const QModelIndex& index,
int role)
const override;
65 Qt::ItemFlags flags(
const QModelIndex &index)
const override;
67 QSize item_size()
const;
76 QModelIndexList search_results(
const QString& substr)
override;
85 void add_rows(
int row,
int count);
86 void remove_rows(
int row,
int count);
87 void add_columns(
int column,
int count);
88 void remove_columns(
int column,
int count);
92 void set_zoom(
int zoom,
const QSize& view_size);
97 void cover_ready(
const QString& hash);
99 void cover_lookup_finished(
bool success);
100 void show_artists_changed();
104 #endif // ALBUMCOVERMODEL_H QString searchable_string(int idx) const override
here, the searchable string can even be refined. Maybe we just want to search within a substring indi...
int id_by_index(int idx) const override
return the current id for a given row
Definition: AbstractLibrary.h:41
The CoverLocation class.
Definition: CoverLocation.h:42
const MetaDataList & mimedata_tracks() const override
return the tracks which belong to the selections. If an album is selected for example,...
A set structure. Inherited from std::set with some useful methods. For integer and String this set is...
Definition: Set.h:35
The AlbumList class.
Definition: Album.h:89
int searchable_column() const override
the index of the searchable column. This is the column where the text is searched for a certain searc...
The Album class.
Definition: Album.h:39
An interface class needed when implementing a library plugin.
Definition: LocalLibraryWatcher.h:32
The ItemModel is intended to abstract the various views. It supports searching, selections and a libr...
Definition: ItemModel.h:46
Cover::Location cover(const IndexSet &indexes) const override
return the cover for multiple rows. if rows.size() > 1, an invalid, default constructed cover locatio...
const Util::Set< Id > & selections() const override
returns a set of the selected ids
The CoverModel class.
Definition: CoverModel.h:45