Sayonara Player
Friends | Public Member Functions | Protected Attributes | List of all members
Library::Container Class Referenceabstract

Friends

class PluginHandler
 

Public Member Functions

 Container (QObject *parent=nullptr)
 
virtual QString name () const =0
 Should return an untranslated name used for identifying this widget. More...
 
virtual QString display_name () const
 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
 
virtual QPixmap icon () const =0
 
virtual QMenu * menu ()
 return actions menu (may be nullptr). The title does not have to be set More...
 
void set_menu_action (QAction *action)
 sets the action member field used in the player menu bar. This is called by the player if the language has changed More...
 
QAction * menu_action () const
 get the action in the player menubar. More...
 
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...
 
virtual void show ()
 
virtual void hide ()
 

Protected Attributes

Settings_settings =nullptr
 

Member Function Documentation

§ display_name()

virtual QString Library::Container::display_name ( ) const
virtual

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

Returns
display name

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

§ is_initialized()

bool Library::Container::is_initialized ( ) const

tests, if the ui already has been initialized

Returns
true if ui has been initialized, false else

§ menu()

virtual QMenu* Library::Container::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 SomaFM::LibraryContainer, SC::LibraryContainer, LocalLibraryContainer, and EmptyLibraryContainer.

§ menu_action()

QAction* Library::Container::menu_action ( ) const

get the action in the player menubar.

Returns
pointer to action field

§ name()

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

Should return an untranslated name used for identifying this widget.

Returns
name

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

§ set_menu_action()

void Library::Container::set_menu_action ( QAction *  action)

sets the action member field used in the player menu bar. This is called by the player if the language has changed

Parameters
actionthe new translated action

§ widget()

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

Should return the UI for the library view.

Returns
pointer to the ui

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

Inheritance diagram for Library::Container:
SayonaraClass EmptyLibraryContainer Library::DirectoryContainer LocalLibraryContainer SC::LibraryContainer SomaFM::LibraryContainer