Sayonara Player
AbstractLibraryContainer.h
1 #ifndef CONTAINERINTERFACE_H
2 #define CONTAINERINTERFACE_H
3 
4 class QWidget;
5 class QFrame;
6 class QPixmap;
7 class QMenu;
8 class QAction;
9 
10 #include <QObject>
11 
12 namespace Library
13 {
20  {
21  public:
22 
23  virtual ~AbstractContainer()=default;
28  virtual QString name() const=0;
29 
30  virtual void rename(const QString& newName)=0;
31 
36  virtual QString displayName() const=0;
37 
42  virtual QWidget* widget() const=0;
43 
49  virtual QFrame* header() const=0;
50 
55  virtual QMenu* menu()=0;
56 
62  virtual QPixmap icon() const=0;
63 
67  virtual void init()=0;
68 
75  virtual bool isLocal() const=0;
76  };
77 }
78 
80 Q_DECLARE_INTERFACE(LibraryContainerInterface, "com.sayonara-player.library")
81 
82 #endif // CONTAINERINTERFACE_H
Library::AbstractContainer::icon
virtual QPixmap icon() const =0
Every library should show a icon in the combo box.
Library::AbstractContainer::isLocal
virtual bool isLocal() const =0
a local library is a library which writes to the library field of the database. This should be false ...
Library::AbstractContainer::init
virtual void init()=0
init
Library::AbstractContainer::menu
virtual QMenu * menu()=0
return actions menu (may be nullptr). The title does not have to be set
Library::AbstractContainer::widget
virtual QWidget * widget() const =0
Should return the UI for the library view.
Library::AbstractContainer
This container is only used internally to avoid Ui dependencies in the Components....
Definition: AbstractLibraryContainer.h:20
Library::AbstractContainer::displayName
virtual QString displayName() const =0
Should return the translated name displayed in the library view combobox.
Library
An interface class needed when implementing a library plugin.
Definition: LocalLibraryWatcher.h:31
Library::AbstractContainer::header
virtual QFrame * header() const =0
this is a frame at the top left of the container where the combo box will be located
Library::AbstractContainer::name
virtual QString name() const =0
Should return an untranslated name used for identifying this widget.