summaryrefslogtreecommitdiffstats
path: root/src/widget/wcoverartlabel.h
blob: b001adcbaf05a777dae65a141d495fe1a6363eae (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
#ifndef WCOVERARTLABEL_H
#define WCOVERARTLABEL_H

#include <QLabel>
#include <QMouseEvent>
#include <QWidget>
#include <QPixmap>

#include "widget/wcoverartmenu.h"

class DlgCoverArtFullSize;

class WCoverArtLabel : public QLabel {
    Q_OBJECT
  public:
    WCoverArtLabel(QWidget* parent = 0);
    virtual ~WCoverArtLabel();

    void setCoverArt(const QString& trackLocation, const CoverInfo& coverInfo, QPixmap px);

  signals:
    void coverArtSelected(const CoverArt& art);
    void reloadCoverArt();

  protected:
    void leaveEvent(QEvent*);
    void mousePressEvent(QMouseEvent* event);

  private slots:
      void slotCoverMenu(const QPoint& pos);

  private:
    CoverInfo m_coverInfo;
    WCoverArtMenu* m_pCoverMenu;
    DlgCoverArtFullSize* m_pDlgFullSize;
    QPixmap m_defaultCover;
};

#endif // WCOVERARTLABEL_H