Sayonara Player
Public Member Functions | List of all members
Library::AbstractContainer Class Referenceabstract

This container is only used internally to avoid Ui dependencies in the Components. If implementing your own library plugin, use Gui/Library/LibraryContainer.h instead. More...

#include <AbstractLibraryContainer.h>

Inheritance diagram for Library::AbstractContainer:
Library::Container EmptyLibraryContainer HistoryContainer LocalLibraryContainer SC::LibraryContainer SomaFM::LibraryContainer

Public Member Functions

virtual QString name () const =0
 Should return an untranslated name used for identifying this widget. More...
 
virtual void rename (const QString &newName)=0
 
virtual QString displayName () const =0
 Should return the translated name displayed in the library view combobox. More...
 
virtual QWidget * widget () const =0
 Should return the UI for the library view. More...
 
virtual QFrame * header () const =0
 this is a frame at the top left of the container where the combo box will be located More...
 
virtual QMenu * menu ()=0
 return actions menu (may be nullptr). The title does not have to be set More...
 
virtual QIcon icon () const =0
 Every library should show a icon in the combo box. More...
 
virtual void init ()=0
 init More...
 
virtual bool isLocal () const =0
 a local library is a library which writes to the library field of the database. This should be false for every new plugin More...
 

Detailed Description

This container is only used internally to avoid Ui dependencies in the Components. If implementing your own library plugin, use Gui/Library/LibraryContainer.h instead.

Member Function Documentation

◆ displayName()

virtual QString Library::AbstractContainer::displayName ( ) const
pure virtual

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

Returns
display name

Implemented in HistoryContainer, EmptyLibraryContainer, Library::Container, LocalLibraryContainer, SomaFM::LibraryContainer, and SC::LibraryContainer.

◆ header()

virtual QFrame * Library::AbstractContainer::header ( ) const
pure virtual

this is a frame at the top left of the container where the combo box will be located

Returns

Implemented in HistoryContainer, EmptyLibraryContainer, LocalLibraryContainer, SomaFM::LibraryContainer, and SC::LibraryContainer.

◆ icon()

virtual QIcon Library::AbstractContainer::icon ( ) const
pure virtual

Every library should show a icon in the combo box.

Returns

Implemented in HistoryContainer, EmptyLibraryContainer, LocalLibraryContainer, SomaFM::LibraryContainer, and SC::LibraryContainer.

◆ init()

virtual void Library::AbstractContainer::init ( )
pure virtual

init

Implemented in Library::Container.

◆ isLocal()

virtual bool Library::AbstractContainer::isLocal ( ) const
pure virtual

a local library is a library which writes to the library field of the database. This should be false for every new plugin

Returns

Implemented in Library::Container, and LocalLibraryContainer.

◆ menu()

virtual QMenu * Library::AbstractContainer::menu ( )
pure virtual

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

Returns
the translated menu relevant for the corresponding library

Implemented in EmptyLibraryContainer, Library::Container, LocalLibraryContainer, SomaFM::LibraryContainer, and SC::LibraryContainer.

◆ name()

virtual QString Library::AbstractContainer::name ( ) const
pure virtual

Should return an untranslated name used for identifying this widget.

Returns
name

Implemented in HistoryContainer, EmptyLibraryContainer, LocalLibraryContainer, SomaFM::LibraryContainer, and SC::LibraryContainer.

◆ widget()

virtual QWidget * Library::AbstractContainer::widget ( ) const
pure virtual

Should return the UI for the library view.

Returns
pointer to the ui

Implemented in HistoryContainer, EmptyLibraryContainer, LocalLibraryContainer, SomaFM::LibraryContainer, and SC::LibraryContainer.