Sayonara Player
Public Slots | Signals | Public Member Functions | Protected Types | Protected Member Functions | Private Types | Private 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 remove_selected_rows ()
 

Signals

void sig_double_clicked (int row)
 
void sig_delete_tracks (const IndexSet &rows)
 
void sig_bookmark_pressed (int track_idx, Seconds timestamp)
 

Public Member Functions

 View (PlaylistPtr pl, QWidget *parent=nullptr)
 
void goto_row (int row)
 
void delete_selected_tracks ()
 
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 info_dialog_closed ()
 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

int index_by_model_index (const QModelIndex &idx) const override
 
ModelIndexRange model_indexrange_by_index (int idx) const override
 
void skin_changed () override
 
bool viewportEvent (QEvent *event) override
 
virtual void language_changed ()
 
virtual bool has_metadata () 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 show_info ()
 Show the Info dialogs' info tab.
 
virtual void show_lyrics ()
 Show the Info dialogs' lyrics tab.
 
virtual void show_edit ()
 Show the tag editor.
 
virtual void show_cover_edit ()
 

Private Types

enum  ReleaseReason : char {
  Dropped,
  Destroyed
}
 

Private Member Functions

virtual void drag_pressed (const QPoint &p) final
 
virtual QDrag * drag_moving (const QPoint &p) final
 
virtual void drag_released (ReleaseReason reason)
 
virtual bool is_valid_drag_position (const QPoint &p) const
 
virtual QPixmap drag_pixmap () const
 
virtual bool has_drag_label () const
 
virtual QString drag_label () const
 

Detailed Description

The PlaylistView class.

Member Function Documentation

◆ 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

◆ has_metadata()

virtual bool InfoDialogContainer::has_metadata ( ) 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 GUI_DirectoryWidget.

◆ pathlist()

virtual QStringList InfoDialogContainer::pathlist ( ) const
protectedvirtualinherited

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

Returns

Reimplemented in GUI_DirectoryWidget.