Sayonara Player
Public Slots | Signals | Public Member Functions | Protected Types | Protected Member Functions | List of all members
Playlist::View Class Reference

The PlaylistView class. More...

#include <PlaylistView.h>

Inheritance diagram for Playlist::View:
Gui::WidgetTemplate< T > InfoDialogContainer Gui::Dragable Gui::WidgetTemplateParent

Public Slots

void clear ()
 
void removeSelectedRows ()
 

Signals

void sigDoubleClicked (int row)
 
void sigDeleteTracks (const IndexSet &rows)
 
void sigBookmarkPressed (int trackIdx, Seconds timestamp)
 

Public Member Functions

 View (PlaylistPtr playlist, QWidget *parent=nullptr)
 
void gotoRow (int row)
 
void deleteSelectedTracks ()
 
void dropEventFromOutside (QDropEvent *event)
 called from GUI_Playlist when data has not been dropped directly into the view widget. Insert on first row then More...
 
virtual void showEvent (QShowEvent *e) override
 
void infoDialogClosed ()
 this function should not be called from outside. This function is triggered when the info dialog was closed.
 

Protected Types

enum  EditTab {
  TabText,
  TabCover,
  TabTagsFromPath
}
 

Protected Member Functions

MD::Interpretation metadataInterpretation () const override
 get the interpretation for the metadata. Maybe a list of metadata should be intrepeted as albums while others should be considered as tracks More...
 
MetaDataList infoDialogData () const override
 get the metadata that should be used for the info dialog So for lists, the selected tracks are used here More...
 
QMimeData * dragableMimedata () const override
 
int mapModelIndexToIndex (const QModelIndex &idx) const override
 
ModelIndexRange mapIndexToModelIndexes (int idx) const override
 
void skinChanged () override
 
void dragLeaveEvent (QDragLeaveEvent *event) override
 we start the drag action, all lines has to be cleared More...
 
void dragEnterEvent (QDragEnterEvent *event) override
 
void dragMoveEvent (QDragMoveEvent *event) override
 
void dropEvent (QDropEvent *event) override
 
void mousePressEvent (QMouseEvent *event) override
 
void mouseDoubleClickEvent (QMouseEvent *event) override
 
void keyPressEvent (QKeyEvent *event) override
 
bool viewportEvent (QEvent *event) override
 
void contextMenuEvent (QContextMenuEvent *e) override
 
virtual void languageChanged ()
 
virtual bool hasMetadata () const
 returns, if the widget can provide metadata instantly If false, the info dialog will the pathlist More...
 
virtual QStringList pathlist () const
 Returns a list of paths. This is only used if has_metadata() returns false. More...
 
virtual void showInfo ()
 Show the Info dialogs' info tab.
 
virtual void showLyrics ()
 Show the Info dialogs' lyrics tab.
 
virtual void showEdit ()
 Show the tag editor.
 
virtual void showCoverEdit ()
 Show the cover tab withing the tag editor.
 

Detailed Description

The PlaylistView class.

Member Function Documentation

◆ dragLeaveEvent()

void Playlist::View::dragLeaveEvent ( QDragLeaveEvent *  event)
overrideprotected

we start the drag action, all lines has to be cleared

Parameters
theevent

◆ dropEventFromOutside()

void Playlist::View::dropEventFromOutside ( QDropEvent *  event)

called from GUI_Playlist when data has not been dropped directly into the view widget. Insert on first row then

Parameters
event

◆ hasMetadata()

virtual bool InfoDialogContainer::hasMetadata ( ) const
protectedvirtualinherited

returns, if the widget can provide metadata instantly If false, the info dialog will the pathlist

Returns
true in the basic implementation

Reimplemented in Directory::FileListView, and Directory::TreeView.

◆ infoDialogData()

MetaDataList Playlist::View::infoDialogData ( ) const
overrideprotectedvirtual

get the metadata that should be used for the info dialog So for lists, the selected tracks are used here

Returns
MetaDataList

Implements InfoDialogContainer.

◆ metadataInterpretation()

MD::Interpretation Playlist::View::metadataInterpretation ( ) const
overrideprotectedvirtual

get the interpretation for the metadata. Maybe a list of metadata should be intrepeted as albums while others should be considered as tracks

Returns
interpretation of metadata

Implements InfoDialogContainer.

◆ pathlist()

virtual QStringList InfoDialogContainer::pathlist ( ) const
protectedvirtualinherited

Returns a list of paths. This is only used if has_metadata() returns false.

Returns

Reimplemented in Directory::FileListView, and Directory::TreeView.