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:
GUI_ControlsBase GUI_DirectoryWidget 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 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

virtual MD::Interpretation metadata_interpretation () 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 info_dialog_data () 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 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 ()
 

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

◆ has_metadata()

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

◆ info_dialog_data()

virtual MetaDataList InfoDialogContainer::info_dialog_data ( ) 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 GUI_ControlsBase, Library::ItemView, and GUI_DirectoryWidget.

◆ metadata_interpretation()

virtual MD::Interpretation InfoDialogContainer::metadata_interpretation ( ) 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 GUI_ControlsBase, GUI_DirectoryWidget, Library::CoverView, and Library::ArtistView.

◆ pathlist()

virtual QStringList InfoDialogContainer::pathlist ( ) const
protectedvirtual

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

Returns

Reimplemented in GUI_DirectoryWidget.