├── 1.html ├── QQMusic.pro ├── QQMusic.pro.user ├── controlwidget.cpp ├── controlwidget.h ├── images ├── Item │ ├── computer.png │ ├── heart.png │ ├── history.png │ ├── listen.png │ ├── love.png │ ├── menu.png │ ├── mobile.png │ ├── music.png │ ├── set.png │ ├── star.png │ └── video.png ├── PlayControl │ ├── down.png │ ├── down_hover.png │ ├── download.png │ ├── download_hover.png │ ├── left.png │ ├── left_click.png │ ├── left_hover.png │ ├── loop.png │ ├── loop1.png │ ├── loop1_hover.png │ ├── loop_hover.png │ ├── love_empty.png │ ├── love_full.png │ ├── lrc.png │ ├── lrc_hover.png │ ├── menu.png │ ├── menu_hover.png │ ├── pause.png │ ├── pause_click.png │ ├── pause_hover.png │ ├── play.png │ ├── play_click.png │ ├── play_hover.png │ ├── random.png │ ├── random_hover.png │ ├── right.png │ ├── right_click.png │ ├── right_hover.png │ ├── volume.png │ └── volume_hover.png ├── QSS │ ├── center.qss │ ├── check.qss │ ├── introWidget.qss │ ├── list.qss │ └── style.qss ├── TrayMenu │ ├── ilike_click.png │ ├── ilike_hover.png │ ├── ilike_normal.png │ ├── ilikedisable.png │ ├── list_circulation_hover.png │ ├── list_circulation_normal.png │ ├── lyric.png │ ├── next_click.png │ ├── next_hover.png │ ├── next_normal.png │ ├── pause_click.png │ ├── pause_hover.png │ ├── pause_normal.png │ ├── play_click.png │ ├── play_hover.png │ ├── play_normal.png │ ├── pre_click.png │ ├── pre_hover.png │ ├── pre_normal.png │ ├── progress │ │ ├── progress_bar.gft │ │ ├── progress_bg.gft │ │ └── progress_thumb_normal.png │ ├── quit.png │ ├── random_hover.png │ ├── random_normal.png │ ├── sequence_hover.png │ ├── sequence_normal.png │ ├── set.png │ ├── song_circulation_hover.png │ ├── song_circulation_normal.png │ ├── volume_large.png │ ├── volume_mute.png │ ├── volume_normal.png │ └── volume_zero.png ├── center │ ├── 01.png │ ├── 02.png │ ├── 03.png │ ├── 04.png │ ├── 05.png │ ├── 06.png │ ├── 07.png │ ├── 08.png │ ├── add.png │ ├── download.png │ ├── information.png │ ├── loading1.png │ ├── loading2.png │ ├── loading3.png │ ├── loading4.png │ ├── mylovePic.png │ └── play.png ├── img.qrc ├── logo.png ├── off.png ├── on.png ├── qqmusic.ico ├── title │ ├── close.png │ ├── close_hover.png │ ├── close_pressed.png │ ├── cloud.png │ ├── cloud_hover.png │ ├── mail.png │ ├── mail_hover.png │ ├── menu.png │ ├── menu_hover.png │ ├── min.png │ ├── min_arrow.png │ ├── min_arrow_hover.png │ ├── min_hover.png │ ├── min_pressed.png │ ├── pin.png │ ├── search.png │ ├── skin.png │ ├── skin_hover.png │ ├── vip.png │ └── vip_hover.png ├── yuan.png └── 新建文件夹 │ ├── left.png │ ├── left_hover.png │ ├── pause.png │ ├── pause_hover.png │ ├── play.png │ ├── play_hover.png │ ├── right.png │ └── right_hover.png ├── localmusicwidget.cpp ├── localmusicwidget.h ├── main.cpp ├── mainwidget.cpp ├── mainwidget.h ├── mylovewidget.cpp ├── mylovewidget.h ├── mypushbutton.cpp ├── mypushbutton.h ├── playhistorywidget.cpp ├── playhistorywidget.h ├── playlistwidget.cpp ├── playlistwidget.h ├── searchwidget.cpp ├── searchwidget.h ├── showlrcwidget.cpp ├── showlrcwidget.h ├── titlebar.cpp ├── titlebar.h ├── trylistenwidget.cpp ├── trylistenwidget.h ├── 主界面截图.png └── 音乐api ├── QQ音乐.txt ├── QQ音乐2.txt ├── 百度音乐api.txt ├── 百度音乐解析流程.txt └── 虾米音乐api.txt /1.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/1.html -------------------------------------------------------------------------------- /QQMusic.pro: -------------------------------------------------------------------------------- 1 | #------------------------------------------------- 2 | # 3 | # Project created by QtCreator 2016-12-30T16:01:32 4 | # 5 | #------------------------------------------------- 6 | 7 | QT += core gui multimedia multimediawidgets script 8 | 9 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 10 | TARGET = QQMusic 11 | TEMPLATE = app 12 | RC_ICONS = ./images/qqmusic.ico 13 | RESOURCES += ./images/img.qrc 14 | INCLUDEPATH += F:/OpenCV/opencv/build/include/opencv2 F:/OpenCV/opencv/build/include/opencv F:/OpenCV/opencv/build/include 15 | LIBS += -LF:/OpenCV/opencv/build/x86/vc12/lib/ -lopencv_highgui248 -lopencv_core248 -lopencv_imgproc248 16 | 17 | SOURCES += main.cpp\ 18 | mainwidget.cpp \ 19 | titlebar.cpp \ 20 | mypushbutton.cpp \ 21 | controlwidget.cpp \ 22 | playlistwidget.cpp \ 23 | trylistenwidget.cpp \ 24 | mylovewidget.cpp \ 25 | playhistorywidget.cpp \ 26 | localmusicwidget.cpp \ 27 | searchwidget.cpp \ 28 | showlrcwidget.cpp 29 | 30 | HEADERS += mainwidget.h \ 31 | titlebar.h \ 32 | mypushbutton.h \ 33 | controlwidget.h \ 34 | playlistwidget.h \ 35 | trylistenwidget.h \ 36 | mylovewidget.h \ 37 | playhistorywidget.h \ 38 | localmusicwidget.h \ 39 | searchwidget.h \ 40 | showlrcwidget.h 41 | -------------------------------------------------------------------------------- /QQMusic.pro.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | EnvironmentId 7 | {1164d177-5296-4c75-81be-1f82f10a38f9} 8 | 9 | 10 | ProjectExplorer.Project.ActiveTarget 11 | 0 12 | 13 | 14 | ProjectExplorer.Project.EditorSettings 15 | 16 | true 17 | false 18 | true 19 | 20 | Cpp 21 | 22 | CppGlobal 23 | 24 | 25 | 26 | QmlJS 27 | 28 | QmlJSGlobal 29 | 30 | 31 | 2 32 | UTF-8 33 | false 34 | 4 35 | false 36 | 80 37 | true 38 | true 39 | 1 40 | true 41 | false 42 | 0 43 | true 44 | true 45 | 0 46 | 8 47 | true 48 | 1 49 | true 50 | true 51 | true 52 | false 53 | 54 | 55 | 56 | ProjectExplorer.Project.PluginSettings 57 | 58 | 59 | 60 | ProjectExplorer.Project.Target.0 61 | 62 | qtStatic 63 | qtStatic 64 | {4b293171-d801-4ca8-8b75-2121a31b9a8e} 65 | 1 66 | 0 67 | 0 68 | 69 | C:/Users/Lenovo/Desktop/build-QQMusic-qtStatic-Debug 70 | 71 | 72 | true 73 | qmake 74 | 75 | QtProjectManager.QMakeBuildStep 76 | true 77 | 78 | false 79 | false 80 | false 81 | 82 | 83 | true 84 | Make 85 | 86 | Qt4ProjectManager.MakeStep 87 | 88 | false 89 | 90 | 91 | 92 | 2 93 | 构建 94 | 95 | ProjectExplorer.BuildSteps.Build 96 | 97 | 98 | 99 | true 100 | Make 101 | 102 | Qt4ProjectManager.MakeStep 103 | 104 | true 105 | clean 106 | 107 | 108 | 1 109 | 清理 110 | 111 | ProjectExplorer.BuildSteps.Clean 112 | 113 | 2 114 | false 115 | 116 | Debug 117 | 118 | Qt4ProjectManager.Qt4BuildConfiguration 119 | 2 120 | true 121 | 122 | 123 | C:/Users/Lenovo/Desktop/build-QQMusic-qtStatic-Release 124 | 125 | 126 | true 127 | qmake 128 | 129 | QtProjectManager.QMakeBuildStep 130 | false 131 | 132 | false 133 | false 134 | false 135 | 136 | 137 | true 138 | Make 139 | 140 | Qt4ProjectManager.MakeStep 141 | 142 | false 143 | 144 | 145 | 146 | 2 147 | 构建 148 | 149 | ProjectExplorer.BuildSteps.Build 150 | 151 | 152 | 153 | true 154 | Make 155 | 156 | Qt4ProjectManager.MakeStep 157 | 158 | true 159 | clean 160 | 161 | 162 | 1 163 | 清理 164 | 165 | ProjectExplorer.BuildSteps.Clean 166 | 167 | 2 168 | false 169 | 170 | Release 171 | 172 | Qt4ProjectManager.Qt4BuildConfiguration 173 | 0 174 | true 175 | 176 | 177 | C:/Users/Lenovo/Desktop/build-QQMusic-qtStatic-Profile 178 | 179 | 180 | true 181 | qmake 182 | 183 | QtProjectManager.QMakeBuildStep 184 | true 185 | 186 | false 187 | true 188 | false 189 | 190 | 191 | true 192 | Make 193 | 194 | Qt4ProjectManager.MakeStep 195 | 196 | false 197 | 198 | 199 | 200 | 2 201 | 构建 202 | 203 | ProjectExplorer.BuildSteps.Build 204 | 205 | 206 | 207 | true 208 | Make 209 | 210 | Qt4ProjectManager.MakeStep 211 | 212 | true 213 | clean 214 | 215 | 216 | 1 217 | 清理 218 | 219 | ProjectExplorer.BuildSteps.Clean 220 | 221 | 2 222 | false 223 | 224 | Profile 225 | 226 | Qt4ProjectManager.Qt4BuildConfiguration 227 | 0 228 | true 229 | 230 | 3 231 | 232 | 233 | 0 234 | 部署 235 | 236 | ProjectExplorer.BuildSteps.Deploy 237 | 238 | 1 239 | 在本地部署 240 | 241 | ProjectExplorer.DefaultDeployConfiguration 242 | 243 | 1 244 | 245 | 246 | false 247 | false 248 | 1000 249 | 250 | true 251 | 252 | false 253 | false 254 | false 255 | false 256 | true 257 | 0.01 258 | 10 259 | true 260 | 1 261 | 25 262 | 263 | 1 264 | true 265 | false 266 | true 267 | valgrind 268 | 269 | 0 270 | 1 271 | 2 272 | 3 273 | 4 274 | 5 275 | 6 276 | 7 277 | 8 278 | 9 279 | 10 280 | 11 281 | 12 282 | 13 283 | 14 284 | 285 | 2 286 | 287 | QQMusic 288 | 289 | Qt4ProjectManager.Qt4RunConfiguration:C:/Users/Lenovo/Desktop/QQMusic/QQMusic.pro 290 | true 291 | 292 | QQMusic.pro 293 | false 294 | 295 | 296 | 3768 297 | false 298 | true 299 | false 300 | false 301 | true 302 | 303 | 1 304 | 305 | 306 | 307 | ProjectExplorer.Project.TargetCount 308 | 1 309 | 310 | 311 | ProjectExplorer.Project.Updater.FileVersion 312 | 18 313 | 314 | 315 | Version 316 | 18 317 | 318 | 319 | -------------------------------------------------------------------------------- /controlwidget.cpp: -------------------------------------------------------------------------------- 1 | #include "controlwidget.h" 2 | #include 3 | #include 4 | ControlWidget::ControlWidget(QWidget *parent) : QWidget(parent) 5 | ,m_proPos(0) 6 | { 7 | setFixedHeight(55); 8 | QPalette pal(palette()); 9 | pal.setColor(QPalette::Background,QColor(60,60,60)); 10 | setPalette(pal); 11 | setAutoFillBackground(true); 12 | QPalette text_palette(palette()); 13 | text_palette.setColor(QPalette::WindowText, QColor(220, 220, 220)); 14 | setPalette(text_palette); 15 | 16 | leftBtn=new MyPushButton; 17 | playBtn=new MyPushButton; 18 | rightBtn=new MyPushButton; 19 | downloadBtn=new MyPushButton; 20 | volumeBtn=new MyPushButton; 21 | loopBtn=new MyPushButton; 22 | menuBtn=new MyPushButton; 23 | lrcBtn=new MyPushButton; 24 | 25 | leftBtn->setPicName(":/playControl/left"); 26 | playBtn->setPicName(":/playControl/play"); 27 | rightBtn->setPicName(":/playControl/right"); 28 | downloadBtn->setPicName(":/playControl/download"); 29 | volumeBtn->setPicName(":/playControl/volume"); 30 | loopBtn->setPicName(":/playControl/loop"); 31 | menuBtn->setPicName(":/playControl/menu"); 32 | lrcBtn->setPicName(":/playControl/lrc"); 33 | 34 | loveBtn=new QCheckBox; 35 | loveBtn->setStyleSheet(GetQss(":/qss/check")); 36 | 37 | albumnLabel=new QLabel; 38 | albumnLabel->setFixedSize(40, 40); 39 | albumnLabel->setScaledContents(true);//设置自动缩放 40 | albumnLabel->setPixmap(QPixmap(tr(":/logo"))); 41 | textTimeLabel=new QLabel("00:00 / 00:00"); 42 | songNameLabel=new QLabel("QQ音乐,听我想听的歌",this); 43 | songNameLabel->setGeometry(230,6,250,20); 44 | 45 | progressBar=new QSlider;//播放进度的进度条 46 | progressBar->setObjectName("progress"); 47 | progressBar->setValue(0); 48 | progressBar->setFixedWidth(450); 49 | progressBar->setOrientation(Qt::Horizontal); 50 | progressBar->setStyleSheet(GetQss(":/qss/style")); 51 | timer=new QTimer(this); 52 | connect(timer,SIGNAL(timeout()),this,SLOT(UpdateProgress())); 53 | 54 | QHBoxLayout *lay=new QHBoxLayout(this); 55 | lay->setSpacing(15); 56 | lay->setContentsMargins(20,10,20,0); 57 | lay->addWidget(leftBtn); 58 | lay->addWidget(playBtn); 59 | lay->addWidget(rightBtn); 60 | lay->addStretch(); 61 | lay->addWidget(albumnLabel); 62 | lay->addWidget(progressBar); 63 | lay->addWidget(textTimeLabel); 64 | lay->addStretch(); 65 | 66 | lay->addSpacing(30); 67 | lay->addWidget(loveBtn); 68 | lay->addWidget(downloadBtn); 69 | lay->addWidget(volumeBtn); 70 | lay->addWidget(lrcBtn); 71 | lay->addWidget(loopBtn); 72 | lay->addWidget(menuBtn); 73 | 74 | connect(volumeBtn,SIGNAL(clicked()),this,SIGNAL(ShowVolume())); 75 | connect(playBtn,SIGNAL(clicked()),this,SLOT(PlayBtnClicked())); 76 | 77 | connect(progressBar,SIGNAL(sliderReleased()),this,SLOT(ProgressChanged())); 78 | connect(lrcBtn,SIGNAL(clicked()),this,SIGNAL(ShowLrc())); 79 | connect(downloadBtn,SIGNAL(clicked()),this,SIGNAL(DownLoad())); 80 | } 81 | 82 | ControlWidget::~ControlWidget() 83 | { 84 | 85 | } 86 | void ControlWidget::PlayBtnClicked() 87 | { 88 | if(playBtn->getPicName()==":/playControl/play") 89 | { 90 | playBtn->setPicName(":/playControl/pause"); 91 | timer->start(); 92 | } 93 | else 94 | { 95 | playBtn->setPicName(":/playControl/play"); 96 | timer->stop(); 97 | } 98 | emit PlayPause(); 99 | } 100 | void ControlWidget::RestartProgressBar() 101 | { 102 | m_proPos=0; 103 | progressBar->setValue(0); 104 | timer->start(1000); 105 | } 106 | void ControlWidget::UpdateProgress() 107 | { 108 | m_proPos++; 109 | if(m_proPos >= progressBar->maximum()) 110 | { 111 | m_proPos=0; 112 | progressBar->setValue(0); 113 | textTimeLabel->setText("00:00 / 00:00"); 114 | songNameLabel->setText(tr("QQ音乐,听我想听的歌")); 115 | playBtn->setPicName(":/playControl/play"); 116 | update(); 117 | timer->stop(); 118 | return; 119 | } 120 | progressBar->setValue(m_proPos); 121 | int h=m_proPos/60; 122 | int m=m_proPos%60; 123 | QString str; 124 | int max= progressBar->maximum(); 125 | str.sprintf("%02d:%02d / %02d:%02d",h,m,max/60,max%60); 126 | textTimeLabel->setText(str); 127 | } 128 | void ControlWidget::ProgressChanged() 129 | { 130 | int pos=progressBar->value(); 131 | m_proPos=pos; 132 | emit ProgressUpdate(pos); 133 | } 134 | -------------------------------------------------------------------------------- /controlwidget.h: -------------------------------------------------------------------------------- 1 | #ifndef CONTROLWIDGET_H 2 | #define CONTROLWIDGET_H 3 | 4 | #include 5 | #include"mypushbutton.h" 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | class ControlWidget : public QWidget 12 | { 13 | Q_OBJECT 14 | public: 15 | explicit ControlWidget(QWidget *parent = 0); 16 | ~ControlWidget(); 17 | QString GetQss(const QString &path) 18 | { 19 | QString content; 20 | QFile qss(path); 21 | qss.open(QFile::ReadOnly); 22 | content=qss.readAll(); 23 | qss.close(); 24 | return content; 25 | } 26 | void RestartProgressBar(); 27 | int m_proPos; 28 | QTimer *timer; 29 | 30 | public: 31 | MyPushButton *leftBtn,*playBtn,*rightBtn,*downloadBtn,*playModeBtn,*volumeBtn,*loopBtn,*menuBtn,*lrcBtn; 32 | QCheckBox *loveBtn; 33 | QSlider *progressBar; 34 | QLabel *albumnLabel; 35 | QLabel *textTimeLabel,*songNameLabel; 36 | 37 | signals: 38 | void ShowVolume(); 39 | void PlayPause(); 40 | void ProgressUpdate(int); 41 | void ShowLrc(); 42 | void DownLoad(); 43 | public slots: 44 | void PlayBtnClicked(); 45 | void UpdateProgress(); 46 | void ProgressChanged(); 47 | 48 | }; 49 | 50 | #endif // CONTROLWIDGET_H 51 | -------------------------------------------------------------------------------- /images/Item/computer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/Item/computer.png -------------------------------------------------------------------------------- /images/Item/heart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/Item/heart.png -------------------------------------------------------------------------------- /images/Item/history.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/Item/history.png -------------------------------------------------------------------------------- /images/Item/listen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/Item/listen.png -------------------------------------------------------------------------------- /images/Item/love.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/Item/love.png -------------------------------------------------------------------------------- /images/Item/menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/Item/menu.png -------------------------------------------------------------------------------- /images/Item/mobile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/Item/mobile.png -------------------------------------------------------------------------------- /images/Item/music.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/Item/music.png -------------------------------------------------------------------------------- /images/Item/set.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/Item/set.png -------------------------------------------------------------------------------- /images/Item/star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/Item/star.png -------------------------------------------------------------------------------- /images/Item/video.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/Item/video.png -------------------------------------------------------------------------------- /images/PlayControl/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/PlayControl/down.png -------------------------------------------------------------------------------- /images/PlayControl/down_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/PlayControl/down_hover.png -------------------------------------------------------------------------------- /images/PlayControl/download.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/PlayControl/download.png -------------------------------------------------------------------------------- /images/PlayControl/download_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/PlayControl/download_hover.png -------------------------------------------------------------------------------- /images/PlayControl/left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/PlayControl/left.png -------------------------------------------------------------------------------- /images/PlayControl/left_click.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/PlayControl/left_click.png -------------------------------------------------------------------------------- /images/PlayControl/left_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/PlayControl/left_hover.png -------------------------------------------------------------------------------- /images/PlayControl/loop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/PlayControl/loop.png -------------------------------------------------------------------------------- /images/PlayControl/loop1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/PlayControl/loop1.png -------------------------------------------------------------------------------- /images/PlayControl/loop1_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/PlayControl/loop1_hover.png -------------------------------------------------------------------------------- /images/PlayControl/loop_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/PlayControl/loop_hover.png -------------------------------------------------------------------------------- /images/PlayControl/love_empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/PlayControl/love_empty.png -------------------------------------------------------------------------------- /images/PlayControl/love_full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/PlayControl/love_full.png -------------------------------------------------------------------------------- /images/PlayControl/lrc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/PlayControl/lrc.png -------------------------------------------------------------------------------- /images/PlayControl/lrc_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/PlayControl/lrc_hover.png -------------------------------------------------------------------------------- /images/PlayControl/menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/PlayControl/menu.png -------------------------------------------------------------------------------- /images/PlayControl/menu_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/PlayControl/menu_hover.png -------------------------------------------------------------------------------- /images/PlayControl/pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/PlayControl/pause.png -------------------------------------------------------------------------------- /images/PlayControl/pause_click.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/PlayControl/pause_click.png -------------------------------------------------------------------------------- /images/PlayControl/pause_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/PlayControl/pause_hover.png -------------------------------------------------------------------------------- /images/PlayControl/play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/PlayControl/play.png -------------------------------------------------------------------------------- /images/PlayControl/play_click.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/PlayControl/play_click.png -------------------------------------------------------------------------------- /images/PlayControl/play_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/PlayControl/play_hover.png -------------------------------------------------------------------------------- /images/PlayControl/random.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/PlayControl/random.png -------------------------------------------------------------------------------- /images/PlayControl/random_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/PlayControl/random_hover.png -------------------------------------------------------------------------------- /images/PlayControl/right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/PlayControl/right.png -------------------------------------------------------------------------------- /images/PlayControl/right_click.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/PlayControl/right_click.png -------------------------------------------------------------------------------- /images/PlayControl/right_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/PlayControl/right_hover.png -------------------------------------------------------------------------------- /images/PlayControl/volume.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/PlayControl/volume.png -------------------------------------------------------------------------------- /images/PlayControl/volume_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/PlayControl/volume_hover.png -------------------------------------------------------------------------------- /images/QSS/center.qss: -------------------------------------------------------------------------------- 1 | QLabel 2 | { 3 | color:rgb(80,80,80); 4 | font-size:20px; 5 | font-weight:500; 6 | } 7 | QPushButton 8 | { 9 | border:1px solid rgb(160,160,160); 10 | width:100px; 11 | height:28px; 12 | color:rgb(60,60,60); 13 | } 14 | QPushButton:hover 15 | { 16 | border:1px solid rgb(0,204,102); 17 | width:100px; 18 | height:35px; 19 | color:rgb(160,160,160); 20 | } 21 | QPushButton:pressed 22 | { 23 | border:1px solid rgb(0,160,50); 24 | background-color:rgb(200,230,200); 25 | width:100px; 26 | height:35px; 27 | color:rgb(60,60,60); 28 | } 29 | QLineEdit 30 | { 31 | border-radius:12px; 32 | border:1px solid rgb (220,220,200); 33 | height:28px; 34 | width:50px; 35 | } 36 | QTableWidget{ 37 | color: white; 38 | gridline-color: white; 39 | background: #2c2c2d;\ 40 | alternate-background: #3A3A3C; 41 | selection-color: red; 42 | selection-background-color: #595a5c; 43 | border: 2px groove gray; 44 | border-radius: 0px; 45 | padding: 2px 4px; 46 | } 47 | QScrollBar{ 48 | background:rgb(80,80,80); height:10px; 49 | } 50 | QScrollBar{ 51 | background:red; width:10px; 52 | } 53 | -------------------------------------------------------------------------------- /images/QSS/check.qss: -------------------------------------------------------------------------------- 1 | QCheckBox{ 2 | spacing: 2px; 3 | color: white; 4 | } 5 | QCheckBox::indicator { 6 | width: 45px; 7 | height: 30px; 8 | } 9 | QCheckBox::indicator:unchecked { 10 | image: url(:/playControl/love_empty); 11 | } 12 | QCheckBox::indicator:unchecked:hover { 13 | image: url(:/playControl/love_empty); 14 | } 15 | QCheckBox::indicator:unchecked:pressed { 16 | image: url(::/playControl/love_empty); 17 | } 18 | QCheckBox::indicator:checked { 19 | image: url(:/playControl/love_full); 20 | } 21 | QCheckBox::indicator:checked:hover { 22 | image: url(:/playControl/love_full); 23 | } 24 | QCheckBox::indicator:checked:pressed { 25 | image: url(:/playControl/love_empty); 26 | } 27 | 28 | QCheckBox#loop{ 29 | spacing: 2px; 30 | color: white; 31 | } 32 | QCheckBox#loop::indicator { 33 | width: 45px; 34 | height: 30px; 35 | } 36 | QCheckBox#loop::indicator:unchecked { 37 | image: url(:/playControl/loop); 38 | } 39 | QCheckBox#loop::indicator:unchecked:hover { 40 | image: url(:/playControl/loop); 41 | } 42 | QCheckBox#loop::indicator:pressed { 43 | image: url(:/playControl/loop); 44 | } 45 | QCheckBox#loop::indicator:checked { 46 | image: url(:/playControl/loop1); 47 | } 48 | QCheckBox#loop::indicator:checked:hover { 49 | image: url(:/playControl/loop1); 50 | } 51 | QCheckBox#loop::indicator:checked:pressed { 52 | image: url(:/playControl/loop1); 53 | } 54 | QCheckBox#loop::indicator:partiallychecked { 55 | image: url(:/playControl/random); 56 | } 57 | QCheckBox#loop::indicator:partiallychecked:hover { 58 | image: url(:/playControl/random); 59 | } 60 | QCheckBox#loop::indicator:partiallychecked:pressed { 61 | image: url(:/playControl/random); 62 | } 63 | 64 | -------------------------------------------------------------------------------- /images/QSS/introWidget.qss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/QSS/introWidget.qss -------------------------------------------------------------------------------- /images/QSS/list.qss: -------------------------------------------------------------------------------- 1 | QListWidget 2 | { 3 | border:0px; 4 | background:rgb(240,240,240); 5 | border-right:1px solid rgb(220,220,200); 6 | } 7 | QListWidget::item{ 8 | border: 0px solid #33CCFF; 9 | color:rgb(80,80,80); 10 | padding:0px; 11 | margin:0px; 12 | height:30px; 13 | } 14 | QListWidget::item:hover { 15 | border: 0px solid #33CCFF; 16 | border:none; 17 | background: rgb(220,220,220); 18 | padding:0px; 19 | margin:0px; 20 | } 21 | QListWidget::item:selected { 22 | border: 0px solid #33CCFF; 23 | border:none; 24 | background: rgb(0,204,102); 25 | padding:0px; 26 | margin:0px; 27 | } -------------------------------------------------------------------------------- /images/QSS/style.qss: -------------------------------------------------------------------------------- 1 | QSlider#progress::add-page:Horizontal 2 | { 3 | background-color: rgb(87, 97, 106); 4 | height:4px; 5 | } 6 | QSlider#progress::sub-page:Horizontal 7 | { 8 | background-color:qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(231,80,229, 255), stop:1 rgba(7,208,255, 255)); 9 | height:4px; 10 | } 11 | QSlider#progress::groove:Horizontal 12 | { 13 | background:transparent; 14 | height:6px; 15 | } 16 | QSlider#progress::handle:Horizontal 17 | { 18 | height: 8px; 19 | width:8px; 20 | border-image: url(:/yuan); 21 | margin: -2 2px; 22 | } 23 | QSlider#volume 24 | { 25 | background-color: rgb(25, 38, 58); 26 | min-width:5px; 27 | max-width:5px; 28 | border:15px solid rgb(25, 38, 58); 29 | } 30 | QSlider#volume::add-page:vertical 31 | { 32 | background-color: rgb(0,204,102); 33 | width:4px; 34 | } 35 | QSlider#volume::sub-page:vertical 36 | { 37 | background-color: rgb(87, 97, 106); 38 | width:4px; 39 | } 40 | QSlider#volume::groove:vertical 41 | { 42 | background:transparent; 43 | width:4px; 44 | } 45 | QSlider#volume::handle:vertical 46 | { 47 | height: 13px; 48 | width:13px; 49 | border-image: url(:/yuan); 50 | margin: -4 -4px; 51 | } 52 | -------------------------------------------------------------------------------- /images/TrayMenu/ilike_click.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/TrayMenu/ilike_click.png -------------------------------------------------------------------------------- /images/TrayMenu/ilike_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/TrayMenu/ilike_hover.png -------------------------------------------------------------------------------- /images/TrayMenu/ilike_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/TrayMenu/ilike_normal.png -------------------------------------------------------------------------------- /images/TrayMenu/ilikedisable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/TrayMenu/ilikedisable.png -------------------------------------------------------------------------------- /images/TrayMenu/list_circulation_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/TrayMenu/list_circulation_hover.png -------------------------------------------------------------------------------- /images/TrayMenu/list_circulation_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/TrayMenu/list_circulation_normal.png -------------------------------------------------------------------------------- /images/TrayMenu/lyric.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/TrayMenu/lyric.png -------------------------------------------------------------------------------- /images/TrayMenu/next_click.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/TrayMenu/next_click.png -------------------------------------------------------------------------------- /images/TrayMenu/next_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/TrayMenu/next_hover.png -------------------------------------------------------------------------------- /images/TrayMenu/next_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/TrayMenu/next_normal.png -------------------------------------------------------------------------------- /images/TrayMenu/pause_click.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/TrayMenu/pause_click.png -------------------------------------------------------------------------------- /images/TrayMenu/pause_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/TrayMenu/pause_hover.png -------------------------------------------------------------------------------- /images/TrayMenu/pause_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/TrayMenu/pause_normal.png -------------------------------------------------------------------------------- /images/TrayMenu/play_click.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/TrayMenu/play_click.png -------------------------------------------------------------------------------- /images/TrayMenu/play_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/TrayMenu/play_hover.png -------------------------------------------------------------------------------- /images/TrayMenu/play_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/TrayMenu/play_normal.png -------------------------------------------------------------------------------- /images/TrayMenu/pre_click.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/TrayMenu/pre_click.png -------------------------------------------------------------------------------- /images/TrayMenu/pre_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/TrayMenu/pre_hover.png -------------------------------------------------------------------------------- /images/TrayMenu/pre_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/TrayMenu/pre_normal.png -------------------------------------------------------------------------------- /images/TrayMenu/progress/progress_bar.gft: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/TrayMenu/progress/progress_bar.gft -------------------------------------------------------------------------------- /images/TrayMenu/progress/progress_bg.gft: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/TrayMenu/progress/progress_bg.gft -------------------------------------------------------------------------------- /images/TrayMenu/progress/progress_thumb_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/TrayMenu/progress/progress_thumb_normal.png -------------------------------------------------------------------------------- /images/TrayMenu/quit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/TrayMenu/quit.png -------------------------------------------------------------------------------- /images/TrayMenu/random_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/TrayMenu/random_hover.png -------------------------------------------------------------------------------- /images/TrayMenu/random_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/TrayMenu/random_normal.png -------------------------------------------------------------------------------- /images/TrayMenu/sequence_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/TrayMenu/sequence_hover.png -------------------------------------------------------------------------------- /images/TrayMenu/sequence_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/TrayMenu/sequence_normal.png -------------------------------------------------------------------------------- /images/TrayMenu/set.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/TrayMenu/set.png -------------------------------------------------------------------------------- /images/TrayMenu/song_circulation_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/TrayMenu/song_circulation_hover.png -------------------------------------------------------------------------------- /images/TrayMenu/song_circulation_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/TrayMenu/song_circulation_normal.png -------------------------------------------------------------------------------- /images/TrayMenu/volume_large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/TrayMenu/volume_large.png -------------------------------------------------------------------------------- /images/TrayMenu/volume_mute.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/TrayMenu/volume_mute.png -------------------------------------------------------------------------------- /images/TrayMenu/volume_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/TrayMenu/volume_normal.png -------------------------------------------------------------------------------- /images/TrayMenu/volume_zero.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/TrayMenu/volume_zero.png -------------------------------------------------------------------------------- /images/center/01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/center/01.png -------------------------------------------------------------------------------- /images/center/02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/center/02.png -------------------------------------------------------------------------------- /images/center/03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/center/03.png -------------------------------------------------------------------------------- /images/center/04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/center/04.png -------------------------------------------------------------------------------- /images/center/05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/center/05.png -------------------------------------------------------------------------------- /images/center/06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/center/06.png -------------------------------------------------------------------------------- /images/center/07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/center/07.png -------------------------------------------------------------------------------- /images/center/08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/center/08.png -------------------------------------------------------------------------------- /images/center/add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/center/add.png -------------------------------------------------------------------------------- /images/center/download.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/center/download.png -------------------------------------------------------------------------------- /images/center/information.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/center/information.png -------------------------------------------------------------------------------- /images/center/loading1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/center/loading1.png -------------------------------------------------------------------------------- /images/center/loading2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/center/loading2.png -------------------------------------------------------------------------------- /images/center/loading3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/center/loading3.png -------------------------------------------------------------------------------- /images/center/loading4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/center/loading4.png -------------------------------------------------------------------------------- /images/center/mylovePic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/center/mylovePic.png -------------------------------------------------------------------------------- /images/center/play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/center/play.png -------------------------------------------------------------------------------- /images/img.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | ./title/min.png 4 | ./title/min_hover.png 5 | ./title/min_pressed.png 6 | ./title/close.png 7 | ./title/close_hover.png 8 | ./title/close_pressed.png 9 | ./title/skin.png 10 | ./title/skin_hover.png 11 | ./title/vip.png 12 | ./title/vip_hover.png 13 | ./title/mail.png 14 | ./title/mail_hover.png 15 | ./title/min_arrow.png 16 | ./title/min_arrow_hover.png 17 | ./title/menu.png 18 | ./title/menu_hover.png 19 | ./title/pin.png 20 | ./title/search.png 21 | ./title/cloud.png 22 | ./title/cloud_hover.png 23 | 24 | 25 | 26 | ./PlayControl/play.png 27 | ./PlayControl/play_hover.png 28 | ./PlayControl/play_click.png 29 | ./PlayControl/pause.png 30 | ./PlayControl/pause_hover.png 31 | ./PlayControl/pause_click.png 32 | ./PlayControl/left.png 33 | ./PlayControl/left_hover.png 34 | ./PlayControl/left_click.png 35 | ./PlayControl/right.png 36 | ./PlayControl/right_hover.png 37 | ./PlayControl/right_click.png 38 | ./PlayControl/loop1.png 39 | ./PlayControl/loop1_hover.png 40 | ./PlayControl/random.png 41 | ./PlayControl/random_hover.png 42 | ./PlayControl/loop.png 43 | ./PlayControl/loop_hover.png 44 | ./PlayControl/love_empty.png 45 | ./PlayControl/love_full.png 46 | ./PlayControl/download.png 47 | ./PlayControl/download_hover.png 48 | ./PlayControl/volume.png 49 | ./PlayControl/volume_hover.png 50 | ./PlayControl/menu.png 51 | ./PlayControl/menu_hover.png 52 | ./PlayControl/lrc.png 53 | ./PlayControl/lrc_hover.png 54 | ./PlayControl/down.png 55 | ./PlayControl/down_hover.png 56 | 57 | 58 | 59 | 60 | ./Item/computer.png 61 | ./Item/history.png 62 | ./Item/listen.png 63 | ./Item/mobile.png 64 | ./Item/set.png 65 | ./Item/love.png 66 | ./Item/video.png 67 | ./Item/music.png 68 | ./Item/heart.png 69 | ./Item/star.png 70 | ./Item/menu.png 71 | 72 | 73 | 74 | ./center/download.png 75 | ./center/play.png 76 | ./center/add.png 77 | ./center/mylovePic.png 78 | ./center/information.png 79 | ./center/01.png 80 | ./center/02.png 81 | ./center/03.png 82 | ./center/04.png 83 | ./center/05.png 84 | ./center/06.png 85 | ./center/07.png 86 | ./center/08.png 87 | 88 | 89 | 90 | 91 | 92 | ./QSS/center.qss 93 | ./QSS/check.qss 94 | ./QSS/introWidget.qss 95 | ./QSS/list.qss 96 | ./QSS/style.qss 97 | 98 | 99 | 100 | logo.png 101 | off.png 102 | on.png 103 | yuan.png 104 | 105 | -------------------------------------------------------------------------------- /images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/logo.png -------------------------------------------------------------------------------- /images/off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/off.png -------------------------------------------------------------------------------- /images/on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/on.png -------------------------------------------------------------------------------- /images/qqmusic.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/qqmusic.ico -------------------------------------------------------------------------------- /images/title/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/title/close.png -------------------------------------------------------------------------------- /images/title/close_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/title/close_hover.png -------------------------------------------------------------------------------- /images/title/close_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/title/close_pressed.png -------------------------------------------------------------------------------- /images/title/cloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/title/cloud.png -------------------------------------------------------------------------------- /images/title/cloud_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/title/cloud_hover.png -------------------------------------------------------------------------------- /images/title/mail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/title/mail.png -------------------------------------------------------------------------------- /images/title/mail_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/title/mail_hover.png -------------------------------------------------------------------------------- /images/title/menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/title/menu.png -------------------------------------------------------------------------------- /images/title/menu_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/title/menu_hover.png -------------------------------------------------------------------------------- /images/title/min.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/title/min.png -------------------------------------------------------------------------------- /images/title/min_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/title/min_arrow.png -------------------------------------------------------------------------------- /images/title/min_arrow_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/title/min_arrow_hover.png -------------------------------------------------------------------------------- /images/title/min_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/title/min_hover.png -------------------------------------------------------------------------------- /images/title/min_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/title/min_pressed.png -------------------------------------------------------------------------------- /images/title/pin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/title/pin.png -------------------------------------------------------------------------------- /images/title/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/title/search.png -------------------------------------------------------------------------------- /images/title/skin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/title/skin.png -------------------------------------------------------------------------------- /images/title/skin_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/title/skin_hover.png -------------------------------------------------------------------------------- /images/title/vip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/title/vip.png -------------------------------------------------------------------------------- /images/title/vip_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/title/vip_hover.png -------------------------------------------------------------------------------- /images/yuan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/yuan.png -------------------------------------------------------------------------------- /images/新建文件夹/left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/新建文件夹/left.png -------------------------------------------------------------------------------- /images/新建文件夹/left_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/新建文件夹/left_hover.png -------------------------------------------------------------------------------- /images/新建文件夹/pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/新建文件夹/pause.png -------------------------------------------------------------------------------- /images/新建文件夹/pause_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/新建文件夹/pause_hover.png -------------------------------------------------------------------------------- /images/新建文件夹/play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/新建文件夹/play.png -------------------------------------------------------------------------------- /images/新建文件夹/play_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/新建文件夹/play_hover.png -------------------------------------------------------------------------------- /images/新建文件夹/right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/新建文件夹/right.png -------------------------------------------------------------------------------- /images/新建文件夹/right_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/images/新建文件夹/right_hover.png -------------------------------------------------------------------------------- /localmusicwidget.cpp: -------------------------------------------------------------------------------- 1 | #include "localmusicwidget.h" 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | LocalMusicWidget::LocalMusicWidget(QWidget *parent) : QWidget(parent) 9 | { 10 | InitWidget(); 11 | player=new QMediaPlayer; 12 | connect(player,SIGNAL(durationChanged(qint64)),this,SLOT(DurationChanged()));//为得到总时间 13 | 14 | QVBoxLayout *main_lay=new QVBoxLayout(this); 15 | main_lay->setSpacing(10); 16 | main_lay->setContentsMargins(20,20,20,0); 17 | main_lay->addWidget(textLabel); 18 | QHBoxLayout *btnLay=new QHBoxLayout; 19 | btnLay->setSpacing(15); 20 | btnLay->setContentsMargins(0,0,0,0); 21 | btnLay->addWidget(playAllBtn); 22 | btnLay->addWidget(add); 23 | btnLay->addStretch(); 24 | btnLay->addWidget(searchEdit); 25 | main_lay->addLayout(btnLay); 26 | main_lay->addWidget(tableWidget); 27 | 28 | connect(add,SIGNAL(clicked()),this,SLOT(AddSong()));//点击添加按钮 29 | connect(tableWidget,SIGNAL(itemDoubleClicked(QTableWidgetItem*)),this,SLOT(DoubleClickedTable(QTableWidgetItem*))); 30 | setStyle(":/qss/center"); 31 | } 32 | 33 | LocalMusicWidget::~LocalMusicWidget() 34 | { 35 | 36 | } 37 | void LocalMusicWidget::InitWidget() 38 | { 39 | textLabel=new QLabel("本地歌曲");//标题 40 | playAllBtn=new QPushButton(QIcon(":/center/play"),"播放全部"); 41 | add = new QPushButton(QIcon(":/center/add"),"添加"); 42 | searchEdit=new QLineEdit; 43 | searchEdit->setFixedHeight(28); 44 | searchEdit->setPlaceholderText("在本地列表中搜索"); 45 | searchAction=new QAction(QIcon(":/title/search"),tr("搜索"),this); 46 | searchEdit->addAction(searchAction,QLineEdit::TrailingPosition); 47 | 48 | tableWidget = new QTableWidget(0,4); 49 | QStringList header; 50 | header<<"歌曲"<<"歌手"<<"专辑"<<"时长"; 51 | tableWidget->setHorizontalHeaderLabels(header);//插入表头 52 | tableWidget->verticalHeader()->setVisible(false); 53 | tableWidget->setSelectionBehavior(QAbstractItemView::SelectRows);//设置选中一行 54 | tableWidget->setEditTriggers(QAbstractItemView::NoEditTriggers);//设置不可编辑 55 | tableWidget->setColumnWidth(0,300); 56 | tableWidget->setColumnWidth(1,180); 57 | tableWidget->setColumnWidth(2,180); 58 | tableWidget->setColumnWidth(3,100); 59 | 60 | //tableWidget->setRowHeight(0,60); 61 | tableWidget->setStyleSheet("QTableWidget{\ 62 | font-size:13px; \ 63 | font-weight:300;\ 64 | color: rgb(60,60,60);\ 65 | gridline-color: white;\ 66 | alternate-background: #3A3A3C;\ 67 | selection-background-color: rgb(210,210,210);\ 68 | selection-color:rgb(60,60,60);\ 69 | border: 2px groove gray;\ 70 | border-radius: 0px;\ 71 | border:1px solid rgb(220,220,220);}\ 72 | }"); 73 | tableWidget->verticalScrollBar()->setStyleSheet("QScrollBar{background:rgb(230,230,230); width:12px;}\ 74 | QScrollBar::handle:vertical {\ 75 | background-color:rgb(200,200,200);\ 76 | border-radius: 6px;\ 77 | min-height: 5px;\ 78 | }\ 79 | "); 80 | } 81 | void LocalMusicWidget::setStyle(const QString &style) 82 | { 83 | QFile qss(style); 84 | qss.open(QFile::ReadOnly); 85 | setStyleSheet(qss.readAll()); 86 | qss.close(); 87 | } 88 | void LocalMusicWidget::DurationChanged()//获取时间 89 | {//由于时间必须要在durationChanged信号中才能获取。所以干脆先获得时间,再获取其他信息 90 | qint64 t=player->duration(); 91 | if(t<10000)//小于10s的过滤掉 92 | return; 93 | int h=(t/1024+3)/60; 94 | int m=(t/1024+3)%60; 95 | m_Time.sprintf("%02d:%02d",h,m);//格式化时间 96 | //QMessageBox::information(this,"",m_Time); 97 | if(GetAndAddInfo()) 98 | { 99 | QString seprator="|"; 100 | QString type="Local"; 101 | QString param=path + seprator + type + seprator + m_Title + " - " + m_Artist + seprator + m_Time+seprator+"default"+seprator+"NULL"; 102 | //向主窗口widget发送切换歌曲的信号 //传递格式为url(本机路径或网络路径)|类型(Local或Web)|标题|时间(xx:xx格式)|pic地址|lrc地址 103 | emit ChangeSong(param); 104 | } 105 | } 106 | void LocalMusicWidget::AddSong() 107 | { 108 | path=QFileDialog::getOpenFileName(this,"添加","/","Mp3 files(*.mp3)\nAll files(*.*)"); 109 | player->setMedia(QUrl::fromLocalFile(path));//为得到时间所用 110 | url_list.append(path); 111 | } 112 | 113 | bool LocalMusicWidget::GetAndAddInfo() 114 | { 115 | // QTextCodec::setCodecForLocale(QTextCodec::codecForName("gbk")); 116 | FILE * fp; 117 | unsigned char mp3tag[128] = { 0 }; 118 | MP3INFO mp3info; 119 | fp = fopen(path.toLocal8Bit().data(), "rb"); 120 | if (NULL == fp) 121 | { 122 | QMessageBox::information(this,"提示","打开文件失败"); 123 | return false; 124 | } 125 | fseek(fp, -128, SEEK_END); 126 | fread(&mp3tag, 1, 128, fp); 127 | if (!((mp3tag[0] == 'T' || mp3tag[0] == 't') 128 | && (mp3tag[1] == 'A' || mp3tag[1] == 'a') 129 | && (mp3tag[2] == 'G' || mp3tag[0] == 'g'))) 130 | { 131 | printf("mp3 file is error!!"); 132 | fclose(fp); 133 | QMessageBox::information(this,"提示","解析当前文件失败"); 134 | return false; 135 | } 136 | //获取Mp3信息 137 | memcpy((void *)mp3info.Identify, mp3tag, 3); //获得tag 138 | memcpy((void *)mp3info.Title, mp3tag + 3, 30); //获得歌名 139 | memcpy((void *)mp3info.Artist, mp3tag + 33, 30); //获得作者 140 | memcpy((void *)mp3info.Album, mp3tag + 63, 30); //获得唱片名 141 | memcpy((void *)mp3info.Year, mp3tag + 93, 4); //获得年 142 | memcpy((void *)mp3info.Comment, mp3tag + 97, 28); //获得注释 143 | memcpy((void *)&mp3info.reserved, mp3tag + 125, 1); //获得保留 144 | memcpy((void *)&mp3info.reserved2, mp3tag + 126, 1); 145 | memcpy((void *)&mp3info.reserved3, mp3tag + 127, 1); 146 | fclose(fp); 147 | //此处我们只需要歌曲名,歌首,专辑 148 | m_Title=QString::fromLocal8Bit((char*)mp3info.Title); 149 | m_Artist=QString::fromLocal8Bit((char*)mp3info.Artist); 150 | m_Album = QString::fromLocal8Bit((char*)mp3info.Album); 151 | 152 | int row=tableWidget->rowCount();//获取总行数 153 | tableWidget->setRowCount(row+1);//添加一行 154 | tableWidget->setItem(row,0,new QTableWidgetItem(m_Title));//添加标题 155 | tableWidget->setItem(row,1,new QTableWidgetItem(m_Artist));//添加歌手名 156 | tableWidget->setItem(row,2,new QTableWidgetItem(m_Album));//添加专辑名 157 | tableWidget->setItem(row,3,new QTableWidgetItem(m_Time));//添加时间 158 | //QMessageBox::information(this,"ADD info",m_Time); 159 | return true; 160 | } 161 | void LocalMusicWidget::DoubleClickedTable(QTableWidgetItem* item) 162 | { 163 | QString s=item->text(); 164 | int row = tableWidget->currentRow();//获得当前行号 165 | QString url=url_list.at(row);//得到绝对地址 166 | 167 | QString title= tableWidget->selectedItems().at(0)->text(); 168 | QString artist= tableWidget->selectedItems().at(1)->text(); 169 | QString time= tableWidget->selectedItems().at(3)->text(); 170 | //发送更换播放信号 171 | QString seprator="|"; 172 | QString type="Local"; 173 | //传递格式为url(本机路径或网络路径)|类型(Local或Web)|标题|时间(xx:xx格式)|pic地址|lrc地址 174 | QString param=url+ seprator +type+seprator+title+" - "+artist+seprator+time+seprator+"default"+seprator+"NULL"; 175 | emit ChangeSong(param); 176 | 177 | //QMessageBox::information(this,"",param); 178 | } 179 | -------------------------------------------------------------------------------- /localmusicwidget.h: -------------------------------------------------------------------------------- 1 | #ifndef LOCALMUSICWIDGET_H 2 | #define LOCALMUSICWIDGET_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | #include 13 | #include 14 | typedef struct _MP3INFO //MP3信息的结构 15 | { 16 | char Identify[3]; //TAG三个字母 17 | //这里可以用来鉴别是不是文件信息内容 18 | char Title[31]; //歌曲名,30个字节 19 | char Artist[31]; //歌手名,30个字节 20 | char Album[31]; //所属唱片,30个字节 21 | char Year[5]; //年,4个字节 22 | char Comment[29]; //注释,28个字节 23 | unsigned char reserved; //保留位, 1个字节 24 | unsigned char reserved2; //保留位,1个字节 25 | unsigned char reserved3; //保留位,1个字节 26 | } MP3INFO; 27 | 28 | class LocalMusicWidget : public QWidget 29 | { 30 | Q_OBJECT 31 | public: 32 | explicit LocalMusicWidget(QWidget *parent = 0); 33 | ~LocalMusicWidget(); 34 | void InitWidget(); 35 | void setStyle(const QString &style); 36 | bool GetAndAddInfo(); 37 | public: 38 | QPushButton *playAllBtn,*add; 39 | QLineEdit *searchEdit; 40 | QAction *searchAction; 41 | QLabel *textLabel; 42 | QTableWidget *tableWidget; 43 | private: 44 | QString m_Title,m_Artist,m_Album,m_Time; 45 | // QMediaPlayer *player; 46 | QMediaPlayer *player; 47 | QString path;//本地歌曲地址 48 | QListurl_list; 49 | signals: 50 | void ChangeSong(QString); 51 | public slots: 52 | void AddSong(); 53 | void DurationChanged(); 54 | void DoubleClickedTable(QTableWidgetItem*); 55 | }; 56 | 57 | #endif // LOCALMUSICWIDGET_H 58 | -------------------------------------------------------------------------------- /main.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwidget.h" 2 | #include 3 | 4 | int main(int argc, char *argv[]) 5 | { 6 | QApplication a(argc, argv); 7 | MainWidget w; 8 | w.show(); 9 | 10 | return a.exec(); 11 | } 12 | -------------------------------------------------------------------------------- /mainwidget.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwidget.h" 2 | #include 3 | #include 4 | MainWidget::MainWidget(QWidget *parent) 5 | : QWidget(parent) 6 | ,bPlaying(false) 7 | ,volume(50) 8 | ,DownLoadPath("./") 9 | { 10 | resize(800, 600); 11 | setWindowFlags(Qt::FramelessWindowHint); 12 | 13 | InitWidget(); 14 | InitLayout(); 15 | setWindowOpacity(0.96); 16 | player=new QMediaPlayer; 17 | // player->setMedia(QUrl("http://yinyueshiting.baidu.com/data2/music/42783748/42783748.mp3?xcode=e03a1574360225dae61345ed80ef9cd2")); 18 | // player->play(); 19 | 20 | connect(playlistWidget,SIGNAL(love()),this,SLOT(ChangeMylove())); 21 | connect(playlistWidget,SIGNAL(trylisten()),this,SLOT(ChangeTryListen())); 22 | connect(playlistWidget,SIGNAL(history()),this,SLOT(ChangePlayHistory())); 23 | connect(playlistWidget,SIGNAL(localMusic()),this,SLOT(ChangeLocalMusic())); 24 | 25 | connect(localmusicWidget,SIGNAL(ChangeSong(QString)),this,SLOT(ChangeSong(QString)));//本地歌曲点击了添加后播放新的歌 26 | connect(controlWidget,SIGNAL(ShowVolume()),this,SLOT(ShowVolume()));//当下方控制处点击了音量按钮发射ShowVolume信号 27 | connect(controlWidget,SIGNAL(PlayPause()),this,SLOT(PlayPause())); 28 | connect(controlWidget,SIGNAL(ProgressUpdate(int)),this,SLOT(ChangeProgress(int))); 29 | connect(controlWidget,SIGNAL(ShowLrc()),this,SLOT(showLrc())); 30 | connect(controlWidget,SIGNAL(DownLoad()),this,SLOT(DownLoad())); 31 | 32 | connect(titleWidget,SIGNAL(Search(QString)),this,SLOT(onSearch(QString))); 33 | 34 | connect(searchWidget,SIGNAL(ChangeSong(QString)),this,SLOT(ChangeSong(QString)));//在线音乐的切换歌曲信号 35 | connect(showlrcWidget,SIGNAL(HideLrc()),this,SLOT(HideLrc())); 36 | } 37 | 38 | MainWidget::~MainWidget() 39 | { 40 | 41 | } 42 | void MainWidget::InitWidget() 43 | { 44 | titleWidget=new TitleBar; 45 | controlWidget=new ControlWidget; 46 | playlistWidget=new PlayListWidget; 47 | trylistenWiidget=new TryListenWidget; 48 | myloveWidget=new MyLoveWidget; 49 | playhistoryWidget=new PlayHistoryWidget; 50 | localmusicWidget=new LocalMusicWidget; 51 | searchWidget=new SearchWidget; 52 | showlrcWidget=new ShowLrcWidget; 53 | stackWidget=new QStackedWidget; 54 | stackWidget->addWidget(trylistenWiidget); 55 | stackWidget->addWidget(myloveWidget); 56 | stackWidget->addWidget(playhistoryWidget); 57 | stackWidget->addWidget(localmusicWidget); 58 | stackWidget->addWidget(searchWidget); 59 | stackWidget->addWidget(showlrcWidget); 60 | 61 | volumeBar=new QSlider(); 62 | volumeBar->setObjectName("volume"); 63 | volumeBar->setOrientation(Qt::Vertical); 64 | volumeBar->setStyleSheet(controlWidget->GetQss(":/qss/style")); 65 | volumeBar->setRange(0,150); 66 | volumeBar->setValue(50); 67 | volumeBar->hide(); 68 | connect(volumeBar,SIGNAL(valueChanged(int)),this,SLOT(volumeChanged(int))); 69 | } 70 | void MainWidget::InitLayout() 71 | { 72 | QVBoxLayout *main_layout=new QVBoxLayout(this); 73 | main_layout->setSpacing(0); 74 | main_layout->setContentsMargins(0, 0, 0, 0); 75 | main_layout->addWidget(titleWidget,0,Qt::AlignTop); 76 | QHBoxLayout *hLay=new QHBoxLayout;//水平布局包括左边的列表以及右边的显示项 77 | hLay->setSpacing(0);hLay->setContentsMargins(0,0,0,0); 78 | hLay->addWidget(playlistWidget); 79 | hLay->addWidget(stackWidget); 80 | main_layout->addLayout(hLay); 81 | main_layout->addWidget(controlWidget,0,Qt::AlignBottom); 82 | 83 | } 84 | QPixmap MainWidget::getWebPix(QString picUrl) 85 | { 86 | //=============显示网络图片到label========================== 87 | QUrl pic_url(picUrl); 88 | QNetworkAccessManager manager; 89 | QEventLoop loop; 90 | QNetworkReply *reply = manager.get(QNetworkRequest(pic_url)); 91 | //请求结束并下载完成后,退出子事件循环 92 | QObject::connect(reply, SIGNAL(finished()), &loop, SLOT(quit())); 93 | //开启子事件循环 94 | loop.exec(); 95 | QByteArray jpegData = reply->readAll(); 96 | QPixmap pixmap; 97 | pixmap.loadFromData(jpegData); 98 | return pixmap; 99 | 100 | } 101 | void MainWidget::ChangeSong(QString str) 102 | { 103 | // QMessageBox::information(this,"",str); 104 | //传递格式为url(本机路径或网络路径)|类型(Local或Web)|标题|时间(xx:xx格式)|pic地址|lrc地址 105 | paramList=str.split('|'); 106 | QString url=paramList.at(0); 107 | QString type=paramList.at(1); 108 | QString songInfo=paramList.at(2); 109 | QString time =paramList.at(3); 110 | picUrl=paramList.at(4); 111 | lrcUrl=paramList.at(5); 112 | controlWidget->songNameLabel->setText(songInfo); 113 | controlWidget->playBtn->setPicName(":/playControl/pause");//更新按钮 114 | controlWidget->RestartProgressBar();//进度条重置 115 | if(picUrl!="default") 116 | controlWidget->albumnLabel->setPixmap(getWebPix(picUrl)); // 在QLabel显示图片 117 | else 118 | controlWidget->albumnLabel->setPixmap(QPixmap(tr(":/logo"))); 119 | 120 | bool ok; 121 | int h=time.split(':').at(0).toInt(&ok); 122 | int m=time.split(':').at(1).toInt(&ok); 123 | controlWidget->progressBar->setMaximum(h*60+m);//设置进度条最大值 124 | controlWidget->update();//刷新 125 | //歌词部分也开始显示了 126 | showlrcWidget->StartTimer(); 127 | //播放 128 | if(url=="Local") 129 | player->setMedia(QUrl::fromLocalFile(url)); 130 | else 131 | player->setMedia(QUrl(url)); 132 | player->play(); 133 | bPlaying=true; 134 | 135 | } 136 | void MainWidget::volumeChanged(int i) 137 | { 138 | int pos=volumeBar->value(); 139 | player->setVolume(pos); 140 | } 141 | void MainWidget::PlayPause() 142 | { 143 | if(bPlaying) 144 | { 145 | player->pause(); 146 | showlrcWidget->timer->stop(); 147 | bPlaying=false; 148 | } 149 | else 150 | { 151 | player->play(); 152 | showlrcWidget->timer->start(); 153 | bPlaying=true; 154 | } 155 | } 156 | void MainWidget::ChangeProgress(int pos) 157 | { 158 | player->setPosition(pos*1000); 159 | showlrcWidget->pos=pos; 160 | } 161 | void MainWidget::setStyle(const QString &style) { 162 | QFile qss(style); 163 | qss.open(QFile::ReadOnly); 164 | qApp->setStyleSheet(qss.readAll()); 165 | qss.close(); 166 | } 167 | void MainWidget::ShowVolume() 168 | { 169 | QPoint pt=pos(); 170 | volumeBar->setWindowFlags(Qt::WindowStaysOnTopHint|Qt::FramelessWindowHint); 171 | volumeBar->show(); 172 | volumeBar->setGeometry(pt.x()+915,pt.y()+425,50,120); 173 | } 174 | void MainWidget::DownLoad() 175 | { 176 | // QStringList strList=str.split('|'); 177 | QString music_url=paramList.at(0); 178 | QString type=paramList.at(1); 179 | if(type=="Local") 180 | QMessageBox::information(this,"提示","当前播放的是本地歌曲"); 181 | else 182 | { 183 | QUrl url(music_url); 184 | QNetworkRequest request; 185 | QNetworkAccessManager * manager = new QNetworkAccessManager(); 186 | request.setUrl(url); 187 | manager->get(request); 188 | connect(manager, SIGNAL(finished(QNetworkReply*)), this, SLOT(onDownload(QNetworkReply*)));//数据传输完成信号 189 | } 190 | } 191 | void MainWidget::onDownload(QNetworkReply *reply) 192 | { 193 | QByteArray content=reply->readAll(); 194 | QString title=paramList.at(2); 195 | QFile f(DownLoadPath+title+".mp3"); 196 | f.open(QFile::WriteOnly); 197 | f.write(content); 198 | f.close(); 199 | } 200 | 201 | void MainWidget::mousePressEvent(QMouseEvent *event) 202 | { 203 | if(event->buttons()==Qt::LeftButton) 204 | { 205 | volumeBar->hide(); 206 | } 207 | } 208 | void MainWidget::ChangeMylove() 209 | { 210 | stackWidget->setCurrentWidget(myloveWidget); 211 | } 212 | 213 | void MainWidget::ChangeTryListen() 214 | { 215 | stackWidget->setCurrentWidget(trylistenWiidget); 216 | } 217 | 218 | void MainWidget::ChangePlayHistory() 219 | { 220 | stackWidget->setCurrentWidget(playhistoryWidget); 221 | } 222 | 223 | void MainWidget::ChangeLocalMusic() 224 | { 225 | stackWidget->setCurrentWidget(localmusicWidget); 226 | } 227 | void MainWidget::onSearch(QString str) 228 | { 229 | stackWidget->setCurrentWidget(searchWidget); 230 | searchWidget->searchContent=str; 231 | searchWidget->Search(); 232 | } 233 | void MainWidget::showLrc() 234 | { 235 | prevWidgetIndex=stackWidget->currentIndex();//得到当前显示的窗口的序号 236 | 237 | showlrcWidget->lrcUrl=lrcUrl; 238 | showlrcWidget->picUrl=picUrl; 239 | showlrcWidget->ShowLrc(); 240 | stackWidget->setCurrentWidget(showlrcWidget); 241 | 242 | } 243 | void MainWidget::HideLrc() 244 | { 245 | stackWidget->setCurrentIndex(prevWidgetIndex); 246 | } 247 | -------------------------------------------------------------------------------- /mainwidget.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINWIDGET_H 2 | #define MAINWIDGET_H 3 | 4 | #include 5 | #include"titlebar.h" 6 | #include"controlwidget.h" 7 | #include"playlistwidget.h" 8 | #include"trylistenwidget.h" 9 | #include"mylovewidget.h" 10 | #include"playhistorywidget.h" 11 | #include"localmusicwidget.h" 12 | #include"searchwidget.h" 13 | #include"showlrcwidget.h" 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | #include 21 | #include 22 | 23 | class MainWidget : public QWidget 24 | { 25 | Q_OBJECT 26 | 27 | public: 28 | MainWidget(QWidget *parent = 0); 29 | ~MainWidget(); 30 | void setStyle(const QString &style); 31 | void mousePressEvent(QMouseEvent *); 32 | void InitWidget(); 33 | void InitLayout(); 34 | 35 | QPixmap getWebPix(QString); 36 | private: 37 | TitleBar *titleWidget;//标题栏 38 | ControlWidget *controlWidget;//下方的控制 39 | PlayListWidget *playlistWidget;//左边的列表 40 | QSlider *volumeBar;//音量 41 | TryListenWidget *trylistenWiidget;//试听 42 | MyLoveWidget *myloveWidget;//我喜欢 43 | PlayHistoryWidget *playhistoryWidget;//播放历史 44 | LocalMusicWidget *localmusicWidget;//本地音乐 45 | SearchWidget *searchWidget;//搜索界面 46 | ShowLrcWidget *showlrcWidget; 47 | QStackedWidget *stackWidget; 48 | 49 | 50 | //QMediaPlaylist *playlist;// 51 | QMediaPlayer *player; 52 | bool bPlaying; 53 | int volume; 54 | QStringList paramList; 55 | QString lrcUrl,picUrl;//由于这两个地址需要传递给歌词widget,所以作为成员变量 56 | 57 | QString DownLoadPath; 58 | int prevWidgetIndex;//点击显示歌词时当前是那个界面,隐藏歌词界面后还显示这个界面 59 | public slots: 60 | //controlWidget中的槽 61 | void ShowVolume(); 62 | void ChangeSong(QString);//用户换歌的槽 63 | void PlayPause(); 64 | void ChangeProgress(int); 65 | void showLrc(); 66 | void DownLoad(); 67 | 68 | //用于切换当前显示的widget槽 69 | void ChangeMylove(); 70 | void ChangeTryListen(); 71 | void ChangePlayHistory(); 72 | void ChangeLocalMusic(); 73 | 74 | //title中的槽 75 | void onSearch(QString); 76 | 77 | void volumeChanged(int);//调整音量 78 | void onDownload(QNetworkReply *reply);//下载歌曲 79 | void HideLrc();//隐藏歌词界面 80 | 81 | }; 82 | 83 | #endif // MAINWIDGET_H 84 | -------------------------------------------------------------------------------- /mylovewidget.cpp: -------------------------------------------------------------------------------- 1 | #include "mylovewidget.h" 2 | #include 3 | #include 4 | #include 5 | #include 6 | MyLoveWidget::MyLoveWidget(QWidget *parent) : QWidget(parent) 7 | { 8 | InitWidget(); 9 | 10 | QVBoxLayout *main_lay=new QVBoxLayout(this); 11 | main_lay->setSpacing(10); 12 | main_lay->setContentsMargins(20,0,20,0); 13 | main_lay->addWidget(picLabel); 14 | main_lay->addWidget(textLabel); 15 | QHBoxLayout *btnLay=new QHBoxLayout; 16 | btnLay->setSpacing(10); 17 | btnLay->setContentsMargins(0,0,0,0); 18 | btnLay->addWidget(playAllBtn); 19 | btnLay->addWidget(downLoad); 20 | btnLay->addStretch(); 21 | btnLay->addWidget(searchEdit); 22 | main_lay->addLayout(btnLay); 23 | main_lay->addWidget(tableWidget); 24 | 25 | setStyle(":/qss/center"); 26 | } 27 | 28 | MyLoveWidget::~MyLoveWidget() 29 | { 30 | 31 | } 32 | void MyLoveWidget::InitWidget() 33 | { 34 | picLabel=new QLabel; 35 | picLabel->setPixmap(QPixmap(":/center/mylove")); 36 | textLabel=new QLabel("我喜欢");//标题 37 | playAllBtn=new QPushButton(QIcon(":/center/play"),"播放全部"); 38 | downLoad = new QPushButton(QIcon(":/center/download"),"下载"); 39 | searchEdit=new QLineEdit; 40 | searchEdit->setFixedHeight(28); 41 | searchEdit->setPlaceholderText("在我喜欢列表中搜索"); 42 | searchAction=new QAction(QIcon(":/title/search"),tr("搜索"),this); 43 | searchEdit->addAction(searchAction,QLineEdit::TrailingPosition); 44 | 45 | tableWidget = new QTableWidget(20,4); 46 | QStringList header; 47 | header<<"歌曲"<<"歌手"<<"专辑"<<"时长"; 48 | tableWidget->setHorizontalHeaderLabels(header);//插入表头 49 | tableWidget->verticalHeader()->setVisible(false); 50 | tableWidget->setItem(0,0,new QTableWidgetItem("半城烟沙")); 51 | tableWidget->setItem(0,1,new QTableWidgetItem("许嵩")); 52 | tableWidget->setItem(0,2,new QTableWidgetItem("半城烟沙")); 53 | tableWidget->setItem(0,3,new QTableWidgetItem("04:52")); 54 | tableWidget->setSelectionBehavior(QAbstractItemView::SelectRows);//设置选中一行 55 | tableWidget->setEditTriggers(QAbstractItemView::NoEditTriggers);//设置不可编辑 56 | tableWidget->setColumnWidth(0,300); 57 | tableWidget->setColumnWidth(1,180); 58 | tableWidget->setColumnWidth(2,180); 59 | tableWidget->setColumnWidth(3,100); 60 | 61 | //tableWidget->setRowHeight(0,60); 62 | tableWidget->setStyleSheet("QTableWidget{\ 63 | font-size:13px; \ 64 | font-weight:300;\ 65 | color: rgb(60,60,60);\ 66 | gridline-color: white;\ 67 | alternate-background: #3A3A3C;\ 68 | selection-background-color: rgb(210,210,210);\ 69 | selection-color:rgb(60,60,60);\ 70 | border: 2px groove gray;\ 71 | border-radius: 0px;\ 72 | border:1px solid rgb(220,220,220);}\ 73 | }"); 74 | tableWidget->verticalScrollBar()->setStyleSheet("QScrollBar{background:rgb(230,230,230); width:12px;}\ 75 | QScrollBar::handle:vertical {\ 76 | background-color:rgb(200,200,200);\ 77 | border-radius: 6px;\ 78 | min-height: 5px;\ 79 | }\ 80 | "); 81 | } 82 | void MyLoveWidget::setStyle(const QString &style) 83 | { 84 | QFile qss(style); 85 | qss.open(QFile::ReadOnly); 86 | setStyleSheet(qss.readAll()); 87 | qss.close(); 88 | } 89 | -------------------------------------------------------------------------------- /mylovewidget.h: -------------------------------------------------------------------------------- 1 | #ifndef MYLOVEWIDGET_H 2 | #define MYLOVEWIDGET_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | class MyLoveWidget : public QWidget 12 | { 13 | Q_OBJECT 14 | public: 15 | explicit MyLoveWidget(QWidget *parent = 0); 16 | ~MyLoveWidget(); 17 | void InitWidget(); 18 | void setStyle(const QString &style); 19 | public: 20 | QPushButton *playAllBtn,*downLoad; 21 | QLineEdit *searchEdit; 22 | QAction *searchAction; 23 | QLabel *textLabel; 24 | QTableWidget *tableWidget; 25 | QLabel *picLabel; 26 | signals: 27 | 28 | public slots: 29 | }; 30 | 31 | #endif // MYLOVEWIDGET_H 32 | -------------------------------------------------------------------------------- /mypushbutton.cpp: -------------------------------------------------------------------------------- 1 | #include "mypushbutton.h" 2 | 3 | MyPushButton::MyPushButton(QWidget *parent):QPushButton(parent) 4 | { 5 | status = NORMAL; 6 | mouse_press = false; 7 | } 8 | 9 | MyPushButton::~MyPushButton() 10 | { 11 | 12 | } 13 | void MyPushButton::setPicName(QString pic_name) 14 | { 15 | this->pic_name = pic_name; 16 | setFixedSize(QPixmap(pic_name).size()); 17 | } 18 | QString MyPushButton::getPicName() 19 | { 20 | return pic_name; 21 | } 22 | void MyPushButton::enterEvent(QEvent *) 23 | { 24 | status = ENTER; 25 | update(); 26 | } 27 | 28 | void MyPushButton::leaveEvent(QEvent *) 29 | { 30 | status = NORMAL; 31 | update(); 32 | } 33 | void MyPushButton::mousePressEvent(QMouseEvent *event) 34 | { 35 | if(event->button() == Qt::LeftButton) 36 | { 37 | mouse_press = true; 38 | status = PRESS; 39 | update(); 40 | } 41 | } 42 | void MyPushButton::mouseReleaseEvent(QMouseEvent *event) 43 | { 44 | if(mouse_press) 45 | { 46 | mouse_press = false; 47 | status = ENTER; 48 | update(); 49 | emit clicked();//此处表示mouseReleaseEvent执行后发出clicked信号 50 | } 51 | } 52 | void MyPushButton::paintEvent(QPaintEvent *) 53 | { 54 | QPainter painter(this); 55 | QPixmap pixmap; 56 | switch(status) 57 | { 58 | case NORMAL: 59 | { 60 | pixmap.load(pic_name); 61 | break; 62 | } 63 | case ENTER: 64 | { 65 | pixmap.load(pic_name+"_hover" ); 66 | /* QPen pen(Qt::NoBrush, 1); 67 | painter.setPen(pen); 68 | QLinearGradient linear(rect().topLeft(), rect().bottomLeft()); 69 | linear.setColorAt(0, QColor(230, 230, 230, 0)); 70 | linear.setColorAt(0.5, QColor(230, 230, 230, 100)); 71 | linear.setColorAt(1, QColor(230, 230, 230, 150)); 72 | painter.setBrush(linear); 73 | painter.drawRect(rect());*/ 74 | break; 75 | } 76 | case PRESS: 77 | { 78 | pixmap.load(pic_name+"_click"); 79 | break; 80 | } 81 | default: 82 | pixmap.load(pic_name); 83 | } 84 | 85 | painter.drawPixmap(rect(), pixmap); 86 | } 87 | 88 | 89 | -------------------------------------------------------------------------------- /mypushbutton.h: -------------------------------------------------------------------------------- 1 | #ifndef MYPUSHBUTTON_H 2 | #define MYPUSHBUTTON_H 3 | 4 | #include 5 | #include 6 | #include 7 | class MyPushButton : public QPushButton 8 | { 9 | Q_OBJECT 10 | public: 11 | MyPushButton(QWidget *parent = 0); 12 | ~MyPushButton(); 13 | 14 | void loadPixmap(QString pic_name); 15 | void enterEvent(QEvent *);//鼠标悬浮 16 | void leaveEvent(QEvent *); //鼠标离开 17 | void mousePressEvent(QMouseEvent *event); 18 | void mouseReleaseEvent(QMouseEvent *event); 19 | void paintEvent(QPaintEvent *); 20 | void setPicName(QString); 21 | QString getPicName(); 22 | private: 23 | enum ButtonStatus{NORMAL, ENTER, PRESS}; //枚举按钮的几种状态 (正常、悬浮、按下) 24 | ButtonStatus status; 25 | QPixmap pixmap; 26 | bool mouse_press; //按钮左键是否按下 27 | QString pic_name; 28 | 29 | }; 30 | 31 | #endif // MYPUSHBUTTON_H 32 | -------------------------------------------------------------------------------- /playhistorywidget.cpp: -------------------------------------------------------------------------------- 1 | #include "playhistorywidget.h" 2 | #include 3 | #include 4 | #include 5 | #include 6 | PlayHistoryWidget::PlayHistoryWidget(QWidget *parent) : QWidget(parent) 7 | { 8 | InitWidget(); 9 | 10 | QVBoxLayout *main_lay=new QVBoxLayout(this); 11 | main_lay->setSpacing(10); 12 | main_lay->setContentsMargins(20,20,20,0); 13 | main_lay->addWidget(textLabel); 14 | QHBoxLayout *btnLay=new QHBoxLayout; 15 | btnLay->setSpacing(15); 16 | btnLay->setContentsMargins(0,0,0,0); 17 | btnLay->addWidget(playAllBtn); 18 | btnLay->addWidget(downLoad); 19 | btnLay->addStretch(); 20 | btnLay->addWidget(searchEdit); 21 | main_lay->addLayout(btnLay); 22 | main_lay->addWidget(tableWidget); 23 | 24 | setStyle(":/qss/center"); 25 | } 26 | 27 | PlayHistoryWidget::~PlayHistoryWidget() 28 | { 29 | 30 | } 31 | void PlayHistoryWidget::InitWidget() 32 | { 33 | textLabel=new QLabel("播放历史");//标题 34 | playAllBtn=new QPushButton(QIcon(":/center/play"),"播放全部"); 35 | downLoad = new QPushButton(QIcon(":/center/download"),"下载"); 36 | searchEdit=new QLineEdit; 37 | searchEdit->setFixedHeight(28); 38 | searchEdit->setPlaceholderText("在播放历史列表中搜索"); 39 | searchAction=new QAction(QIcon(":/title/search"),tr("搜索"),this); 40 | searchEdit->addAction(searchAction,QLineEdit::TrailingPosition); 41 | 42 | tableWidget = new QTableWidget(20,4); 43 | QStringList header; 44 | header<<"歌曲"<<"歌手"<<"专辑"<<"时长"; 45 | tableWidget->setHorizontalHeaderLabels(header);//插入表头 46 | tableWidget->verticalHeader()->setVisible(false); 47 | tableWidget->setItem(0,0,new QTableWidgetItem("半城烟沙")); 48 | tableWidget->setItem(0,1,new QTableWidgetItem("许嵩")); 49 | tableWidget->setItem(0,2,new QTableWidgetItem("半城烟沙")); 50 | tableWidget->setItem(0,3,new QTableWidgetItem("04:52")); 51 | tableWidget->setSelectionBehavior(QAbstractItemView::SelectRows);//设置选中一行 52 | tableWidget->setEditTriggers(QAbstractItemView::NoEditTriggers);//设置不可编辑 53 | tableWidget->setColumnWidth(0,300); 54 | tableWidget->setColumnWidth(1,180); 55 | tableWidget->setColumnWidth(2,180); 56 | tableWidget->setColumnWidth(3,100); 57 | 58 | //tableWidget->setRowHeight(0,60); 59 | tableWidget->setStyleSheet("QTableWidget{\ 60 | font-size:13px; \ 61 | font-weight:300;\ 62 | color: rgb(60,60,60);\ 63 | gridline-color: white;\ 64 | alternate-background: #3A3A3C;\ 65 | selection-background-color: rgb(210,210,210);\ 66 | selection-color:rgb(60,60,60);\ 67 | border: 2px groove gray;\ 68 | border-radius: 0px;\ 69 | border:1px solid rgb(220,220,220);}\ 70 | }"); 71 | tableWidget->verticalScrollBar()->setStyleSheet("QScrollBar{background:rgb(230,230,230); width:12px;}\ 72 | QScrollBar::handle:vertical {\ 73 | background-color:rgb(200,200,200);\ 74 | border-radius: 6px;\ 75 | min-height: 5px;\ 76 | }\ 77 | "); 78 | } 79 | void PlayHistoryWidget::setStyle(const QString &style) 80 | { 81 | QFile qss(style); 82 | qss.open(QFile::ReadOnly); 83 | setStyleSheet(qss.readAll()); 84 | qss.close(); 85 | } 86 | -------------------------------------------------------------------------------- /playhistorywidget.h: -------------------------------------------------------------------------------- 1 | #ifndef PLAYHISTORY_H 2 | #define PLAYHISTORY_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | class PlayHistoryWidget : public QWidget 12 | { 13 | Q_OBJECT 14 | public: 15 | explicit PlayHistoryWidget(QWidget *parent = 0); 16 | ~PlayHistoryWidget(); 17 | void InitWidget(); 18 | void setStyle(const QString &style); 19 | public: 20 | QPushButton *playAllBtn,*downLoad; 21 | QLineEdit *searchEdit; 22 | QAction *searchAction; 23 | QLabel *textLabel; 24 | QTableWidget *tableWidget; 25 | 26 | signals: 27 | 28 | public slots: 29 | }; 30 | 31 | #endif // PLAYHISTORY_H 32 | -------------------------------------------------------------------------------- /playlistwidget.cpp: -------------------------------------------------------------------------------- 1 | #include "playlistwidget.h" 2 | #include 3 | #include 4 | #include 5 | PlayListWidget::PlayListWidget(QWidget *parent) : QWidget(parent) 6 | { 7 | setFixedWidth(200); 8 | setAutoFillBackground(true); 9 | QPalette text_palette(palette()); 10 | text_palette.setColor(QPalette::WindowText, QColor(150,150,150)); 11 | setPalette(text_palette); 12 | QFont &text_font = const_cast(font()); 13 | text_font.setWeight(QFont::Bold); 14 | 15 | OnlineMusicList=new QListWidget; 16 | MyMusicList=new QListWidget; 17 | OnlineLabel=new QLabel(tr("在 线 音 乐 ")); 18 | MymusicLabel=new QLabel(tr("我 的 音 乐 ")); 19 | 20 | CreateAction(); 21 | 22 | QVBoxLayout *lay=new QVBoxLayout(this); 23 | lay->setSpacing(10); 24 | lay->setContentsMargins(20,10,0,0); 25 | lay->addWidget(OnlineLabel,0,Qt::AlignHCenter); 26 | lay->addWidget(OnlineMusicList); 27 | lay->addWidget(MymusicLabel,0,Qt::AlignHCenter); 28 | lay->addWidget(MyMusicList); 29 | 30 | //连接点击listwidget的点击信号 31 | connect(OnlineMusicList,SIGNAL(itemClicked(QListWidgetItem*)),this,SLOT(OnlineListChange(QListWidgetItem *))); 32 | connect(MyMusicList,SIGNAL(itemClicked(QListWidgetItem*)),this,SLOT(MyMuscChange(QListWidgetItem *))); 33 | 34 | 35 | } 36 | 37 | PlayListWidget::~PlayListWidget() 38 | { 39 | 40 | } 41 | void PlayListWidget::CreateAction() 42 | { 43 | musicAction=new QListWidgetItem(QIcon(":/item/music"),tr("音乐馆")); 44 | MVAction=new QListWidgetItem(QIcon(":/item/video"),tr("MV")); 45 | radioAction=new QListWidgetItem(QIcon(":/item/heart"),tr("电台")); 46 | starAction=new QListWidgetItem(QIcon(":/item/star"),tr("梦想的声音")); 47 | OnlineMusicList->addItem(musicAction); 48 | OnlineMusicList->addItem(MVAction); 49 | OnlineMusicList->addItem(radioAction); 50 | OnlineMusicList->addItem(starAction); 51 | OnlineMusicList->setStyleSheet(GetQss(":/qss/list")); 52 | 53 | loveAction=new QListWidgetItem(QIcon(":/item/love"),tr("我喜欢")); 54 | listAciton=new QListWidgetItem(QIcon(":/item/menu"),tr("试听列表")); 55 | historyAction=new QListWidgetItem(QIcon(":/item/history"),tr("播放历史")); 56 | PCAction=new QListWidgetItem(QIcon(":/item/computer"),tr("本地音乐")); 57 | mobileAction=new QListWidgetItem(QIcon(":/item/mobile"),tr("传歌到设备")); 58 | MyMusicList->addItem(loveAction); 59 | MyMusicList->addItem(listAciton); 60 | MyMusicList->addItem(historyAction); 61 | MyMusicList->addItem(PCAction); 62 | MyMusicList->addItem(mobileAction); 63 | 64 | MyMusicList->setStyleSheet(GetQss(":/qss/list")); 65 | } 66 | //当选择某一项时。由于有两个list不能做到互斥。所以用Reset函数先全部不选中。在将对应的一个项选中 67 | void PlayListWidget::OnlineListChange(QListWidgetItem *pItem) 68 | { 69 | Reset(); 70 | if(pItem==musicAction) 71 | { 72 | musicAction->setSelected(true); 73 | emit musicHall(); 74 | } 75 | if(pItem==MVAction) 76 | { 77 | MVAction->setSelected(true); 78 | emit MV(); 79 | } 80 | if(pItem==radioAction) 81 | { 82 | radioAction->setSelected(true); 83 | emit radio(); 84 | } 85 | if(pItem==starAction) 86 | { 87 | starAction->setSelected(true); 88 | emit dreamVoice(); 89 | } 90 | 91 | } 92 | void PlayListWidget::MyMuscChange(QListWidgetItem *pItem) 93 | { 94 | Reset(); 95 | if(pItem==loveAction) 96 | { 97 | loveAction->setSelected(true); 98 | emit love(); 99 | } 100 | if(pItem==listAciton) 101 | { 102 | listAciton->setSelected(true); 103 | emit trylisten(); 104 | } 105 | if(pItem==historyAction) 106 | { 107 | historyAction->setSelected(true); 108 | emit history(); 109 | } 110 | if(pItem==PCAction) 111 | { 112 | PCAction->setSelected(true); 113 | emit localMusic(); 114 | } 115 | if(pItem==mobileAction) 116 | { 117 | mobileAction->setSelected(true); 118 | emit mobile(); 119 | } 120 | } 121 | void PlayListWidget::Reset() 122 | { 123 | QListWidgetItem *list[]={musicAction,MVAction,radioAction,starAction,loveAction,listAciton,historyAction,PCAction,mobileAction}; 124 | for(int i=0;i<9;++i) 125 | list[i]->setSelected(false); 126 | } 127 | 128 | -------------------------------------------------------------------------------- /playlistwidget.h: -------------------------------------------------------------------------------- 1 | #ifndef PLAYLISTWIDGET_H 2 | #define PLAYLISTWIDGET_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | class PlayListWidget : public QWidget 10 | { 11 | Q_OBJECT 12 | public: 13 | explicit PlayListWidget(QWidget *parent = 0); 14 | ~PlayListWidget(); 15 | QString GetQss(const QString &path) 16 | { 17 | QString content; 18 | QFile qss(path); 19 | qss.open(QFile::ReadOnly); 20 | content=qss.readAll(); 21 | qss.close(); 22 | return content; 23 | } 24 | void CreateAction(); 25 | void Reset(); 26 | private: 27 | QListWidget *OnlineMusicList,*MyMusicList; 28 | QLabel *OnlineLabel,*MymusicLabel; 29 | QListWidgetItem *musicAction,*MVAction,*radioAction,*starAction; 30 | QListWidgetItem *loveAction,*listAciton,*historyAction,*PCAction,*mobileAction; 31 | signals: 32 | void musicHall(); 33 | void MV(); 34 | void radio(); 35 | void dreamVoice(); 36 | 37 | void love(); 38 | void trylisten(); 39 | void history(); 40 | void localMusic(); 41 | void mobile(); 42 | public slots: 43 | void OnlineListChange(QListWidgetItem *); 44 | void MyMuscChange(QListWidgetItem *); 45 | }; 46 | 47 | #endif // PLAYLISTWIDGET_H 48 | -------------------------------------------------------------------------------- /searchwidget.cpp: -------------------------------------------------------------------------------- 1 | #include "searchwidget.h" 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | SearchWidget::SearchWidget(QWidget *parent) : QWidget(parent) 8 | { 9 | bSearching=false; 10 | InitWidget(); 11 | //request=new QNetworkRequest; 12 | nCount1=nCount2=0; 13 | loadingPicIndex=1; 14 | 15 | QVBoxLayout *main_lay=new QVBoxLayout(this); 16 | main_lay->setSpacing(10); 17 | main_lay->setContentsMargins(20,20,20,0); 18 | main_lay->addWidget(textLabel); 19 | QHBoxLayout *btnLay=new QHBoxLayout; 20 | btnLay->setSpacing(15); 21 | btnLay->setContentsMargins(0,0,0,0); 22 | btnLay->addWidget(playAllBtn); 23 | btnLay->addWidget(downLoad); 24 | btnLay->addStretch(); 25 | main_lay->addLayout(btnLay); 26 | main_lay->addWidget(tableWidget); 27 | 28 | connect(tableWidget,SIGNAL(itemDoubleClicked(QTableWidgetItem*)),this,SLOT(DoubleClickedTable(QTableWidgetItem*))); 29 | setStyle(":/qss/center"); 30 | } 31 | 32 | SearchWidget::~SearchWidget() 33 | { 34 | 35 | } 36 | void SearchWidget::InitWidget() 37 | { 38 | textLabel=new QLabel("搜索结果");//标题 39 | playAllBtn=new QPushButton(QIcon(":/center/play"),"播放全部"); 40 | downLoad = new QPushButton(QIcon(":/center/download"),"下载"); 41 | 42 | tableWidget = new QTableWidget(0,4); 43 | QStringList header; 44 | header<<"歌曲"<<"歌手"<<"专辑"<<"时长"; 45 | tableWidget->setHorizontalHeaderLabels(header);//插入表头 46 | tableWidget->verticalHeader()->setVisible(false); 47 | tableWidget->setSelectionBehavior(QAbstractItemView::SelectRows);//设置选中一行 48 | tableWidget->setEditTriggers(QAbstractItemView::NoEditTriggers);//设置不可编辑 49 | tableWidget->setColumnWidth(0,300); 50 | tableWidget->setColumnWidth(1,180); 51 | tableWidget->setColumnWidth(2,180); 52 | tableWidget->setColumnWidth(3,100); 53 | tableWidget->setStyleSheet("QTableWidget{\ 54 | font-size:13px; \ 55 | font-weight:300;\ 56 | color: rgb(60,60,60);\ 57 | gridline-color: white;\ 58 | alternate-background: #3A3A3C;\ 59 | selection-background-color: rgb(210,210,210);\ 60 | selection-color:rgb(60,60,60);\ 61 | border: 2px groove gray;\ 62 | border-radius: 0px;\ 63 | border:1px solid rgb(220,220,220);}\ 64 | }"); 65 | tableWidget->verticalScrollBar()->setStyleSheet("QScrollBar{background:rgb(230,230,230); width:12px;}\ 66 | QScrollBar::handle:vertical {\ 67 | background-color:rgb(200,200,200);\ 68 | border-radius: 6px;\ 69 | min-height: 5px;\ 70 | }\ 71 | "); 72 | } 73 | void SearchWidget::setStyle(const QString &style) 74 | { 75 | QFile qss(style); 76 | qss.open(QFile::ReadOnly); 77 | setStyleSheet(qss.readAll()); 78 | qss.close(); 79 | } 80 | QByteArray SearchWidget::ContactHttp(QString szUrl) 81 | { 82 | QUrl url(szUrl); 83 | QNetworkRequest request; 84 | QNetworkAccessManager * manager = new QNetworkAccessManager(); 85 | request.setUrl(url); 86 | QNetworkReply *reply = manager->get(request); 87 | QEventLoop loop; 88 | QObject::connect(reply, SIGNAL(finished()), &loop, SLOT(quit())); 89 | //开启子事件循环 90 | loop.exec(); 91 | return reply->readAll(); 92 | } 93 | void SearchWidget::ShowLoadingWdiget()//显示加载中界面 94 | { 95 | loadingWidget=new QWidget(this); 96 | QPixmap pix; 97 | pix.load(":/center/loading1"); 98 | loadingWidget->resize(pix.size()); 99 | loadingLabel=new QLabel(loadingWidget); 100 | loadingLabel->setPixmap(QPixmap(":/center/loading1")); 101 | loadingWidget->setMask(QBitmap(pix.mask())); 102 | loadingTimer=new QTimer(loadingWidget); 103 | connect(loadingTimer,SIGNAL(timeout()),this,SLOT(TimerLoading())); 104 | 105 | 106 | QPoint pt=pos(); 107 | loadingWidget->move(pt.x()+400,pt.y()+280); 108 | loadingWidget->show(); 109 | loadingTimer->start(200); 110 | // loadingLabel->setGeometry(pt.x()+400,pt.y()+200,pix.width(),pix.height()); 111 | 112 | } 113 | void SearchWidget::TimerLoading()//加载中动画的显示 114 | { 115 | loadingPicIndex++; 116 | if(loadingPicIndex>8) 117 | loadingPicIndex=1; 118 | QString szPic; 119 | szPic.sprintf(":/center/loading%d",loadingPicIndex); 120 | loadingWidget->setMask(QBitmap(QPixmap(szPic).mask())); 121 | loadingLabel->setPixmap(QPixmap(szPic)); 122 | 123 | } 124 | void SearchWidget::Clear()//清除列表 125 | { 126 | tableWidget->setRowCount(0); 127 | tableWidget->clearContents(); 128 | nCount1=nCount2=0; 129 | } 130 | void SearchWidget::Search() 131 | { 132 | if(bSearching==false)//防止连续按搜索造成crash 133 | { 134 | bSearching=true; 135 | } 136 | else 137 | return; 138 | Clear(); 139 | ShowLoadingWdiget(); 140 | QString url = "http://tingapi.ting.baidu.com/v1/restserver/ting?from=android&version=5.6.5.0&method=baidu.ting.search.merge&format=json&query="+searchContent+"&page_no=1&page_size=50&type=-1&data_source=0&use_cluster=1"; 141 | //QUrl url("http://tingapi.ting.baidu.com/v1/restserver/ting?from=android&version=5.6.5.0&method=baidu.ting.search.catalogSug&format=json&query="+searchContent); 142 | QByteArray content=ContactHttp(url); 143 | GetIdList(content); 144 | // connect(manager, SIGNAL(finished(QNetworkReply*)), this, SLOT(onRead(QNetworkReply*)));//数据传输完成信号 145 | 146 | } 147 | void SearchWidget::GetIdList(QByteArray byteArray)//此处仅为了获取id信息 148 | { 149 | QScriptEngine engine; 150 | QScriptValue sc = engine.evaluate("value=" + byteArray); 151 | QScriptValue res=sc.property("result"); 152 | QScriptValue songinfo=res.property("song_info"); 153 | QScriptValue songlist=songinfo.property("song_list"); 154 | /* if (sc.property("song").isArray()) //解析数组 155 | { 156 | QScriptValueIterator it(sc.property("song")); 157 | it.next();//迭代器第一个为空 158 | while(it.hasNext()) 159 | { 160 | QString id=it.value().property("songid").toString();//得到歌曲id后进一步获取信息 161 | 162 | idList[nCount1]=id; 163 | it.next(); 164 | nCount1++; 165 | } 166 | }*/ 167 | if(songlist.isArray()) 168 | { 169 | QScriptValueIterator it(songlist); 170 | it.next();//迭代器第一个为空 171 | while(it.hasNext()) 172 | { 173 | QString id=it.value().property("song_id").toString();//得到歌曲id后进一步获取信息 174 | 175 | idList[nCount1]=id; 176 | it.next(); 177 | nCount1++; 178 | } 179 | } 180 | //得到id数组后把每个id包含的信息解析出来并保存到信息的结构体数组中 181 | for(int i=0;irowCount();//获取总行数 225 | tableWidget->setRowCount(row+1);//添加一行 226 | tableWidget->setItem(row,0,new QTableWidgetItem(musicList[i].title));//添加标题 227 | tableWidget->setItem(row,1,new QTableWidgetItem(musicList[i].artist)); 228 | tableWidget->setItem(row,2,new QTableWidgetItem(musicList[i].albumn)); 229 | int dur=musicList[i].duration.toInt(); 230 | QString szDur; 231 | szDur.sprintf("%02d:%02d",dur/60,dur%60); 232 | tableWidget->setItem(row,3,new QTableWidgetItem(szDur)); 233 | 234 | //下面为在歌手处添加显示歌手信息图标,所以加了一个QLineEdit控件,并添加图标 235 | QLineEdit *edit=new QLineEdit(); 236 | //edit->setAttribute(); 237 | edit->setStyleSheet("border:0px;background:transparent;"); 238 | edit->setReadOnly(true); 239 | QAction* artistInfoAction=new QAction(QIcon(":/center/information"),QString::number(i),this); 240 | 241 | edit->addAction(artistInfoAction,QLineEdit::TrailingPosition); 242 | tableWidget->setCellWidget(row,1,edit); 243 | connect(artistInfoAction,SIGNAL(triggered()),this,SLOT(ShowArtistInfo())); 244 | } 245 | //添加完成后删除loadingwidget 246 | delete loadingLabel; 247 | loadingTimer->stop(); 248 | delete loadingTimer; 249 | loadingPicIndex=1; 250 | delete loadingWidget; 251 | } 252 | void SearchWidget::ShowArtistInfo() 253 | { 254 | QAction*ac = dynamic_cast(sender());//判断是从哪个action发送来的 255 | QString szNum= ac->text(); 256 | int index=szNum.toInt(); 257 | QString url = "http://tingapi.ting.baidu.com/v1/restserver/ting?from=android&version=5.6.5.0&method=baidu.ting.artist.getInfo&tinguid="+musicList[index].artist_id; 258 | QByteArray content=ContactHttp(url); 259 | GetArtistInfo(content); 260 | } 261 | void SearchWidget::GetArtistInfo(QByteArray byteArray) 262 | {//解析json中歌手信息 263 | QScriptEngine engine; 264 | QScriptValue sc = engine.evaluate("value=" + byteArray); 265 | QString picUrl=sc.property("avatar_s500").toString(); 266 | QString name=sc.property("name").toString(); 267 | QString stature=sc.property("stature").toString(); 268 | QString weight=sc.property("weight").toString(); 269 | QString birth=sc.property("birth").toString(); 270 | QString xingzuo=sc.property("constellation").toString(); 271 | QString country=sc.property("country").toString(); 272 | QString intro=sc.property("intro").toString(); 273 | 274 | //将歌手信息在一个新的widget中展现出来 275 | QWidget *infoWidget=new QWidget; 276 | infoWidget->setWindowFlags(Qt::FramelessWindowHint); 277 | //infoWidget->resize(600,400); 278 | infoWidget->setStyleSheet(GetQss("introWidget.qss")); 279 | 280 | QLabel *name_label=new QLabel("姓名:"+name); 281 | QLabel *stature_label=new QLabel("身高:"+stature); 282 | QLabel *weight_label=new QLabel("体重:"+weight); 283 | QLabel *birth_label=new QLabel("生日:"+birth); 284 | QLabel *xingzuo_label=new QLabel("星座:"+xingzuo); 285 | QLabel *country_label=new QLabel("国家:"+country); 286 | QPushButton *quitBtn=new QPushButton("关闭"); 287 | QTextEdit *intro_textEdit=new QTextEdit; 288 | intro_textEdit->setText(intro); 289 | intro_textEdit->setReadOnly(true); 290 | 291 | QLabel*picLabel=new QLabel; 292 | QPixmap pix=getWebPix(picUrl); 293 | pix=pix.scaled(300,300); 294 | picLabel->setPixmap(pix); 295 | QHBoxLayout *mainLay=new QHBoxLayout(infoWidget); 296 | mainLay->setContentsMargins(15,15,15,15); 297 | mainLay->setSpacing(30); 298 | 299 | QVBoxLayout *vLay=new QVBoxLayout; 300 | vLay->setContentsMargins(0,0,0,0); 301 | vLay->setSpacing(30); 302 | vLay->addWidget(name_label); 303 | vLay->addWidget(stature_label); 304 | vLay->addWidget(weight_label); 305 | vLay->addWidget(birth_label); 306 | vLay->addWidget(xingzuo_label); 307 | vLay->addWidget(country_label); 308 | vLay->addStretch(); 309 | vLay->addWidget(quitBtn); 310 | connect(quitBtn,SIGNAL(clicked()),infoWidget,SLOT(close())); 311 | 312 | mainLay->addWidget(picLabel,0,Qt::AlignTop); 313 | mainLay->addLayout(vLay); 314 | mainLay->addWidget(intro_textEdit); 315 | intro_textEdit->verticalScrollBar()->setStyleSheet("QScrollBar{background:rgb(180,180,180); width:12px;}\ 316 | QScrollBar::handle:vertical {\ 317 | background-color:rgb(150,220,150);\ 318 | border-radius: 6px;\ 319 | min-height: 5px;\ 320 | }"); 321 | infoWidget->show(); 322 | } 323 | QPixmap SearchWidget::getWebPix(QString picUrl) 324 | { 325 | QByteArray jpegData = ContactHttp(picUrl); 326 | QPixmap pixmap; 327 | pixmap.loadFromData(jpegData); 328 | 329 | return pixmap; 330 | } 331 | void SearchWidget::DoubleClickedTable(QTableWidgetItem* item) 332 | { 333 | int row = tableWidget->currentRow();//获得当前行号 334 | 335 | QString title= tableWidget->selectedItems().at(0)->text(); 336 | QString artist= tableWidget->selectedItems().at(1)->text(); 337 | QString time= tableWidget->selectedItems().at(3)->text(); 338 | 339 | int i=0; 340 | for(;i 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | #include 14 | #include 15 | /*#include 16 | #include 17 | #include*/ 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | typedef struct 24 | { 25 | QString albumn; 26 | QString duration; 27 | QString music_url; 28 | QString lrc_url; 29 | QString pic_url; 30 | QString title; 31 | QString artist; 32 | QString artist_id; 33 | }MUSICINFO; 34 | class SearchWidget : public QWidget 35 | { 36 | Q_OBJECT 37 | public: 38 | explicit SearchWidget(QWidget *parent = 0); 39 | ~SearchWidget(); 40 | void InitWidget(); 41 | void setStyle(const QString &style); 42 | void Mes(QString str) 43 | { 44 | QMessageBox::information(this,"search",str); 45 | } 46 | public: 47 | QPushButton *playAllBtn,*downLoad; 48 | QLabel *textLabel; 49 | QTableWidget *tableWidget; 50 | // QLabel *picLabel; 51 | QString searchContent; 52 | void Clear(); 53 | void Search(); 54 | QByteArray ContactHttp(QString); 55 | void GetIdList(QByteArray); 56 | void GetFurtherInfo(QString id); 57 | void readFurtherJson(QByteArray); 58 | void GetArtistInfo(QByteArray); 59 | QPixmap getWebPix(QString picUrl); 60 | MUSICINFO musicList[100]; 61 | QString idList[100]; 62 | int nCount1,nCount2; 63 | 64 | void AddToTableWidget(); 65 | QString GetQss(const QString &path) 66 | { 67 | QString content; 68 | QFile qss(path); 69 | qss.open(QFile::ReadOnly); 70 | content=qss.readAll(); 71 | qss.close(); 72 | return content; 73 | } 74 | 75 | QWidget *loadingWidget; 76 | void ShowLoadingWdiget(); 77 | QLabel *loadingLabel; 78 | QTimer *loadingTimer; 79 | int loadingPicIndex; 80 | private: 81 | bool bSearching; 82 | signals: 83 | void ChangeSong(QString); 84 | public slots: 85 | void DoubleClickedTable(QTableWidgetItem*); 86 | void ShowArtistInfo(); 87 | void TimerLoading(); 88 | }; 89 | 90 | #endif // SEARCHWIDGET_H 91 | -------------------------------------------------------------------------------- /showlrcwidget.cpp: -------------------------------------------------------------------------------- 1 | #include "showlrcwidget.h" 2 | #include 3 | #include 4 | #include"cv.h" 5 | #include"highgui.h" 6 | ShowLrcWidget::ShowLrcWidget(QWidget *parent) : QWidget(parent) 7 | { 8 | label=new QLabel; 9 | textEdit=new QTextEdit; 10 | downBtn=new MyPushButton; 11 | downBtn->setPicName(tr(":/playControl/down")); 12 | timer=new QTimer(this); 13 | textEdit->setReadOnly(true); 14 | textEdit->setAlignment(Qt::AlignCenter ); 15 | textEdit->setStyleSheet("border:0px;color:rgb(230,230,230); font: 75 16pt \"华文行楷\";font-size:18px;font-weight:300;background:rgba(100,100,100,128);"); 16 | textEdit->verticalScrollBar()->setStyleSheet("QScrollBar{background:rgb(180,180,180); width:12px;}\ 17 | QScrollBar::handle:vertical {\ 18 | background-color:rgb(150,220,150);\ 19 | border-radius: 6px;\ 20 | min-height: 5px;\ 21 | }\ 22 | "); 23 | QHBoxLayout *layout=new QHBoxLayout(this); 24 | layout->setContentsMargins(0,6,6,6); 25 | layout->addWidget(downBtn,0,Qt::AlignTop); 26 | layout->addSpacing(20); 27 | layout->addWidget(label,0,Qt::AlignVCenter); 28 | layout->addSpacing(20); 29 | layout->addWidget(textEdit); 30 | 31 | connect(timer,SIGNAL(timeout()),this,SLOT(onTimeout())); 32 | connect(downBtn,SIGNAL(clicked()),this,SIGNAL(HideLrc())); 33 | } 34 | 35 | ShowLrcWidget::~ShowLrcWidget() 36 | { 37 | 38 | } 39 | void ShowLrcWidget::ShowLrc() 40 | { 41 | QUrl url(lrcUrl); 42 | QNetworkAccessManager manager; 43 | QEventLoop loop; 44 | QNetworkReply *reply = manager.get(QNetworkRequest(url)); 45 | //请求结束并下载完成后,退出子事件循环 46 | QObject::connect(reply, SIGNAL(finished()), &loop, SLOT(quit())); 47 | //开启子事件循环 48 | loop.exec(); 49 | lrc = reply->readAll(); 50 | 51 | resolve_lrc();//解析lrc 52 | isFirstTime=true; 53 | QPixmap pixmap=getWebPix(picUrl); 54 | QPixmap scaledPixmap = pixmap.scaled(400,400); 55 | label->setPixmap(scaledPixmap); 56 | 57 | } 58 | void ShowLrcWidget::resolve_lrc() 59 | { 60 | textEdit->setText(""); 61 | QStringList lines=QString(lrc).split('\n'); 62 | QRegExp rx("\\[\\d{2}:\\d{2}\\.\\d{2}\\]"); 63 | foreach(QString oneline, lines) 64 | { 65 | QString temp = oneline; 66 | temp.replace(rx, "");//用空字符串替换正则表达式中所匹配的地方,这样就获得了歌词文本 67 | textEdit->append(temp);//此时添加的是不带时间标签的 68 | // 然后依次获取当前行中的所有时间标签,并分别与歌词文本存入QMap中 69 | //indexIn()为返回第一个匹配的位置,如果返回为-1,则表示没有匹配成功 70 | //正常情况下pos后面应该对应的是歌词文件 71 | int pos = rx.indexIn(oneline, 0); 72 | while (pos != -1) 73 | { //表示匹配成功 74 | QString cap = rx.cap(0);//返回第0个表达式匹配的内容 75 | // 将时间标签转换为时间数值,以毫秒为单位 76 | QRegExp regexp; 77 | regexp.setPattern("\\d{2}(?=:)"); 78 | regexp.indexIn(cap); 79 | int minute = regexp.cap(0).toInt(); 80 | regexp.setPattern("\\d{2}(?=\\.)"); 81 | regexp.indexIn(cap); 82 | int second = regexp.cap(0).toInt(); 83 | regexp.setPattern("\\d{2}(?=\\])"); 84 | regexp.indexIn(cap); 85 | int millisecond = regexp.cap(0).toInt(); 86 | qint64 totalTime = minute * 60000 + second * 1000; 87 | // 插入到lrc_map中 88 | lrc_map.insert(totalTime, temp); 89 | pos += rx.matchedLength(); 90 | pos = rx.indexIn(oneline, pos);//匹配全部 91 | } 92 | } 93 | //由于是一行一行的添加,所以光标初始是在末尾。所以此处先把光标移到起始位置 94 | QTextCursor cursor(textEdit->textCursor()); 95 | cursor.movePosition(QTextCursor::Start); 96 | textEdit->setTextCursor(cursor); 97 | } 98 | QPixmap ShowLrcWidget::getWebPix(QString picUrl) 99 | { 100 | 101 | QUrl pic_url(picUrl); 102 | QNetworkAccessManager manager; 103 | QEventLoop loop; 104 | QNetworkReply *reply = manager.get(QNetworkRequest(pic_url)); 105 | //请求结束并下载完成后,退出子事件循环 106 | QObject::connect(reply, SIGNAL(finished()), &loop, SLOT(quit())); 107 | //开启子事件循环 108 | loop.exec(); 109 | QByteArray jpegData = reply->readAll(); 110 | QPixmap pixmap; 111 | pixmap.loadFromData(jpegData); 112 | pixmap.save("./source.jpg");//将得到的封面保存以用来下面的convert函数进行处理,处理完成后再setbackground设为背景 113 | 114 | convertImage(); 115 | SetBackGround(); 116 | return pixmap; 117 | 118 | } 119 | 120 | void ShowLrcWidget::SetBackGround() 121 | { 122 | this->setAutoFillBackground(true); 123 | QPalette palette; 124 | palette.setBrush(QPalette::Background, QBrush(QPixmap("./res.png"))); 125 | this->setPalette(palette); 126 | } 127 | void ShowLrcWidget::convertImage()//转换为高斯模糊图像 128 | { 129 | IplImage *img = cvLoadImage("./source.jpg"); 130 | 131 | IplImage *t = cvCreateImage(cvGetSize(img), IPL_DEPTH_8U, 3); 132 | cvSmooth(img, t, CV_GAUSSIAN, 161, 161); 133 | cvWaitKey(500); 134 | cvSaveImage("./res.png", t); 135 | cvReleaseImage(&t); 136 | cvReleaseImage(&img); 137 | } 138 | void ShowLrcWidget::StartTimer() 139 | { 140 | pos=0; 141 | timer->start(1000); 142 | } 143 | void ShowLrcWidget::onTimeout() 144 | { 145 | pos++; 146 | static int cursorPos=1; 147 | QMap::iterator it;//遍历map 148 | for (it = lrc_map.begin();it != lrc_map.end(); ++it ) 149 | { 150 | if(it.key()==pos*1000) 151 | { 152 | QString str=it.value(); 153 | onFind(str); 154 | 155 | cursor = textEdit->textCursor(); 156 | //下面是为了保证当前唱的这句歌词保持在中央位置。方法。由于歌词显示一共24行,所以初始是从1开始,当到12行时,也就是中间位置 157 | //需要开始一行行的往下移动。所以在12行时,移动到末尾,也就是24行处,之后就每次移动一行就可以了 158 | if(cursorPos!=-1) 159 | { 160 | cursorPos++; 161 | if(cursorPos>=12) 162 | { 163 | cursor.movePosition(QTextCursor::Down,QTextCursor::MoveAnchor,12);//参数3是移动的次数 164 | textEdit->setTextCursor(cursor); 165 | cursorPos=-1; 166 | break; 167 | } 168 | } 169 | cursor.movePosition(QTextCursor::Down); 170 | textEdit->setTextCursor(cursor); 171 | break; 172 | 173 | } 174 | } 175 | } 176 | void ShowLrcWidget::onFind(QString searchString) 177 | { 178 | QTextDocument *document = textEdit->document(); 179 | bool found = false; 180 | if (isFirstTime == false) 181 | document->undo(); 182 | if (searchString == "") 183 | return; 184 | else { 185 | QTextCursor highlightCursor(document); 186 | QTextCursor cursor(document); 187 | //***************开始*************** 188 | cursor.beginEditBlock(); 189 | QTextCharFormat plainFormat(highlightCursor.charFormat()); 190 | QTextCharFormat colorFormat = plainFormat; 191 | colorFormat.setForeground(QColor(100,250,100)); 192 | while (!highlightCursor.isNull() && !highlightCursor.atEnd()) 193 | { 194 | highlightCursor = document->find(searchString, highlightCursor, QTextDocument::FindWholeWords); 195 | if (!highlightCursor.isNull()) 196 | { 197 | found = true; 198 | highlightCursor.mergeCharFormat(colorFormat); 199 | break; 200 | } 201 | } 202 | cursor.endEditBlock(); 203 | isFirstTime = false; 204 | } 205 | 206 | } 207 | -------------------------------------------------------------------------------- /showlrcwidget.h: -------------------------------------------------------------------------------- 1 | #ifndef SHOWLRCWIDGET_H 2 | #define SHOWLRCWIDGET_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include"mypushbutton.h" 16 | #include 17 | class ShowLrcWidget : public QWidget 18 | { 19 | Q_OBJECT 20 | public: 21 | explicit ShowLrcWidget(QWidget *parent = 0); 22 | ~ShowLrcWidget(); 23 | void Mes(QString str) 24 | { 25 | QMessageBox::information(this,"search",str); 26 | } 27 | QString lrcUrl,picUrl; 28 | QTimer *timer; 29 | bool isFirstTime; 30 | void StartTimer(); 31 | void onFind(QString); 32 | int pos; 33 | void ShowLrc(); 34 | QPixmap getWebPix(QString); 35 | void resolve_lrc(); 36 | void convertImage(); 37 | void SetBackGround(); 38 | private: 39 | QLabel *label; 40 | QTextEdit *textEdit; 41 | MyPushButton *downBtn; 42 | QByteArray lrc; 43 | QMap lrc_map; 44 | QTextCursor cursor; 45 | 46 | signals: 47 | void HideLrc(); 48 | public slots: 49 | void onTimeout(); 50 | }; 51 | 52 | #endif // SHOWLRCWIDGET_H 53 | -------------------------------------------------------------------------------- /titlebar.cpp: -------------------------------------------------------------------------------- 1 | #include "titlebar.h" 2 | #include 3 | #include 4 | 5 | #ifdef Q_OS_WIN 6 | #pragma comment(lib, "user32.lib") 7 | #include 8 | #endif 9 | TitleBar::TitleBar(QWidget *parent) : QWidget(parent) 10 | { 11 | setFixedHeight(55);//设置标题栏高度 12 | QPalette pal(palette()); 13 | pal.setColor(QPalette::Background,QColor(0,204,102)); 14 | setPalette(pal); 15 | setAutoFillBackground(true);//颜色要生效必须设置这句话 16 | QPalette text_palette(palette()); 17 | text_palette.setColor(QPalette::WindowText, QColor(255, 250, 250)); 18 | setPalette(text_palette); 19 | //设置文本粗体 20 | QFont &text_font = const_cast(font()); 21 | text_font.setWeight(QFont::Bold); 22 | //创建图标以及标题 23 | iconLabel=new QLabel; 24 | iconLabel->setFixedSize(30, 30);//设置图标大小 25 | iconLabel->setScaledContents(true);//设置自动缩放 26 | iconLabel->setPixmap(QPixmap(tr(":/logo"))); 27 | textLabel=new QLabel(tr("QQ音乐")); 28 | 29 | minBtn=new MyPushButton; 30 | closeBtn=new MyPushButton; 31 | // minBtn2,*menuBtn,*skinBtn,*vipBtn,*mailBtn; 32 | minBtn->setPicName(tr(":/title/min")); 33 | closeBtn->setPicName(tr(":/title/close")); 34 | minBtn2=new MyPushButton; 35 | minBtn2->setPicName(tr(":/title/min_arrow")); 36 | menuBtn=new MyPushButton; 37 | menuBtn->setPicName(tr(":/title/menu")); 38 | skinBtn=new MyPushButton; 39 | skinBtn->setPicName(tr(":/title/skin")); 40 | mailBtn=new MyPushButton; 41 | mailBtn->setPicName(tr(":/title/mail")); 42 | vipBtn=new MyPushButton; 43 | vipBtn->setPicName(tr(":/title/vip")); 44 | cloudBtn=new MyPushButton; 45 | cloudBtn->setPicName(tr(":/title/cloud")); 46 | 47 | searchEdit=new QLineEdit; 48 | searchEdit->setStyleSheet("border-radius:14px;border:1px solid rgb(220,220,200);height:28px;width:100px;padding-left:4px;font-style:bold;"); 49 | searchEdit->setPlaceholderText("输入你想搜索的歌曲"); 50 | searchAction=new QAction(QIcon(":/title/search"),tr("搜索"),this); 51 | searchEdit->addAction(searchAction,QLineEdit::TrailingPosition); 52 | connect(searchAction,SIGNAL(triggered()),this,SLOT(onSearch())); 53 | connect(searchEdit,SIGNAL(returnPressed()),this,SLOT(onSearch()));//回车时响应搜索 54 | //水平布局依次添加Widget 55 | QHBoxLayout *hLayout=new QHBoxLayout(this); 56 | hLayout->addWidget(iconLabel); 57 | hLayout->setSpacing(1); 58 | hLayout->addSpacing(5); 59 | hLayout->addWidget(textLabel); 60 | hLayout->addSpacing(100); 61 | hLayout->addWidget(cloudBtn); 62 | hLayout->addSpacing(10); 63 | hLayout->addWidget(searchEdit); 64 | hLayout->addSpacing(160); 65 | hLayout->addWidget(vipBtn); 66 | hLayout->addWidget(mailBtn); 67 | hLayout->addWidget(skinBtn); 68 | hLayout->addWidget(menuBtn); 69 | hLayout->addSpacing(15); 70 | hLayout->addWidget(minBtn2); 71 | hLayout->addWidget(minBtn); 72 | hLayout->addWidget(closeBtn); 73 | hLayout->setContentsMargins(5, 0, 10, 0); 74 | 75 | connect(minBtn,SIGNAL(clicked()),this,SLOT(onClicked())); 76 | connect(closeBtn,SIGNAL(clicked()),this,SLOT(onClicked())); 77 | 78 | } 79 | 80 | TitleBar::~TitleBar() 81 | { 82 | 83 | } 84 | void TitleBar::onClicked() 85 | { 86 | QPushButton *pButton = qobject_cast(sender()); 87 | QWidget *pWindow = this->window(); 88 | if (pWindow->isTopLevel()) 89 | { 90 | if (pButton == minBtn) 91 | { 92 | pWindow->showMinimized(); 93 | } 94 | /* else if (pButton == m_pMaximizeButton) 95 | { 96 | pWindow->isMaximized() ? pWindow->showNormal() : pWindow->showMaximized(); 97 | }*/ 98 | else if (pButton == closeBtn) 99 | { 100 | pWindow->close(); 101 | 102 | } 103 | } 104 | } 105 | void TitleBar::mousePressEvent(QMouseEvent *event)//移动窗口 106 | { 107 | #ifdef Q_OS_WIN 108 | if (ReleaseCapture()) 109 | { 110 | QWidget *pWindow = this->window(); 111 | if (pWindow->isTopLevel()) 112 | { 113 | SendMessage(HWND(pWindow->winId()), WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0); 114 | } 115 | } 116 | event->ignore(); 117 | #else 118 | #endif 119 | } 120 | void TitleBar::onSearch() 121 | { 122 | QString str=searchEdit->text(); 123 | emit Search(str); 124 | } 125 | -------------------------------------------------------------------------------- /titlebar.h: -------------------------------------------------------------------------------- 1 | #ifndef TITLEBAR_H 2 | #define TITLEBAR_H 3 | 4 | #include 5 | #include"mypushbutton.h" 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | class TitleBar : public QWidget 13 | { 14 | Q_OBJECT 15 | public: 16 | explicit TitleBar(QWidget *parent = 0); 17 | ~TitleBar(); 18 | void mousePressEvent(QMouseEvent *); 19 | 20 | private: 21 | MyPushButton *minBtn,*closeBtn; 22 | MyPushButton*minBtn2,*menuBtn,*skinBtn,*vipBtn,*mailBtn,*cloudBtn; 23 | QLabel *iconLabel,*textLabel; 24 | QAction *searchAction; 25 | QLineEdit *searchEdit; 26 | signals: 27 | void Search(QString); 28 | public slots: 29 | void onClicked(); 30 | void onSearch(); 31 | }; 32 | 33 | #endif // TITLEBAR_H 34 | -------------------------------------------------------------------------------- /trylistenwidget.cpp: -------------------------------------------------------------------------------- 1 | #include "trylistenwidget.h" 2 | #include 3 | #include 4 | #include 5 | #include 6 | TryListenWidget::TryListenWidget(QWidget *parent) : QWidget(parent) 7 | { 8 | InitWidget(); 9 | 10 | QVBoxLayout *main_lay=new QVBoxLayout(this); 11 | main_lay->setSpacing(10); 12 | main_lay->setContentsMargins(20,20,20,0); 13 | main_lay->addWidget(textLabel); 14 | QHBoxLayout *btnLay=new QHBoxLayout; 15 | btnLay->setSpacing(15); 16 | btnLay->setContentsMargins(0,0,0,0); 17 | btnLay->addWidget(playAllBtn); 18 | btnLay->addWidget(downLoad); 19 | btnLay->addStretch(); 20 | btnLay->addWidget(searchEdit); 21 | main_lay->addLayout(btnLay); 22 | main_lay->addWidget(tableWidget); 23 | 24 | setStyle(":/qss/center"); 25 | } 26 | 27 | TryListenWidget::~TryListenWidget() 28 | { 29 | 30 | } 31 | void TryListenWidget::InitWidget() 32 | { 33 | textLabel=new QLabel("试听列表");//标题 34 | playAllBtn=new QPushButton(QIcon(":/center/play"),"播放全部"); 35 | downLoad = new QPushButton(QIcon(":/center/download"),"下载"); 36 | searchEdit=new QLineEdit; 37 | searchEdit->setFixedHeight(28); 38 | searchEdit->setPlaceholderText("在试听列表中搜索"); 39 | searchAction=new QAction(QIcon(":/title/search"),tr("搜索"),this); 40 | searchEdit->addAction(searchAction,QLineEdit::TrailingPosition); 41 | 42 | tableWidget = new QTableWidget(20,4); 43 | QStringList header; 44 | header<<"歌曲"<<"歌手"<<"专辑"<<"时长"; 45 | tableWidget->setHorizontalHeaderLabels(header);//插入表头 46 | tableWidget->verticalHeader()->setVisible(false); 47 | tableWidget->setItem(0,0,new QTableWidgetItem("半城烟沙")); 48 | tableWidget->setItem(0,1,new QTableWidgetItem("许嵩")); 49 | tableWidget->setItem(0,2,new QTableWidgetItem("半城烟沙")); 50 | tableWidget->setItem(0,3,new QTableWidgetItem("04:52")); 51 | tableWidget->setSelectionBehavior(QAbstractItemView::SelectRows);//设置选中一行 52 | tableWidget->setEditTriggers(QAbstractItemView::NoEditTriggers);//设置不可编辑 53 | tableWidget->setColumnWidth(0,300); 54 | tableWidget->setColumnWidth(1,180); 55 | tableWidget->setColumnWidth(2,180); 56 | tableWidget->setColumnWidth(3,100); 57 | 58 | //tableWidget->setRowHeight(0,60); 59 | tableWidget->setStyleSheet("QTableWidget{\ 60 | font-size:13px; \ 61 | font-weight:300;\ 62 | color: rgb(60,60,60);\ 63 | gridline-color: white;\ 64 | alternate-background: #3A3A3C;\ 65 | selection-background-color: rgb(210,210,210);\ 66 | selection-color:rgb(60,60,60);\ 67 | border: 2px groove gray;\ 68 | border-radius: 0px;\ 69 | border:1px solid rgb(220,220,220);}\ 70 | }"); 71 | tableWidget->verticalScrollBar()->setStyleSheet("QScrollBar{background:rgb(230,230,230); width:12px;}\ 72 | QScrollBar::handle:vertical {\ 73 | background-color:rgb(200,200,200);\ 74 | border-radius: 6px;\ 75 | min-height: 5px;\ 76 | }\ 77 | "); 78 | } 79 | void TryListenWidget::setStyle(const QString &style) 80 | { 81 | QFile qss(style); 82 | qss.open(QFile::ReadOnly); 83 | setStyleSheet(qss.readAll()); 84 | qss.close(); 85 | } 86 | -------------------------------------------------------------------------------- /trylistenwidget.h: -------------------------------------------------------------------------------- 1 | #ifndef TRYLISTENWIDGET_H 2 | #define TRYLISTENWIDGET_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | class TryListenWidget : public QWidget 12 | { 13 | Q_OBJECT 14 | public: 15 | explicit TryListenWidget(QWidget *parent = 0); 16 | ~TryListenWidget(); 17 | void InitWidget(); 18 | void setStyle(const QString &style); 19 | public: 20 | QPushButton *playAllBtn,*downLoad; 21 | QLineEdit *searchEdit; 22 | QAction *searchAction; 23 | QLabel *textLabel; 24 | QTableWidget *tableWidget; 25 | 26 | signals: 27 | 28 | public slots: 29 | }; 30 | 31 | #endif // TryListenWidget_H 32 | -------------------------------------------------------------------------------- /主界面截图.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/主界面截图.png -------------------------------------------------------------------------------- /音乐api/QQ音乐.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/音乐api/QQ音乐.txt -------------------------------------------------------------------------------- /音乐api/QQ音乐2.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/音乐api/QQ音乐2.txt -------------------------------------------------------------------------------- /音乐api/百度音乐api.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/音乐api/百度音乐api.txt -------------------------------------------------------------------------------- /音乐api/百度音乐解析流程.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/音乐api/百度音乐解析流程.txt -------------------------------------------------------------------------------- /音乐api/虾米音乐api.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeviInfinity/QQ-Music-With-Qt/8f3843035786fb51e028b511523a49719ae0d3a6/音乐api/虾米音乐api.txt --------------------------------------------------------------------------------