blob: 7b168e8dca6c816de9a94effb0088ee30ad56f6a (
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
44
45
46
47
48
49
50
51
52
|
#pragma once
#include <QDialog>
#include <QPoint>
#include <QTimer>
#include "library/coverart.h"
#include "library/ui_dlgcoverartfullsize.h"
#include "mixer/basetrackplayer.h"
#include "track/track_decl.h"
#include "util/parented_ptr.h"
#include "widget/wcoverartmenu.h"
class DlgCoverArtFullSize
: public QDialog,
public Ui::DlgCoverArtFullSize {
Q_OBJECT
public:
explicit DlgCoverArtFullSize(QWidget* parent, BaseTrackPlayer* pPlayer = nullptr);
~DlgCoverArtFullSize() override = default;
void init(TrackPointer pTrack);
void mousePressEvent(QMouseEvent* event) override;
void mouseReleaseEvent(QMouseEvent* ) override;
void mouseMoveEvent(QMouseEvent* ) override;
void resizeEvent(QResizeEvent* event) override;
void wheelEvent(QWheelEvent* event) override;
public slots:
void slotLoadTrack(TrackPointer);
void slotCoverFound(
const QObject* pRequestor,
const CoverInfo& coverInfo,
const QPixmap& pixmap,
quint16 requestedHash,
bool coverInfoUpdated);
void slotTrackCoverArtUpdated();
// slots that handle signals from WCoverArtMenu
void slotCoverMenu(const QPoint& pos);
void slotCoverInfoSelected(const CoverInfoRelative& coverInfo);
void slotReloadCoverArt();
private:
QPixmap m_pixmap;
TrackPointer m_pLoadedTrack;
BaseTrackPlayer* m_pPlayer;
parented_ptr<WCoverArtMenu> m_pCoverMenu;
QTimer m_clickTimer;
QPoint m_dragStartPosition;
bool m_coverPressed;
};
|