Miam-Player  0.8.0
A nice music player
UniqueLibraryItemDelegate Class Reference

The UniqueLibraryItemDelegate class is used to render item in a specific way. More...

#include <uniquelibraryitemdelegate.h>

Inheritance diagram for UniqueLibraryItemDelegate:
MiamItemDelegate

Public Member Functions

 UniqueLibraryItemDelegate (JumpToWidget *jumpTo, QSortFilterProxyModel *proxy)
 
virtual void paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override
 
- Public Member Functions inherited from MiamItemDelegate
 MiamItemDelegate (QSortFilterProxyModel *proxy)
 

Protected Member Functions

virtual void drawAlbum (QPainter *painter, QStyleOptionViewItem &option, AlbumItem *item) const override
 
virtual void drawArtist (QPainter *painter, QStyleOptionViewItem &option, ArtistItem *item) const override
 
virtual void drawTrack (QPainter *painter, QStyleOptionViewItem &option, TrackItem *track) const override
 
- Protected Member Functions inherited from MiamItemDelegate
void drawLetter (QPainter *painter, QStyleOptionViewItem &option, SeparatorItem *item) const
 
void paintRect (QPainter *painter, const QStyleOptionViewItem &option) const
 
void paintText (QPainter *p, const QStyleOptionViewItem &opt, const QRect &rectText, const QString &text, const QStandardItem *item) const
 

Additional Inherited Members

- Protected Attributes inherited from MiamItemDelegate
QStandardItemModel * _libraryModel
 
QSortFilterProxyModel * _proxy
 
bool _showCovers
 
QTimer * _timer
 
int _coverSize
 
- Static Protected Attributes inherited from MiamItemDelegate
static qreal _iconOpacity = 1.0
 

Detailed Description

The UniqueLibraryItemDelegate class is used to render item in a specific way.

This delegate is able to draw a cover on the left edge of a cover for example.

Author
Matthieu Bachelier

Constructor & Destructor Documentation

UniqueLibraryItemDelegate::UniqueLibraryItemDelegate ( JumpToWidget jumpTo,
QSortFilterProxyModel *  proxy 
)
explicit

Member Function Documentation

void UniqueLibraryItemDelegate::drawAlbum ( QPainter *  painter,
QStyleOptionViewItem &  option,
AlbumItem item 
) const
overrideprotectedvirtual

Implements MiamItemDelegate.

void UniqueLibraryItemDelegate::drawArtist ( QPainter *  painter,
QStyleOptionViewItem &  option,
ArtistItem item 
) const
overrideprotectedvirtual

Implements MiamItemDelegate.

void UniqueLibraryItemDelegate::drawTrack ( QPainter *  painter,
QStyleOptionViewItem &  option,
TrackItem track 
) const
overrideprotectedvirtual

Reimplemented from MiamItemDelegate.

void UniqueLibraryItemDelegate::paint ( QPainter *  painter,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const
overridevirtual

Redefined.

Work In Progress


The documentation for this class was generated from the following files: