Sayonara Player
Public Member Functions | Protected Types | Protected Member Functions | Friends | List of all members
InfoDialogContainer Class Referenceabstract

An interface used to abstract the usage of the info dialog. An implementing class has to return the interpretation of a MetaDataList and the MetaDataList itself. The implementing class may call the show functions to open the info dialog at its specific tab. More...

#include <InfoDialogContainer.h>

Inheritance diagram for InfoDialogContainer:
Directory::FileListView Directory::TreeView GUI_ControlsBase Library::ItemView Playlist::View GUI_Controls GUI_ControlsNew Library::CoverView Library::TableView Library::AlbumView Library::ArtistView Library::TrackView SC::AlbumView SC::ArtistView SC::TrackView

Public Member Functions

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

virtual MD::Interpretation metadataInterpretation () const =0
 get the interpretation for the metadata. Maybe a list of metadata should be intrepeted as albums while others should be considered as tracks More...
 
virtual MetaDataList infoDialogData () const =0
 get the metadata that should be used for the info dialog So for lists, the selected tracks are used here More...
 
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.
 

Friends

class InfoDialogContainerAsyncHandler
 
class GUI_InfoDialog
 

Detailed Description

An interface used to abstract the usage of the info dialog. An implementing class has to return the interpretation of a MetaDataList and the MetaDataList itself. The implementing class may call the show functions to open the info dialog at its specific tab.

Member Function Documentation

◆ hasMetadata()

virtual bool InfoDialogContainer::hasMetadata ( ) const
protectedvirtual

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()

virtual MetaDataList InfoDialogContainer::infoDialogData ( ) const
protectedpure virtual

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

Returns
MetaDataList

Implemented in Playlist::View, GUI_ControlsBase, Library::ItemView, Directory::FileListView, and Directory::TreeView.

◆ metadataInterpretation()

virtual MD::Interpretation InfoDialogContainer::metadataInterpretation ( ) const
protectedpure virtual

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

Implemented in Playlist::View, GUI_ControlsBase, Library::ArtistView, Directory::FileListView, Directory::TreeView, and Library::CoverView.

◆ pathlist()

virtual QStringList InfoDialogContainer::pathlist ( ) const
protectedvirtual

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

Returns

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