Sayonara Player
Public Member Functions | Protected Member Functions | Friends | List of all members
Library::Container Class Referenceabstract
Inheritance diagram for Library::Container:
Library::AbstractContainer EmptyLibraryContainer HistoryContainer LocalLibraryContainer SC::LibraryContainer SomaFM::LibraryContainer

Public Member Functions

 Container (QObject *parent=nullptr)
 
void init () override
 init
 
virtual void rename (const QString &new_name) override
 
virtual QString displayName () const override
 Should return the translated name displayed in the library view combobox. More...
 
virtual QMenu * menu () override
 return actions menu (may be nullptr). The title does not have to be set More...
 
virtual bool isLocal () const override
 a local library is a library which writes to the library field of the database. This should be false for every new plugin More...
 
virtual QString name () const =0
 Should return an untranslated name used for identifying this widget. 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 QPixmap icon () const =0
 Every library should show a icon in the combo box. More...
 

Protected Member Functions

virtual void initUi ()=0
 Should initialize the ui. The ui constructor should be called within this function.
 

Friends

class PluginHandler
 

Member Function Documentation

◆ displayName()

virtual QString Library::Container::displayName ( ) const
overridevirtual

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

Returns
display name

Implements Library::AbstractContainer.

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

◆ header()

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

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

Returns

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

◆ icon()

virtual QPixmap Library::AbstractContainer::icon ( ) const
pure virtualinherited

Every library should show a icon in the combo box.

Returns

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

◆ isLocal()

virtual bool Library::Container::isLocal ( ) const
overridevirtual

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

Returns

Implements Library::AbstractContainer.

Reimplemented in LocalLibraryContainer.

◆ menu()

virtual QMenu* Library::Container::menu ( )
overridevirtual

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

Returns
the translated menu relevant for the corresponding library

Implements Library::AbstractContainer.

Reimplemented in SC::LibraryContainer, SomaFM::LibraryContainer, LocalLibraryContainer, and EmptyLibraryContainer.

◆ name()

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

Should return an untranslated name used for identifying this widget.

Returns
name

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

◆ widget()

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

Should return the UI for the library view.

Returns
pointer to the ui

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