Sayonara Player
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | List of all members
Library::ArtistModel Class Reference

The ArtistModel class. More...

#include <ArtistModel.h>

Inheritance diagram for Library::ArtistModel:
Library::ItemModel SearchableModel< Model > SearchableModelInterface

Public Types

using ExtraTriggerMap = QMap<QChar, QString>
 

Public Member Functions

 ArtistModel (QObject *parent, AbstractLibrary *library)
 
Qt::ItemFlags flags (const QModelIndex &index) const override
 
QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const override
 
int rowCount (const QModelIndex &parent) const override
 
Cover::Location cover (const QModelIndexList &indexes) const override
 
int searchableColumn () const override
 the index of the searchable column. This is the column where the text is searched for a certain searchstring
 
Id mapIndexToId (int row) const override
 return the current id for a given row
 
QString searchableString (int row) const override
 here, the searchable string can even be refined. Maybe we just want to search within a substring indicated by the row
 
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
 
int columnCount (const QModelIndex &parent=QModelIndex()) const override
 
QModelIndexList searchResults (const QString &substr) 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
 

Protected Member Functions

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
 
AbstractLibrary * library ()
 
const AbstractLibrary * library () const
 

Detailed Description

The ArtistModel class.

Member Function Documentation

◆ cover()

Cover::Location Library::ArtistModel::cover ( const QModelIndexList & indexes) const
overridevirtual

LibraryItemModel

Implements Library::ItemModel.

◆ flags()

Qt::ItemFlags Library::ArtistModel::flags ( const QModelIndex & index) const
override

AbstractSearchTableModel

◆ mapIndexToId()

Id Library::ArtistModel::mapIndexToId ( int row) const
overridevirtual

return the current id for a given row

Parameters
row
Returns

Implements Library::ItemModel.

◆ searchableColumn()

int Library::ArtistModel::searchableColumn ( ) const
overridevirtual

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::ArtistModel::searchableString ( int row) const
overridevirtual

here, the searchable string can even be refined. Maybe we just want to search within a substring indicated by the row

Parameters
row
Returns

Implements Library::ItemModel.

◆ searchResults()

QModelIndexList Library::ItemModel::searchResults ( const QString & substr)
overridevirtualinherited

◆ selectedMetadata()

const MetaDataList & Library::ArtistModel::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.