The CoverModel class.
More...
#include <CoverModel.h>
|
enum | Role {
AlbumRole =Qt::UserRole,
ArtistRole =Qt::UserRole + 1
} |
|
using | ExtraTriggerMap = QMap< QChar, QString > |
|
|
void | set_zoom (int zoom, const QSize &view_size) |
|
void | reload () |
|
void | clear () |
|
|
| CoverModel (QObject *parent, AbstractLibrary *library) |
|
int | rowCount (const QModelIndex &parent=QModelIndex()) const override |
|
int | columnCount (const QModelIndex &paren=QModelIndex()) const override |
|
QVariant | data (const QModelIndex &index, int role) const override |
|
Qt::ItemFlags | flags (const QModelIndex &index) const override |
|
QSize | item_size () const |
|
int | zoom () const |
|
QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override |
|
bool | set_header_data (const QStringList &names) |
|
virtual bool | is_selected (int id) const final |
|
virtual IndexSet | selected_indexes () const |
|
Gui::CustomMimeData * | custom_mimedata () const |
|
void | refresh_data (int *n_rows_before=nullptr, int *n_rows_after=nullptr) |
|
virtual bool | has_items () const override |
|
virtual ExtraTriggerMap | getExtraTriggers () |
|
virtual ::Library::SearchModeMask | search_mode () const final |
|
|
const MetaDataList & | mimedata_tracks () const override |
| return the tracks which belong to the selections. If an album is selected for example, all tracks of that album should be returned More...
|
|
const Util::Set< Id > & | selections () const override |
| returns a set of the selected ids
|
|
QModelIndexList | search_results (const QString &substr) override |
|
int | searchable_column () const override |
| the index of the searchable column. This is the column where the text is searched for a certain searchstring
|
|
QString | searchable_string (int idx) const override |
| here, the searchable string can even be refined. Maybe we just want to search within a substring indicated by the row More...
|
|
int | id_by_index (int idx) const override |
| return the current id for a given row More...
|
|
Cover::Location | cover (const IndexSet &indexes) const override |
| return the cover for multiple rows. if rows.size() > 1, an invalid, default constructed cover location is usually shown More...
|
|
AbstractLibrary * | library () |
|
const AbstractLibrary * | library () const |
|
◆ cover()
return the cover for multiple rows. if rows.size() > 1, an invalid, default constructed cover location is usually shown
- Parameters
-
- Returns
Implements Library::ItemModel.
◆ id_by_index()
int Library::CoverModel::id_by_index |
( |
int |
row | ) |
const |
|
overrideprotectedvirtual |
◆ mimedata_tracks()
const MetaDataList& Library::CoverModel::mimedata_tracks |
( |
| ) |
const |
|
overrideprotectedvirtual |
return the tracks which belong to the selections. If an album is selected for example, all tracks of that album should be returned
- Returns
Implements Library::ItemModel.
◆ searchable_string()
QString Library::CoverModel::searchable_string |
( |
int |
row | ) |
const |
|
overrideprotectedvirtual |
here, the searchable string can even be refined. Maybe we just want to search within a substring indicated by the row
- Parameters
-
- Returns
Implements Library::ItemModel.