blob: 91bee950e2d29158e4f5e1971fa53d9061ee658a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
#ifndef WCOVERARTMENU_H
#define WCOVERARTMENU_H
#include <QAction>
#include <QMenu>
#include <QWidget>
#include <QPixmap>
#include "track/track.h"
#include "library/coverart.h"
// This class implements a context-menu with all CoverArt user actions. Callers
// must call setCoverArt before calling exec or popup. This class does
// not change the database -- it emits a coverArtSelected signal when the user
// performs an action. It is up to the parent to decide how to handle the
// action.
class WCoverArtMenu : public QMenu {
Q_OBJECT
public:
explicit WCoverArtMenu(QWidget *parent = nullptr);
~WCoverArtMenu() override;
void setCoverArt(const CoverInfo& coverInfo);
signals:
void coverInfoSelected(const CoverInfo& coverInfo);
void reloadCoverArt();
private slots:
void slotChange();
void slotUnset();
private:
void createActions();
QAction* m_pChange;
QAction* m_pReload;
QAction* m_pUnset;
CoverInfo m_coverInfo;
};
#endif // WCOVERARTMENU_H
|