-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmylrc.h
57 lines (47 loc) · 1.19 KB
/
mylrc.h
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
53
54
55
56
57
#ifndef MYLRC_H
#define MYLRC_H
#include <QLabel>
#include<QDialog>
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QNetworkRequest>
class QTimer;
class QAction;
class MyLrc : public QDialog
{
Q_OBJECT
public:
explicit MyLrc(QWidget *parent = 0);
void start_lrc_mask(qint64 intervaltime);
void stop_lrc_mask();
void setMusicInfo(QString name, QString filepath);
QLabel *label;
signals:
void changeselect(bool);
public slots:
private slots:
void timeout();
void downloadLrc();
void replyFinished(QNetworkReply *reply);
private:
QLabel *labelmask;
QLinearGradient linear_gradient;
QLinearGradient mask_linear_gradient;
QFont font;
QTimer *timer;
qreal lrc_mask_width;
qreal lrc_mask_width_interval;
QPoint offset;
QAction *actionUpdateLrc;
QNetworkAccessManager *network_manager;
QNetworkRequest *network_request;
QString m_strName;
QString m_strPath;
protected:
void paintEvent(QPaintEvent *);
void mousePressEvent(QMouseEvent *ev);
void mouseMoveEvent(QMouseEvent *ev);
void contextMenuEvent(QContextMenuEvent *ev);
bool eventFilter(QObject *, QEvent *);
};
#endif // MYLRC_H