Sayonara Player
Signals | Public Member Functions | Protected Types | Protected Member Functions | List of all members
Directory::FileListView Class Reference

The FileListView class. More...

#include <FileListView.h>

Inheritance diagram for Directory::FileListView:
Gui::WidgetTemplate< T > InfoDialogContainer Gui::Dragable Gui::WidgetTemplateParent

Signals

void sigDeleteClicked ()
 
void sigPlayClicked ()
 
void sigPlayNewTabClicked ()
 
void sigPlayNextClicked ()
 
void sigAppendClicked ()
 
void sigEnterPressed ()
 
void sigImportRequested (LibraryId lib_id, const QStringList &files, const QString &targetDirectory)
 
void sigRenameRequested (const QString &old_name, const QString &newName)
 
void sigRenameByExpressionRequested (const QString &oldName, const QString &expression)
 
void sigCopyToLibraryRequested (LibraryId libraryId)
 
void sigMoveToLibraryRequested (LibraryId libraryId)
 

Public Member Functions

 FileListView (QWidget *parent=nullptr)
 
void init (LibraryInfoAccessor *libraryInfoAccessor, const Library::Info &info)
 
QStringList selectedPaths () const
 
void setParentDirectory (const QString &dir)
 
QString parentDirectory () const
 
virtual void showEvent (QShowEvent *e) override
 

Protected Types

enum  EditTab {
  TabText ,
  TabCover ,
  TabTagsFromPath
}
 

Protected Member Functions

void contextMenuEvent (QContextMenuEvent *event) override
 
void dragEnterEvent (QDragEnterEvent *event) override
 
void dragMoveEvent (QDragMoveEvent *event) override
 
void dropEvent (QDropEvent *event) override
 
void skinChanged () override
 
int mapModelIndexToIndex (const QModelIndex &idx) const override
 
ModelIndexRange mapIndexToModelIndexes (int idx) const override
 
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...
 
bool hasMetadata () const override
 returns, if the widget can provide metadata instantly If false, the info dialog will the pathlist More...
 
QStringList pathlist () const override
 Returns a list of paths. This is only used if has_metadata() returns false. More...
 
QWidget * getParentWidget () override
 
virtual void languageChanged ()
 
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 FileListView class.

Member Function Documentation

◆ getParentWidget()

QWidget * Directory::FileListView::getParentWidget ( )
overrideprotectedvirtual

Implements InfoDialogContainer.

◆ hasMetadata()

bool Directory::FileListView::hasMetadata ( ) const
overrideprotectedvirtual

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

Returns
true in the basic implementation

Reimplemented from InfoDialogContainer.

◆ infoDialogData()

MetaDataList Directory::FileListView::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 Directory::FileListView::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()

QStringList Directory::FileListView::pathlist ( ) const
overrideprotectedvirtual

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

Returns

Reimplemented from InfoDialogContainer.

◆ skinChanged()

void Directory::FileListView::skinChanged ( )
overrideprotectedvirtual

Reimplemented from Gui::WidgetTemplateParent.