Miam-Player  0.8.0
A nice music player
LibraryTreeView Class Reference

The LibraryTreeView class is displaying tracks in a tree. More...

#include <librarytreeview.h>

Inheritance diagram for LibraryTreeView:
TreeView SelectedTracksModel

Public Slots

void changeSortOrder ()
 
virtual void reset () override
 
- Public Slots inherited from TreeView
void appendToPlaylist ()
 
void openTagEditor ()
 

Public Member Functions

 LibraryTreeView (QWidget *parent=nullptr)
 
virtual ~LibraryTreeView ()
 
const QImage * expandedCover (AlbumItem *album) const
 
virtual void findAll (const QModelIndex &index, QList< QUrl > *tracks) const override
 
JumpToWidgetjumpToWidget () const
 
LibraryItemModelmodel () const
 
- Public Member Functions inherited from TreeView
 TreeView (QWidget *parent=nullptr)
 
virtual ~TreeView ()
 
virtual QList< QUrl > selectedTracks () override
 
- Public Member Functions inherited from SelectedTracksModel
virtual ~SelectedTracksModel ()
 

Public Attributes

QMenu * properties
 

Protected Member Functions

virtual void contextMenuEvent (QContextMenuEvent *event) override
 
virtual void keyboardSearch (const QString &search) override
 
virtual void keyPressEvent (QKeyEvent *event) override
 
virtual void keyReleaseEvent (QKeyEvent *event) override
 
virtual void paintEvent (QPaintEvent *) override
 
- Protected Member Functions inherited from TreeView
virtual bool eventFilter (QObject *obj, QEvent *event) override
 
virtual void startDrag (Qt::DropActions supportedActions) override
 

Additional Inherited Members

- Signals inherited from TreeView
void aboutToInsertToPlaylist (int rowIndex, const QList< QUrl > &tracks)
 
void aboutToSendToTagEditor (const QList< QUrl > &tracks)
 

Detailed Description

The LibraryTreeView class is displaying tracks in a tree.

Multiple hierarchies can be chosen by one with a right click on the header: Artist \ Album \ Track, Year \ Artist - Album, etc.

Author
Matthieu Bachelier

Constructor & Destructor Documentation

LibraryTreeView::LibraryTreeView ( QWidget *  parent = nullptr)
explicit
LibraryTreeView::~LibraryTreeView ( )
virtual

Member Function Documentation

void LibraryTreeView::changeSortOrder ( )
slot

Invert the current sort order.

void LibraryTreeView::contextMenuEvent ( QContextMenuEvent *  event)
overrideprotectedvirtual

Redefined to display a small context menu in the view.

const QImage * LibraryTreeView::expandedCover ( AlbumItem album) const
void LibraryTreeView::findAll ( const QModelIndex &  index,
QList< QUrl > *  tracks 
) const
overridevirtual

Reimplemented.

Implements TreeView.

JumpToWidget* LibraryTreeView::jumpToWidget ( ) const
inline
void LibraryTreeView::keyboardSearch ( const QString &  search)
overrideprotectedvirtual

Redefined to disable search in the table and trigger jumpToWidget's action.

void LibraryTreeView::keyPressEvent ( QKeyEvent *  event)
overrideprotectedvirtual
void LibraryTreeView::keyReleaseEvent ( QKeyEvent *  event)
overrideprotectedvirtual
LibraryItemModel* LibraryTreeView::model ( ) const
inline
void LibraryTreeView::paintEvent ( QPaintEvent *  event)
overrideprotectedvirtual

XXX: magic number

void LibraryTreeView::reset ( )
overridevirtualslot

Reimplemented.

Reload covers when one has changed cover size in options. Reimplemented.

Member Data Documentation

QMenu* LibraryTreeView::properties

Extendable context menu shown on screen to dispatch tracks (or albums, etc) to Playlist, Tag Editor, and custom plugin defined actions.


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