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 insertToPlaylist (int rowIndex)
 
void openTagEditor ()
 

Signals

void aboutToUpdateCoverSize ()
 
- Signals inherited from TreeView
void aboutToInsertToPlaylist (int rowIndex, const QStringList &tracks)
 
void sendToTagEditor (const QModelIndexList indexes, const QStringList &tracks)
 

Public Member Functions

 LibraryTreeView (QWidget *parent=nullptr)
 
void createConnectionsToDB ()
 
const QImage * expandedCover (AlbumItem *album) const
 
virtual void findAll (const QModelIndex &index, QStringList &tracks) const override
 
void findMusic (const QString &text)
 
JumpToWidgetjumpToWidget () const
 
LibraryItemModelmodel () const
 
- Public Member Functions inherited from TreeView
 TreeView (QWidget *parent=nullptr)
 
virtual QStringList selectedTracks () override
 
- Public Member Functions inherited from SelectedTracksModel
virtual ~SelectedTracksModel ()
 

Public Attributes

QMenu * properties
 
QShortcut * sendToCurrentPlaylist
 
QShortcut * openTagEditor
 

Protected Member Functions

virtual void contextMenuEvent (QContextMenuEvent *event) override
 
virtual bool eventFilter (QObject *obj, QEvent *event) override
 
virtual void paintEvent (QPaintEvent *) override
 
- Protected Member Functions inherited from TreeView
virtual void startDrag (Qt::DropActions supportedActions) override
 

Additional Inherited Members

- Protected Attributes inherited from TreeView
QModelIndexList _cacheSelectedIndexes
 

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

Member Function Documentation

void LibraryTreeView::aboutToUpdateCoverSize ( )
signal
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.

void LibraryTreeView::createConnectionsToDB ( )
bool LibraryTreeView::eventFilter ( QObject *  obj,
QEvent *  event 
)
overrideprotectedvirtual

Redefined to override shortcuts that are mapped on simple keys.

const QImage * LibraryTreeView::expandedCover ( AlbumItem album) const
void LibraryTreeView::findAll ( const QModelIndex &  index,
QStringList &  tracks 
) const
overridevirtual

Reimplemented.

Implements TreeView.

void LibraryTreeView::findMusic ( const QString &  text)
JumpToWidget* LibraryTreeView::jumpToWidget ( ) const
inline
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

QShortcut* LibraryTreeView::openTagEditor
QMenu* LibraryTreeView::properties

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

QShortcut* LibraryTreeView::sendToCurrentPlaylist

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