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