-
Notifications
You must be signed in to change notification settings - Fork 99
/
lyricwidget.h
51 lines (42 loc) · 1 KB
/
lyricwidget.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
#ifndef LYRICWIDGET_H
#define LYRICWIDGET_H
#include <QWidget>
#include "libs/qlyricparser.h"
#include <QTime>
#include <QLabel>
#include "ui_lyricwidget.h"
#include <QMouseEvent>
#include "libs/doubanfm.h"
#include "libs/lyricgetter.h"
#include "libs/douban_types.h"
class LyricWidget : public QWidget
{
Q_OBJECT
public:
explicit LyricWidget(QWidget *parent = 0);
~LyricWidget();
void clear();
void mousePressEvent(QMouseEvent *event);
signals:
void clicked();
public slots:
void setTick(qint64 tick);
void setTime(const QTime& time);
void setLyric(const QLyricList& lyric);
void setSong(const DoubanFMSong& song);
void setShowing(bool);
private:
Ui_LyricWidget *ui;
QWidget *animWidget;
int curInd;
QLyricList lyric;
QList<QLabel *> labels;
QList<int> heights;
bool firstShowing;
LyricGetter *lyricGetter;
bool isShowing;
DoubanFMSong saveCurrentSong;
bool haveSearchedLyric;
qint64 saveTick;
};
#endif // LYRICWIDGET_H