Sayonara Player
Friends | Public Member Functions | List of all members
LibraryContainerInterface Class Referenceabstract

#include <LibraryContainer.h>

Detailed Description

An interface class needed when implementing a library plugin.

Friends

class LibraryPluginHandler
 

Public Member Functions

 LibraryContainerInterface (QObject *parent=nullptr)
 
virtual QIcon get_icon () const =0
 Should return the icon displayed in the library view combobox. More...
 
virtual QString get_name () const =0
 Should return an untranslated name used for identifying this widget. More...
 
virtual QString get_display_name () const =0
 Should return the translated name displayed in the library view combobox. More...
 
virtual QWidget * get_ui () const =0
 Should return the UI for the library view. More...
 
virtual QComboBox * get_libchooser ()=0
 Should return the library chooser combo box. More...
 
virtual QMenu * get_menu ()
 return actions menu (may be nullptr). The title does not have to be set More...
 
void set_menu_action (QAction *action)
 
QAction * get_menu_action () const
 
virtual void init_ui ()=0
 Should initialize the ui. The ui constructor should be called within this function.
 
bool is_initialized () const
 tests, if the ui already has been initialized More...
 

Member Function Documentation

virtual QString LibraryContainerInterface::get_display_name ( ) const
pure virtual

Should return the translated name displayed in the library view combobox.

Returns
display name

Implemented in LocalLibraryContainer, DirectoryLibraryContainer, SoundcloudLibraryContainer, and SomaFMLibraryContainer.

virtual QIcon LibraryContainerInterface::get_icon ( ) const
pure virtual

Should return the icon displayed in the library view combobox.

Returns
QIcon instance

Implemented in LocalLibraryContainer, DirectoryLibraryContainer, SoundcloudLibraryContainer, and SomaFMLibraryContainer.

virtual QComboBox* LibraryContainerInterface::get_libchooser ( )
pure virtual

Should return the library chooser combo box.

Returns
pointer to the combobox

Implemented in LocalLibraryContainer, DirectoryLibraryContainer, SoundcloudLibraryContainer, and SomaFMLibraryContainer.

virtual QMenu* LibraryContainerInterface::get_menu ( )
virtual

return actions menu (may be nullptr). The title does not have to be set

Returns
the translated menu relevant for the corresponding library

Reimplemented in LocalLibraryContainer, SoundcloudLibraryContainer, and SomaFMLibraryContainer.

virtual QString LibraryContainerInterface::get_name ( ) const
pure virtual

Should return an untranslated name used for identifying this widget.

Returns
name

Implemented in LocalLibraryContainer, DirectoryLibraryContainer, SoundcloudLibraryContainer, and SomaFMLibraryContainer.

virtual QWidget* LibraryContainerInterface::get_ui ( ) const
pure virtual

Should return the UI for the library view.

Returns
pointer to the ui

Implemented in LocalLibraryContainer, DirectoryLibraryContainer, SoundcloudLibraryContainer, and SomaFMLibraryContainer.

bool LibraryContainerInterface::is_initialized ( ) const

tests, if the ui already has been initialized

Returns
true if ui has been initialized, false else
Inheritance diagram for LibraryContainerInterface:
DirectoryLibraryContainer LocalLibraryContainer SomaFMLibraryContainer SoundcloudLibraryContainer