-
Notifications
You must be signed in to change notification settings - Fork 10
/
mainwindow.h
82 lines (74 loc) · 2.08 KB
/
mainwindow.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include "form.h"
#include "ui_form.h"
#include <QMainWindow>
#include <QNetworkAccessManager>
#include <QMediaPlayer>
#include <QStandardItemModel>
#include <QLabel>
#include <QPushButton>
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
protected:
void closeEvent(QCloseEvent *event);
private:
Ui::MainWindow *ui;
QNetworkAccessManager *NAM;
QString downloadPath, sstyle, guid;
QMediaPlayer *player;
QLabel *label_lyric,*label_cover;
Form *desktopLyric;
QDialog *dialog_settings;
QLineEdit *lineEditDownloadPath;
QPushButton *pushButton_fontcolor;
QPixmap pixmap_cover;
int page;
struct Lyric{
QTime time;
QString sentence;
};
QList<Lyric> lyrics;
void getKey();
QString readSettings(QString path,QString group, QString key);
void writeSettings(QString path, QString group, QString key, QString value);
void toplist();
private slots:
void on_action_directory_triggered();
void on_action_settings_triggered();
void on_action_about_triggered();
void on_pushButton_pageLast_clicked();
void on_pushButton_pageNext_clicked();
void on_pushButton_play_clicked();
void on_pushButton_skipf_clicked();
void on_pushButton_skipb_clicked();
void on_pushButton_cover_clicked();
void on_pushButton_lyric_clicked();
void on_pushButton_download_clicked();
void on_pushButton_fullscreen_clicked();
void initSearch();
void search();
void copy(int,int);
void playSong(int,int);
void positionChange(qint64);
void durationChange(qint64);
void setSTime(int);
void setMPPosition();
void stateChange(QMediaPlayer::State);
void updateProgress(qint64, qint64);
void chooseFont();
void chooseFontColor();
void chooseDownloadPath();
void replyAlbumPixmap(QNetworkReply *reply);
void replyLyrics(QNetworkReply *reply);
void enterFullscreen();
void exitFullscreen();
};
#endif // MAINWINDOW_H