The CoverModel class.
More...
#include <CoverModel.h>
|
enum | Role {
AlbumRole = Qt::UserRole
,
ArtistRole = Qt::UserRole + 1
,
CoverRole = Qt::UserRole + 2
} |
|
using | ExtraTriggerMap = QMap< QChar, QString > |
|
|
void | setZoom (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 | itemSize () const |
|
int | zoom () const |
|
QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override |
|
bool | setHeaderData (int section, Qt::Orientation orientation, const QVariant &value, int role=Qt::EditRole) override |
|
virtual QMimeData * | mimeData (const QModelIndexList &indexList) const override |
|
void | refreshData (int *rowCountBefore=nullptr, int *rowCountAfter=nullptr) |
|
virtual ExtraTriggerMap | getExtraTriggers () |
|
virtual ::Library::SearchModeMask | searchMode () const final |
|
|
QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const override |
|
const MetaDataList & | selectedMetadata () 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...
|
|
QModelIndexList | searchResults (const QString &substr) override |
|
int | searchableColumn () const override |
| the index of the searchable column. This is the column where the text is searched for a certain searchstring More...
|
|
QString | searchableString (int index) 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 | mapIndexToId (int index) const override |
| return the current id for a given row More...
|
|
Cover::Location | cover (const QModelIndexList &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()
Cover::Location Library::CoverModel::cover |
( |
const QModelIndexList & |
indexList | ) |
const |
|
overrideprotectedvirtual |
return the cover for multiple rows. if rows.size() > 1, an invalid, default constructed cover location is usually shown
- Parameters
-
- Returns
Implements Library::ItemModel.
◆ mapIndexToId()
int Library::CoverModel::mapIndexToId |
( |
int |
row | ) |
const |
|
overrideprotectedvirtual |
◆ searchableColumn()
int Library::CoverModel::searchableColumn |
( |
| ) |
const |
|
overrideprotectedvirtual |
the index of the searchable column. This is the column where the text is searched for a certain searchstring
Implements Library::ItemModel.
◆ searchableString()
QString Library::CoverModel::searchableString |
( |
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.
◆ searchResults()
QModelIndexList Library::CoverModel::searchResults |
( |
const QString & |
substr | ) |
|
|
overrideprotectedvirtual |
◆ selectedMetadata()
const MetaDataList & Library::CoverModel::selectedMetadata |
( |
| ) |
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.