提交 ca37ac2c 编写于 作者: 花狗Fdog's avatar 花狗Fdog

ui细节优化

上级 9abcdfd0
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.5.0, 2020-08-12T20:41:58. -->
<!-- Written by QtCreator 4.5.0, 2020-08-14T18:49:31. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
......
......@@ -154,20 +154,17 @@ debug\qrc_lib.cpp: lib.qrc \
lib\b.png \
lib\guanbi.png \
lib\sousuo.png \
lib\yinyue_1.png \
lib\shipin.png \
lib\xunhuan.png \
lib\timg.jpg \
lib\13.jpg \
lib\ci-copy.png \
lib\zhankai.png \
lib\1zantingtingzhi.png \
lib\xiayiqu.png \
lib\9.jpg \
lib\yinyue.png \
lib\zuidahua.png \
lib\shengyin.png \
lib\pifu.png \
lib\paihangbang.png \
lib\timg2.png \
lib\8.jpg \
lib\shangyiqu.png \
lib\11.jpg \
......@@ -183,12 +180,11 @@ debug\qrc_lib.cpp: lib.qrc \
lib\xuanxiang1.png \
lib\5.jpg \
lib\gedan_1.png \
lib\ci.png \
lib\4.jpg \
lib\jingyin.png \
lib\bendi.png \
lib\xiazai.png \
lib\zanting.png \
lib\stop.png \
lib\shiting.png
D:\QT\5.10.0\msvc2015_64\bin\rcc.exe -name lib lib.qrc -o debug\qrc_lib.cpp
......@@ -773,7 +769,9 @@ debug\mainwindow.obj: mainwindow.cpp mainwindow.h \
..\..\QT\5.10.0\msvc2015_64\include\QtCore\QJsonObject \
..\..\QT\5.10.0\msvc2015_64\include\QtCore\qjsonobject.h \
..\..\QT\5.10.0\msvc2015_64\include\QtCore\QJsonArray \
..\..\QT\5.10.0\msvc2015_64\include\QtCore\qjsonarray.h
..\..\QT\5.10.0\msvc2015_64\include\QtCore\qjsonarray.h \
..\..\QT\5.10.0\msvc2015_64\include\QtGui\QPixmap \
..\..\QT\5.10.0\msvc2015_64\include\QtCore\QSize
debug\qrc_lib.obj: debug\qrc_lib.cpp
......
......@@ -154,20 +154,17 @@ release\qrc_lib.cpp: lib.qrc \
lib\b.png \
lib\guanbi.png \
lib\sousuo.png \
lib\yinyue_1.png \
lib\shipin.png \
lib\xunhuan.png \
lib\timg.jpg \
lib\13.jpg \
lib\ci-copy.png \
lib\zhankai.png \
lib\1zantingtingzhi.png \
lib\xiayiqu.png \
lib\9.jpg \
lib\yinyue.png \
lib\zuidahua.png \
lib\shengyin.png \
lib\pifu.png \
lib\paihangbang.png \
lib\timg2.png \
lib\8.jpg \
lib\shangyiqu.png \
lib\11.jpg \
......@@ -183,12 +180,11 @@ release\qrc_lib.cpp: lib.qrc \
lib\xuanxiang1.png \
lib\5.jpg \
lib\gedan_1.png \
lib\ci.png \
lib\4.jpg \
lib\jingyin.png \
lib\bendi.png \
lib\xiazai.png \
lib\zanting.png \
lib\stop.png \
lib\shiting.png
D:\QT\5.10.0\msvc2015_64\bin\rcc.exe -name lib lib.qrc -o release\qrc_lib.cpp
......@@ -773,7 +769,9 @@ release\mainwindow.obj: mainwindow.cpp mainwindow.h \
..\..\QT\5.10.0\msvc2015_64\include\QtCore\QJsonObject \
..\..\QT\5.10.0\msvc2015_64\include\QtCore\qjsonobject.h \
..\..\QT\5.10.0\msvc2015_64\include\QtCore\QJsonArray \
..\..\QT\5.10.0\msvc2015_64\include\QtCore\qjsonarray.h
..\..\QT\5.10.0\msvc2015_64\include\QtCore\qjsonarray.h \
..\..\QT\5.10.0\msvc2015_64\include\QtGui\QPixmap \
..\..\QT\5.10.0\msvc2015_64\include\QtCore\QSize
release\qrc_lib.obj: release\qrc_lib.cpp
......
此差异已折叠。
无法预览此类型文件
......@@ -2,26 +2,20 @@
<qresource prefix="/">
<file>lib/shangyiqu.png</file>
<file>lib/shezhi.png</file>
<file>lib/stop.png</file>
<file>lib/xuanxiang.png</file>
<file>lib/zanting.png</file>
<file>lib/zuidahua.png</file>
<file>lib/zuixiao.png</file>
<file>lib/shengyin.png</file>
<file>lib/xunhuan.png</file>
<file>lib/guanbi.png</file>
<file>lib/timg.jpg</file>
<file>lib/timg2.png</file>
<file>C:/Users/fdog/Desktop/image-20200806113923681.png</file>
<file>lib/timg (1).jpg</file>
<file>lib/timg (6).jpg</file>
<file>lib/b.png</file>
<file>lib/bendi.png</file>
<file>lib/ci-copy.png</file>
<file>lib/lishijilu.png</file>
<file>lib/love.png</file>
<file>lib/pifu.png</file>
<file>lib/shipin.png</file>
<file>lib/sousuo.png</file>
<file>lib/su.png</file>
<file>lib/touxiang.png</file>
......@@ -44,9 +38,11 @@
<file>lib/paihangbang.png</file>
<file>lib/shiting.png</file>
<file>lib/xiazai.png</file>
<file>lib/yinyue_1.png</file>
<file>lib/add.png</file>
<file>lib/QQ图片20200810205923.png</file>
<file>lib/yinyue.png</file>
<file>lib/xiayiqu.png</file>
<file>lib/ci.png</file>
<file>lib/zhankai.png</file>
</qresource>
</RCC>
lib/1zantingtingzhi.png

10.0 KB | W: | H:

lib/1zantingtingzhi.png

6.1 KB | W: | H:

lib/1zantingtingzhi.png
lib/1zantingtingzhi.png
lib/1zantingtingzhi.png
lib/1zantingtingzhi.png
  • 2-up
  • Swipe
  • Onion skin
lib/add.png

56.0 KB | W: | H:

lib/add.png

3.3 KB | W: | H:

lib/add.png
lib/add.png
lib/add.png
lib/add.png
  • 2-up
  • Swipe
  • Onion skin
lib/bendi.png

22.8 KB | W: | H:

lib/bendi.png

1.8 KB | W: | H:

lib/bendi.png
lib/bendi.png
lib/bendi.png
lib/bendi.png
  • 2-up
  • Swipe
  • Onion skin
lib/gedan.png

8.7 KB | W: | H:

lib/gedan.png

1.7 KB | W: | H:

lib/gedan.png
lib/gedan.png
lib/gedan.png
lib/gedan.png
  • 2-up
  • Swipe
  • Onion skin
lib/gedan_1.png

11.4 KB | W: | H:

lib/gedan_1.png

1.9 KB | W: | H:

lib/gedan_1.png
lib/gedan_1.png
lib/gedan_1.png
lib/gedan_1.png
  • 2-up
  • Swipe
  • Onion skin
lib/jingyin.png

5.6 KB | W: | H:

lib/jingyin.png

1.4 KB | W: | H:

lib/jingyin.png
lib/jingyin.png
lib/jingyin.png
lib/jingyin.png
  • 2-up
  • Swipe
  • Onion skin
lib/lishijilu.png

15.9 KB | W: | H:

lib/lishijilu.png

2.5 KB | W: | H:

lib/lishijilu.png
lib/lishijilu.png
lib/lishijilu.png
lib/lishijilu.png
  • 2-up
  • Swipe
  • Onion skin
lib/love.png

3.6 KB | W: | H:

lib/love.png

6.3 KB | W: | H:

lib/love.png
lib/love.png
lib/love.png
lib/love.png
  • 2-up
  • Swipe
  • Onion skin
lib/paihangbang.png

9.4 KB | W: | H:

lib/paihangbang.png

1.9 KB | W: | H:

lib/paihangbang.png
lib/paihangbang.png
lib/paihangbang.png
lib/paihangbang.png
  • 2-up
  • Swipe
  • Onion skin
lib/pifu.png

9.2 KB | W: | H:

lib/pifu.png

2.0 KB | W: | H:

lib/pifu.png
lib/pifu.png
lib/pifu.png
lib/pifu.png
  • 2-up
  • Swipe
  • Onion skin
lib/shangyiqu.png

17.5 KB | W: | H:

lib/shangyiqu.png

8.6 KB | W: | H:

lib/shangyiqu.png
lib/shangyiqu.png
lib/shangyiqu.png
lib/shangyiqu.png
  • 2-up
  • Swipe
  • Onion skin
lib/shengyin.png

7.3 KB | W: | H:

lib/shengyin.png

1.7 KB | W: | H:

lib/shengyin.png
lib/shengyin.png
lib/shengyin.png
lib/shengyin.png
  • 2-up
  • Swipe
  • Onion skin
lib/shezhi.png

38.2 KB | W: | H:

lib/shezhi.png

2.8 KB | W: | H:

lib/shezhi.png
lib/shezhi.png
lib/shezhi.png
lib/shezhi.png
  • 2-up
  • Swipe
  • Onion skin
lib/sousuo.png

12.1 KB | W: | H:

lib/sousuo.png

2.0 KB | W: | H:

lib/sousuo.png
lib/sousuo.png
lib/sousuo.png
lib/sousuo.png
  • 2-up
  • Swipe
  • Onion skin
lib/su.png

20.8 KB | W: | H:

lib/su.png

4.4 KB | W: | H:

lib/su.png
lib/su.png
lib/su.png
lib/su.png
  • 2-up
  • Swipe
  • Onion skin
lib/touxiang.png

17.9 KB | W: | H:

lib/touxiang.png

2.7 KB | W: | H:

lib/touxiang.png
lib/touxiang.png
lib/touxiang.png
lib/touxiang.png
  • 2-up
  • Swipe
  • Onion skin
lib/xiazai.png

34.6 KB | W: | H:

lib/xiazai.png

3.3 KB | W: | H:

lib/xiazai.png
lib/xiazai.png
lib/xiazai.png
lib/xiazai.png
  • 2-up
  • Swipe
  • Onion skin
lib/xuanxiang.png

3.8 KB | W: | H:

lib/xuanxiang.png

1.1 KB | W: | H:

lib/xuanxiang.png
lib/xuanxiang.png
lib/xuanxiang.png
lib/xuanxiang.png
  • 2-up
  • Swipe
  • Onion skin
lib/xunhuan.png

5.2 KB | W: | H:

lib/xunhuan.png

1.3 KB | W: | H:

lib/xunhuan.png
lib/xunhuan.png
lib/xunhuan.png
lib/xunhuan.png
  • 2-up
  • Swipe
  • Onion skin
lib/zuidahua.png

1.2 KB | W: | H:

lib/zuidahua.png

777 字节 | W: | H:

lib/zuidahua.png
lib/zuidahua.png
lib/zuidahua.png
lib/zuidahua.png
  • 2-up
  • Swipe
  • Onion skin
lib/zuixiao.png

884 字节 | W: | H:

lib/zuixiao.png

757 字节 | W: | H:

lib/zuixiao.png
lib/zuixiao.png
lib/zuixiao.png
lib/zuixiao.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -14,7 +14,6 @@
#include<QJsonArray>
#include<QUrl>
#include<QPixmap>
#include<QFile>
#include<QSize>
#if _MSC_VER >= 1600
......@@ -216,9 +215,7 @@ void MainWindow::parseJsonSongInfo(QString json)
{
QString audio_name;//歌手-歌名
QString play_url;//播放地址
QString timelength; //时间
QString img;
//qDebug()<<json;
QByteArray byte_array;
QJsonParseError json_error;
QJsonDocument parse_doucment = QJsonDocument::fromJson(byte_array.append(json), &json_error);
......@@ -247,7 +244,6 @@ void MainWindow::parseJsonSongInfo(QString json)
player->setVolume(50);
player->play();
}
}
}
if(valuedataObject.contains("audio_name"))
......@@ -255,15 +251,13 @@ void MainWindow::parseJsonSongInfo(QString json)
QJsonValue play_name_value = valuedataObject.take("audio_name");
if(play_name_value.isString())
{
QString audio_name = play_name_value.toString(); //歌曲名字
QString audio_name = play_name_value.toString(); //歌曲名字
if(audio_name!="")
{
//显示
qDebug()<<audio_name;
ui->label_2->setText(audio_name);
//emit nameAdd(play_name);
}
}
}
if(valuedataObject.contains("lyrics")) //lrc
......@@ -283,7 +277,6 @@ void MainWindow::parseJsonSongInfo(QString json)
//emit lrcAdd("没有歌词");
}
}
}
}
if(valuedataObject.contains("img"))
......@@ -294,10 +287,7 @@ void MainWindow::parseJsonSongInfo(QString json)
QString audio_name = play_name_value.toString(); //歌曲名字
if(audio_name!="")
{
//显示
qDebug()<<"1 测试"<<audio_name;
m_Jpg.append(audio_name);
qDebug()<<"2 测试"<<m_Jpg.at(0);
network_request3->setUrl(QUrl(audio_name));
network_manager3->get(*network_request3);
}
......@@ -313,7 +303,6 @@ void MainWindow::parseJsonSongInfo(QString json)
}
}
}
}
void MainWindow::on_pushButton_clicked()
......@@ -512,9 +501,6 @@ void MainWindow::replyFinished3(QNetworkReply *reply)
pixmap.loadFromData(bytes);
//pixmap.save(".pixmap//123456.jpg");
ui->label_10->setPixmap(pixmap.scaled(picSize));
}
else
{
......@@ -542,8 +528,4 @@ void MainWindow::on_tableWidget_cellDoubleClicked(int row, int column)
network_request2->setRawHeader("Cookie","kg_mid=2333");
network_request2->setHeader(QNetworkRequest::CookieHeader, 2333);
network_manager2->get(*network_request2);
//图片请求
//qDebug()<<"测试"<<m_Vectorlist.at(row);
}
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include<QtMultimedia/QMediaPlayer>
#include<QtMultimedia/QMediaPlaylist>
#include<QFileDialog>
#include<QDir>
#include<QPoint>
#include<QNetworkAccessManager>
#include<QVariant>
#include<QByteArray>
#include<QJsonParseError>
#include<QJsonDocument>
#include<QJsonObject>
#include<QJsonArray>
#include<QUrl>
#include<QPixmap>
#include<QSize>
#if _MSC_VER >= 1600
#pragma execution_character_set("utf-8")
#endif
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
this->setWindowFlags(Qt::FramelessWindowHint);//去掉标题栏
player = new QMediaPlayer(this);
playlist = new QMediaPlaylist(this);
playlist->setPlaybackMode(QMediaPlaylist::Sequential);
player->setPlaylist(playlist);
connect(player,SIGNAL(stateChanged(QMediaPlayer::State)),
this,SLOT(onStateChanged(QMediaPlayer::State)));
connect(player,SIGNAL(positionChanged(qint64)),
this,SLOT(onPositionChanged(qint64)));
connect(player,SIGNAL(durationChanged(qint64)),
this,SLOT(onDurationChanged(qint64)));
connect(playlist,SIGNAL(currentIndexChanged(int)),
this,SLOT(onPlaylistChanged(int)));
network_manager = new QNetworkAccessManager();
network_request = new QNetworkRequest();
network_manager2 = new QNetworkAccessManager();
network_request2 = new QNetworkRequest();
network_manager3 = new QNetworkAccessManager();
network_request3 = new QNetworkRequest();
connect(network_manager, &QNetworkAccessManager::finished, this, &MainWindow::replyFinished);
connect(network_manager2, &QNetworkAccessManager::finished, this, &MainWindow::replyFinished2);
connect(network_manager3, &QNetworkAccessManager::finished,this, &MainWindow::replyFinished3);
//整行选中的方式
ui->tableWidget->setSelectionBehavior(QAbstractItemView::SelectRows);
//禁止编辑
ui->tableWidget->setEditTriggers(QAbstractItemView::NoEditTriggers);
ui->tableWidget->setColumnWidth(0,240);
ui->tableWidget->setColumnWidth(1,190);
ui->tableWidget->setColumnWidth(2,210);
ui->tableWidget->setColumnWidth(3,140);
//ui->tableWidget->setColumnWidth(4,100);
//去除选中虚线框
ui->tableWidget->setFocusPolicy(Qt::NoFocus);
//不显示网格线
ui->tableWidget->setShowGrid(false);
}
MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow::mousePressEvent(QMouseEvent *event)
{
if (event->button() == Qt::LeftButton)
{
m_bIsWindowMoveable = true;
m_point = event->pos();
}
}
void MainWindow::mouseMoveEvent(QMouseEvent *event)
{
if (m_bIsWindowMoveable)
{
move(event->pos() - m_point + pos());
}
}
void MainWindow::mouseReleaseEvent(QMouseEvent *event)
{
Q_UNUSED(event);
m_bIsWindowMoveable = false;
}
void MainWindow::search(QString str)
{
QString KGAPISTR1 = QString("http://mobilecdn.kugou.com/api/v3/search/song?format=json"
"&keyword=%1&page=1&pagesize=18").arg(str);
network_request->setUrl(QUrl(KGAPISTR1));
network_manager->get(*network_request);
}
void MainWindow::parseJson(QString json)
{
QString songname_original; //歌曲名
QString singername; //歌手
QString hashStr; //hash
QString album_name; //专辑
int duration; //时间
QByteArray byte_array;
QJsonParseError json_error;
QJsonDocument parse_doucment = QJsonDocument::fromJson(byte_array.append(json), &json_error);
if (json_error.error == QJsonParseError::NoError)
{
if (parse_doucment.isObject())
{
QJsonObject rootObj = parse_doucment.object();
if (rootObj.contains("data"))
{
QJsonValue valuedata = rootObj.value("data");
if (valuedata.isObject())
{
QJsonObject valuedataObject = valuedata.toObject();
if (valuedataObject.contains("info"))
{
QJsonValue valueArray = valuedataObject.value("info");
if (valueArray.isArray())
{
QJsonArray array = valueArray.toArray();
int size = array.size();
for (int i = 0; i < size; i++)
{
QJsonValue value = array.at(i);
if (value.isObject())
{
QJsonObject object = value.toObject();
if (object.contains("songname_original"))//歌曲名
{
QJsonValue AlbumID_value = object.take("songname_original");
if (AlbumID_value.isString())
{
songname_original = AlbumID_value.toString();
}
}
if (object.contains("singername"))//歌手
{
QJsonValue AlbumID_value = object.take("singername");
if (AlbumID_value.isString())
{
singername = AlbumID_value.toString();
}
}
if (object.contains("album_name"))//专辑
{
QJsonValue AlbumID_value = object.take("album_name");
if (AlbumID_value.isString())
{
album_name = AlbumID_value.toString();
}
}
if (object.contains("hash")) //hash
{
QJsonValue FileHash_value = object.take("hash");
if (FileHash_value.isString())
{
hashStr = FileHash_value.toString();
m_Vectorlist.append(FileHash_value.toString());
}
}
if (object.contains("album_id"))
{
QJsonValue FileHash_value = object.take("album_id");
if (FileHash_value.isString())
{
//hashStr = FileHash_value.toString();
m_ID.append(FileHash_value.toString());
}
}
if (object.contains("duration"))//时长
{
QJsonValue AlbumID_value = object.take("duration").toInt();
duration = AlbumID_value.toInt();
}
//歌曲名+歌手+专辑+时间
QString str = songname_original+" "+singername+" "+album_name+" "+QString::number(duration);
//qDebug() << str;
ui->tableWidget->setItem(i,0,new QTableWidgetItem(songname_original));
ui->tableWidget->item(i,0)->setTextAlignment(Qt::AlignHCenter|Qt::AlignVCenter);
ui->tableWidget->setItem(i,1,new QTableWidgetItem(singername));
ui->tableWidget->item(i,1)->setTextAlignment(Qt::AlignHCenter|Qt::AlignVCenter);
ui->tableWidget->setItem(i,2,new QTableWidgetItem(album_name));
ui->tableWidget->item(i,2)->setTextAlignment(Qt::AlignHCenter|Qt::AlignVCenter);
int min = duration/60;
int sesc = duration%60;
QString time = QString("%1:%2").arg(min).arg(sesc);
ui->tableWidget->setItem(i,4,new QTableWidgetItem(time));
ui->tableWidget->item(i,4)->setTextAlignment(Qt::AlignHCenter|Qt::AlignVCenter);
}
}
}
}
}
}
}
}
else
{
qDebug() << json_error.errorString();
}
}
void MainWindow::parseJsonSongInfo(QString json)
{
QString audio_name;//歌手-歌名
QString play_url;//播放地址
QString img;
QByteArray byte_array;
QJsonParseError json_error;
QJsonDocument parse_doucment = QJsonDocument::fromJson(byte_array.append(json), &json_error);
if(json_error.error == QJsonParseError::NoError)
{
if(parse_doucment.isObject())
{
QJsonObject rootObj = parse_doucment.object();
if(rootObj.contains("data"))
{
QJsonValue valuedata = rootObj.value("data");
if(valuedata.isObject())
{
QJsonObject valuedataObject = valuedata.toObject();
QString play_urlStr("");
if(valuedataObject.contains("play_url"))
{
QJsonValue play_url_value = valuedataObject.take("play_url");
if(play_url_value.isString())
{
play_urlStr = play_url_value.toString(); //歌曲的url
if(play_urlStr!="")
{
qDebug()<<play_urlStr;
player->setMedia(QUrl(play_urlStr));
player->setVolume(50);
player->play();
}
}
}
if(valuedataObject.contains("audio_name"))
{
QJsonValue play_name_value = valuedataObject.take("audio_name");
if(play_name_value.isString())
{
QString audio_name = play_name_value.toString(); //歌曲名字
if(audio_name!="")
{
//显示
qDebug()<<audio_name;
ui->label_2->setText(audio_name);
}
}
}
if(valuedataObject.contains("lyrics")) //lrc
{
QJsonValue play_url_value = valuedataObject.take("lyrics");
if(play_url_value.isString())
{
QString play_lrcStr = play_url_value.toString();
if(play_urlStr!="")
{
if(play_lrcStr != "")
{
//emit lrcAdd(play_lrcStr);
}
else
{
//emit lrcAdd("没有歌词");
}
}
}
}
if(valuedataObject.contains("img"))
{
QJsonValue play_name_value = valuedataObject.take("img");
if(play_name_value.isString())
{
QString audio_name = play_name_value.toString(); //歌曲名字
if(audio_name!="")
{
m_Jpg.append(audio_name);
network_request3->setUrl(QUrl(audio_name));
network_manager3->get(*network_request3);
}
}
}
}
else
{
qDebug()<<"出错";
}
}
}
}
}
void MainWindow::on_pushButton_clicked()
{
QString curPash =QDir::currentPath();
QString dlgTitle="选择音频文件";
QString filter="音频文件(*.mp3 *.wav *.wma)mp3文件(*.mp3);;wav文件(*.wav);;wma文件(*.wma);;所有文件(*.*)";
QStringList fileList = QFileDialog::getOpenFileNames(this,dlgTitle,curPash,filter);
if(fileList.count()<1)
return;
for(int i = 0;i<fileList.count();i++)
{
QString aFile = fileList.at(i);
playlist->addMedia(QUrl::fromLocalFile(aFile));
QFileInfo fileInfo(aFile);
ui->listWidget->addItem(fileInfo.fileName());
ui->plainTextEdit->appendPlainText(fileList.at(i));
}
if(player->state()!=QMediaPlayer::PlayingState)
{
playlist->setCurrentIndex(M_Value);
}
player->play();
}
void MainWindow::onStateChanged(QMediaPlayer::State state)
{
}
void MainWindow::onPlaylistChanged(int position)
{
ui->listWidget->setCurrentRow(position);
QListWidgetItem * item = ui->listWidget->currentItem();
if(item)
{
ui->label_2->setText(item->text());
}
}
void MainWindow::onDurationChanged(qint64 duration)
{
ui->horizontalSlider->setMaximum(duration);
int secs = duration/1000;
int mins = secs/60;
secs = secs % 60;
durationTime = QString::asprintf("%d:%d",mins,secs);
ui->label->setText(positionTime+"/"+durationTime);
}
void MainWindow::onPositionChanged(qint64 position)
{
if(ui->horizontalSlider->isSliderDown())
return;
ui->horizontalSlider->setSliderPosition(position);
int secs = position/1000;
int mins = secs/60;
secs = secs % 60;
positionTime = QString::asprintf("%d:%d",mins,secs);
ui->label->setText(positionTime+"/"+durationTime);
}
void MainWindow::on_horizontalSlider_sliderReleased()
{
player->setPosition(ui->horizontalSlider->value());
}
void MainWindow::on_pushButton_3_clicked()
{
M_Amount = playlist->mediaCount();//总数
if(M_Value == M_Amount)
{
M_Value =0;
playlist->setCurrentIndex(M_Value);
if(m_IsPause==true)
{
player->play();
}
return;
}
playlist->setCurrentIndex(++M_Value);
if(m_IsPause==true)
{
player->play();
}
}
void MainWindow::on_pushButton_1_clicked()
{
M_Amount = playlist->mediaCount();
if(M_Value == 0)
{
M_Value=M_Amount;
playlist->setCurrentIndex(M_Value);
if(m_IsPause==true)
{
player->play();
}
return;
}
playlist->setCurrentIndex(--M_Value);
if(m_IsPause==true)
{
player->play();
}
}
void MainWindow::on_pushButton_2_clicked()
{
if(m_IsPause==true)//false 为播放
{
ui->pushButton_2->setStyleSheet("border-image: url(:/lib/1bofang.png);");
m_IsPause = false;
player->pause();
return;
}
m_IsPause = true;
ui->pushButton_2->setStyleSheet("border-image: url(:/lib/1zantingtingzhi.png);");
player->play();
}
void MainWindow::on_horizontalSlider_2_valueChanged(int value)
{
player->setVolume(value);
}
void MainWindow::on_pushButton_5_clicked()
{
if(m_Volume ==true)
{
m_Volume = false;
ui->pushButton_5->setStyleSheet("border-image: url(:/lib/shengyin.png);");
player->setVolume(ui->horizontalSlider_2->value());
return;
}
m_Volume = true;
ui->pushButton_5->setStyleSheet("border-image: url(:/lib/jingyin.png);");
player->setVolume(0);
}
void MainWindow::on_verticalSlider_valueChanged(int value)
{
player->setPlaybackRate(value);
}
void MainWindow::replyFinished(QNetworkReply *reply)
{
//获取响应的信息,状态码为200表示正常
QVariant status_code = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute);
//无错误返回
if(reply->error() == QNetworkReply::NoError)
{
QByteArray bytes = reply->readAll(); //获取字节
QString result(bytes); //转化为字符串
qDebug()<<result;
parseJson(result);
}
else
{
//处理错误
qDebug()<<"处理错误1";
}
}
void MainWindow::replyFinished2(QNetworkReply *reply)
{
//获取响应的信息,状态码为200表示正常
QVariant status_code = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute);
//无错误返回
if(reply->error() == QNetworkReply::NoError)
{
QByteArray bytes = reply->readAll(); //获取字节
QString result(bytes); //转化为字符串
parseJsonSongInfo(result);
}
else
{
//处理错误
qDebug()<<"处理错误2";
}
}
void MainWindow::replyFinished3(QNetworkReply *reply)
{
//获取响应的信息,状态码为200表示正常
QVariant status_code = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute);
//无错误返回
if(reply->error() == QNetworkReply::NoError)
{
QByteArray bytes = reply->readAll(); //获取字节
QPixmap pixmap;
QSize picSize(45,45);
pixmap.loadFromData(bytes);
//pixmap.save(".pixmap//123456.jpg");
ui->label_10->setPixmap(pixmap.scaled(picSize));
}
else
{
//处理错误
qDebug()<<"处理错误3";
}
}
void MainWindow::on_pushButton_6_clicked()
{
search(ui->lineEdit_3->text());
}
void MainWindow::on_pushButton_7_clicked()
{
search(ui->lineEdit_2->text());
}
void MainWindow::on_tableWidget_cellDoubleClicked(int row, int column)
{
//歌曲请求
QString KGAPISTR1 =QString("http://www.kugou.com/yy/index.php?r=play/getdata"
"&hash=%1&album_id=%2&_=1497972864535").arg(m_Vectorlist.at(row)).arg(m_ID.at(row));
network_request2->setUrl(QUrl(KGAPISTR1));
network_request2->setRawHeader("Cookie","kg_mid=2333");
network_request2->setHeader(QNetworkRequest::CookieHeader, 2333);
network_manager2->get(*network_request2);
}
......@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>1107</width>
<width>1109</width>
<height>700</height>
</rect>
</property>
......@@ -20,7 +20,7 @@
<property name="styleSheet">
<string notr="true">#centralWidget
{
border-image: url(:/lib/5.jpg);
border-image: url(:/lib/timg (1).jpg);
}</string>
</property>
<widget class="QWidget" name="centralWidget">
......@@ -98,7 +98,7 @@ background-color: rgba(245, 245, 245, 80);
<property name="minimumSize">
<size>
<width>20</width>
<height>20</height>
<height>22</height>
</size>
</property>
<property name="styleSheet">
......@@ -257,32 +257,11 @@ background-color: rgba(245, 245, 245, 80);
<x>0</x>
<y>0</y>
<width>1111</width>
<height>51</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgba(0, 255, 255,70);</string>
</property>
<property name="text">
<string/>
</property>
</widget>
<widget class="QLabel" name="label_6">
<property name="geometry">
<rect>
<x>-1</x>
<y>51</y>
<width>1111</width>
<height>651</height>
<height>701</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgba(0, 255, 255,70);</string>
<string notr="true">background-color: rgba(0, 170, 255, 80);</string>
</property>
<property name="text">
<string/>
......@@ -291,10 +270,10 @@ background-color: rgba(245, 245, 245, 80);
<widget class="QFrame" name="frame_2">
<property name="geometry">
<rect>
<x>339</x>
<x>349</x>
<y>639</y>
<width>521</width>
<height>55</height>
<height>57</height>
</rect>
</property>
<property name="frameShape">
......@@ -398,7 +377,7 @@ background-color: rgba(245, 245, 245, 80);
</size>
</property>
<property name="styleSheet">
<string notr="true">border-image: url(:/lib/shangyiqu.png);</string>
<string notr="true">border-image: url(:/lib/xiayiqu.png);</string>
</property>
<property name="text">
<string/>
......@@ -433,10 +412,10 @@ background-color: rgba(245, 245, 245, 80);
</property>
<property name="geometry">
<rect>
<x>300</x>
<x>310</x>
<y>627</y>
<width>621</width>
<height>16</height>
<height>11</height>
</rect>
</property>
<property name="minimumSize">
......@@ -464,7 +443,7 @@ background-color: rgba(245, 245, 245, 80);
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>920</x>
<x>930</x>
<y>630</y>
<width>91</width>
<height>21</height>
......@@ -487,7 +466,7 @@ background-color: rgba(245, 245, 245, 80);
color: rgb(255, 255, 255);</string>
</property>
<property name="text">
<string>6:25/7:52</string>
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
......@@ -503,7 +482,7 @@ color: rgb(255, 255, 255);</string>
<property name="geometry">
<rect>
<x>22</x>
<y>12</y>
<y>6</y>
<width>123</width>
<height>38</height>
</rect>
......@@ -521,8 +500,8 @@ color: rgb(255, 255, 255);</string>
<widget class="QLabel" name="label_2">
<property name="geometry">
<rect>
<x>100</x>
<y>638</y>
<x>102</x>
<y>633</y>
<width>181</width>
<height>20</height>
</rect>
......@@ -533,20 +512,20 @@ color: rgb(255, 255, 255);</string>
color: rgb(255, 255, 255);</string>
</property>
<property name="text">
<string>阿悠悠 - 旧梦一场.mp3</string>
<string/>
</property>
</widget>
<widget class="QLabel" name="label_5">
<property name="geometry">
<rect>
<x>922</x>
<x>932</x>
<y>660</y>
<width>31</width>
<height>30</height>
<width>25</width>
<height>25</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">border-image: url(:/lib/ci-copy.png);</string>
<string notr="true">border-image: url(:/lib/ci.png);</string>
</property>
<property name="text">
<string/>
......@@ -555,10 +534,10 @@ color: rgb(255, 255, 255);</string>
<widget class="QLabel" name="label_7">
<property name="geometry">
<rect>
<x>969</x>
<x>979</x>
<y>660</y>
<width>31</width>
<height>31</height>
<width>25</width>
<height>25</height>
</rect>
</property>
<property name="styleSheet">
......@@ -606,7 +585,8 @@ border-color:rgb(163, 163, 163);</string>
</rect>
</property>
<property name="styleSheet">
<string notr="true">border-image: url(:/lib/sousuo.png);</string>
<string notr="true">border-image: url(:/lib/sousuo.png);
background-color: rgb(255, 170, 127);</string>
</property>
<property name="text">
<string/>
......@@ -652,10 +632,10 @@ color: rgb(255, 255, 255);</string>
<widget class="QLabel" name="label_11">
<property name="geometry">
<rect>
<x>108</x>
<y>665</y>
<x>110</x>
<y>660</y>
<width>20</width>
<height>20</height>
<height>18</height>
</rect>
</property>
<property name="styleSheet">
......@@ -669,9 +649,9 @@ border-image: url(:/lib/love.png);</string>
<widget class="QSlider" name="verticalSlider">
<property name="geometry">
<rect>
<x>1012</x>
<x>1022</x>
<y>630</y>
<width>16</width>
<width>10</width>
<height>61</height>
</rect>
</property>
......@@ -697,7 +677,7 @@ border-image: url(:/lib/love.png);</string>
<property name="styleSheet">
<string notr="true">
font: 11pt;
color: rgb(255, 255, 255);</string>
color: rgb(234, 234, 234);</string>
</property>
<property name="text">
<string>在线音乐</string>
......@@ -718,7 +698,7 @@ color: rgb(255, 255, 255);</string>
<property name="styleSheet">
<string notr="true">
font: 11pt;
color: rgb(255, 255, 255);</string>
color: rgb(234, 234, 234);</string>
</property>
<property name="text">
<string>我的音乐</string>
......@@ -744,7 +724,7 @@ color: rgb(255, 255, 255);</string>
<property name="styleSheet">
<string notr="true">
font: 11pt;
color: rgb(255, 255, 255);</string>
color: rgb(234, 234, 234);</string>
</property>
<property name="text">
<string>其他</string>
......@@ -1153,14 +1133,14 @@ background-color: rgba(232, 232, 232, 100);
<widget class="QLabel" name="label_10">
<property name="geometry">
<rect>
<x>44</x>
<y>640</y>
<x>46</x>
<y>634</y>
<width>45</width>
<height>45</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">border-image: url(:/lib/QQ图片20200810205923.png);
<string notr="true">
border-radius:4px;</string>
</property>
<property name="text">
......@@ -1170,10 +1150,10 @@ border-radius:4px;</string>
<widget class="QLabel" name="label_15">
<property name="geometry">
<rect>
<x>142</x>
<y>665</y>
<x>144</x>
<y>660</y>
<width>20</width>
<height>20</height>
<height>18</height>
</rect>
</property>
<property name="styleSheet">
......@@ -1193,7 +1173,7 @@ border-radius:4px;</string>
</rect>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgba(255, 255, 255, 0);</string>
<string notr="true">background-color: rgba(255, 255, 255, 200);</string>
</property>
<property name="currentIndex">
<number>2</number>
......@@ -1508,8 +1488,8 @@ border-left-width:0;
<widget class="QLineEdit" name="lineEdit_4">
<property name="geometry">
<rect>
<x>10</x>
<y>240</y>
<x>70</x>
<y>50</y>
<width>781</width>
<height>171</height>
</rect>
......@@ -1540,8 +1520,40 @@ border-left-width:0;
<string>PushButton</string>
</property>
</widget>
<widget class="QLabel" name="label_16">
<property name="geometry">
<rect>
<x>0</x>
<y>49</y>
<width>170</width>
<height>567</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgba(206, 206, 206, 80);</string>
</property>
<property name="text">
<string/>
</property>
</widget>
<widget class="QLabel" name="label_17">
<property name="geometry">
<rect>
<x>20</x>
<y>650</y>
<width>21</width>
<height>16</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">border-image: url(:/lib/zhankai.png);</string>
</property>
<property name="text">
<string/>
</property>
</widget>
<zorder>label_3</zorder>
<zorder>label_6</zorder>
<zorder>label_16</zorder>
<zorder>frame_4</zorder>
<zorder>frame_2</zorder>
<zorder>horizontalSlider</zorder>
......@@ -1574,6 +1586,7 @@ border-left-width:0;
<zorder>stackedWidget</zorder>
<zorder>lineEdit_3</zorder>
<zorder>pushButton_6</zorder>
<zorder>label_17</zorder>
</widget>
</widget>
<layoutdefault spacing="6" margin="11"/>
......
......@@ -47,7 +47,6 @@ public:
QSpacerItem *horizontalSpacer_4;
QToolButton *toolButton_4;
QLabel *label_3;
QLabel *label_6;
QFrame *frame_2;
QPushButton *pushButton_4;
QSlider *horizontalSlider_2;
......@@ -95,18 +94,20 @@ public:
QLineEdit *lineEdit_4;
QLineEdit *lineEdit_3;
QPushButton *pushButton_6;
QLabel *label_16;
QLabel *label_17;
void setupUi(QMainWindow *MainWindow)
{
if (MainWindow->objectName().isEmpty())
MainWindow->setObjectName(QStringLiteral("MainWindow"));
MainWindow->resize(1107, 700);
MainWindow->resize(1109, 700);
QIcon icon;
icon.addFile(QStringLiteral(":/lib/yinyue.png"), QSize(), QIcon::Normal, QIcon::Off);
MainWindow->setWindowIcon(icon);
MainWindow->setStyleSheet(QLatin1String("#centralWidget\n"
"{\n"
"border-image: url(:/lib/5.jpg);\n"
"border-image: url(:/lib/timg (1).jpg);\n"
"}"));
centralWidget = new QWidget(MainWindow);
centralWidget->setObjectName(QStringLiteral("centralWidget"));
......@@ -145,7 +146,7 @@ public:
toolButton_1 = new QToolButton(frame_4);
toolButton_1->setObjectName(QStringLiteral("toolButton_1"));
toolButton_1->setMinimumSize(QSize(20, 20));
toolButton_1->setMinimumSize(QSize(20, 22));
toolButton_1->setStyleSheet(QLatin1String("\n"
"#toolButton_1\n"
"{\n"
......@@ -221,18 +222,11 @@ public:
label_3 = new QLabel(centralWidget);
label_3->setObjectName(QStringLiteral("label_3"));
label_3->setGeometry(QRect(0, 0, 1111, 51));
label_3->setStyleSheet(QStringLiteral("background-color: rgba(0, 255, 255,70);"));
label_6 = new QLabel(centralWidget);
label_6->setObjectName(QStringLiteral("label_6"));
label_6->setGeometry(QRect(-1, 51, 1111, 651));
QFont font;
font.setPointSize(9);
label_6->setFont(font);
label_6->setStyleSheet(QStringLiteral("background-color: rgba(0, 255, 255,70);"));
label_3->setGeometry(QRect(0, 0, 1111, 701));
label_3->setStyleSheet(QStringLiteral("background-color: rgba(0, 170, 255, 80);"));
frame_2 = new QFrame(centralWidget);
frame_2->setObjectName(QStringLiteral("frame_2"));
frame_2->setGeometry(QRect(339, 639, 521, 55));
frame_2->setGeometry(QRect(349, 639, 521, 57));
frame_2->setFrameShape(QFrame::StyledPanel);
frame_2->setFrameShadow(QFrame::Raised);
pushButton_4 = new QPushButton(frame_2);
......@@ -258,7 +252,7 @@ public:
pushButton_3->setObjectName(QStringLiteral("pushButton_3"));
pushButton_3->setGeometry(QRect(305, 10, 40, 40));
pushButton_3->setMinimumSize(QSize(40, 40));
pushButton_3->setStyleSheet(QStringLiteral("border-image: url(:/lib/shangyiqu.png);"));
pushButton_3->setStyleSheet(QStringLiteral("border-image: url(:/lib/xiayiqu.png);"));
pushButton_2 = new QPushButton(frame_2);
pushButton_2->setObjectName(QStringLiteral("pushButton_2"));
pushButton_2->setGeometry(QRect(210, 6, 50, 50));
......@@ -267,7 +261,7 @@ public:
horizontalSlider = new QSlider(centralWidget);
horizontalSlider->setObjectName(QStringLiteral("horizontalSlider"));
horizontalSlider->setEnabled(true);
horizontalSlider->setGeometry(QRect(300, 627, 621, 16));
horizontalSlider->setGeometry(QRect(310, 627, 621, 11));
horizontalSlider->setMinimumSize(QSize(153, 0));
horizontalSlider->setSingleStep(0);
horizontalSlider->setPageStep(16);
......@@ -276,7 +270,7 @@ public:
horizontalSlider->setTickInterval(0);
label = new QLabel(centralWidget);
label->setObjectName(QStringLiteral("label"));
label->setGeometry(QRect(920, 630, 91, 21));
label->setGeometry(QRect(930, 630, 91, 21));
label->setMinimumSize(QSize(0, 0));
label->setMaximumSize(QSize(11111111, 16777215));
label->setStyleSheet(QLatin1String("font: 75 11pt \"Adobe Gothic Std B\";\n"
......@@ -286,22 +280,22 @@ public:
label->setIndent(-1);
label_4 = new QLabel(centralWidget);
label_4->setObjectName(QStringLiteral("label_4"));
label_4->setGeometry(QRect(22, 12, 123, 38));
label_4->setGeometry(QRect(22, 6, 123, 38));
label_4->setStyleSheet(QStringLiteral("border-image: url(:/lib/b.png);"));
label_4->setAlignment(Qt::AlignCenter);
label_2 = new QLabel(centralWidget);
label_2->setObjectName(QStringLiteral("label_2"));
label_2->setGeometry(QRect(100, 638, 181, 20));
label_2->setGeometry(QRect(102, 633, 181, 20));
label_2->setStyleSheet(QLatin1String("font:16px;\n"
"\n"
"color: rgb(255, 255, 255);"));
label_5 = new QLabel(centralWidget);
label_5->setObjectName(QStringLiteral("label_5"));
label_5->setGeometry(QRect(922, 660, 31, 30));
label_5->setStyleSheet(QStringLiteral("border-image: url(:/lib/ci-copy.png);"));
label_5->setGeometry(QRect(932, 660, 25, 25));
label_5->setStyleSheet(QStringLiteral("border-image: url(:/lib/ci.png);"));
label_7 = new QLabel(centralWidget);
label_7->setObjectName(QStringLiteral("label_7"));
label_7->setGeometry(QRect(969, 660, 31, 31));
label_7->setGeometry(QRect(979, 660, 25, 25));
label_7->setStyleSheet(QLatin1String("font: 75 12pt \"Adobe Gothic Std B\";\n"
"border-image: url(:/lib/su.png);\n"
"\n"
......@@ -316,7 +310,8 @@ public:
pushButton_7 = new QPushButton(centralWidget);
pushButton_7->setObjectName(QStringLiteral("pushButton_7"));
pushButton_7->setGeometry(QRect(462, 15, 23, 23));
pushButton_7->setStyleSheet(QStringLiteral("border-image: url(:/lib/sousuo.png);"));
pushButton_7->setStyleSheet(QLatin1String("border-image: url(:/lib/sousuo.png);\n"
"background-color: rgb(255, 170, 127);"));
label_8 = new QLabel(centralWidget);
label_8->setObjectName(QStringLiteral("label_8"));
label_8->setGeometry(QRect(767, 14, 27, 27));
......@@ -330,12 +325,12 @@ public:
label_9->setAlignment(Qt::AlignCenter);
label_11 = new QLabel(centralWidget);
label_11->setObjectName(QStringLiteral("label_11"));
label_11->setGeometry(QRect(108, 665, 20, 20));
label_11->setGeometry(QRect(110, 660, 20, 18));
label_11->setStyleSheet(QLatin1String("\n"
"border-image: url(:/lib/love.png);"));
verticalSlider = new QSlider(centralWidget);
verticalSlider->setObjectName(QStringLiteral("verticalSlider"));
verticalSlider->setGeometry(QRect(1012, 630, 16, 61));
verticalSlider->setGeometry(QRect(1022, 630, 10, 61));
verticalSlider->setMinimum(1);
verticalSlider->setMaximum(3);
verticalSlider->setOrientation(Qt::Vertical);
......@@ -344,32 +339,32 @@ public:
label_12->setGeometry(QRect(10, 80, 81, 21));
label_12->setStyleSheet(QLatin1String("\n"
"font: 11pt;\n"
"color: rgb(255, 255, 255);"));
"color: rgb(234, 234, 234);"));
label_13 = new QLabel(centralWidget);
label_13->setObjectName(QStringLiteral("label_13"));
label_13->setGeometry(QRect(10, 240, 81, 21));
label_13->setLayoutDirection(Qt::LeftToRight);
label_13->setStyleSheet(QLatin1String("\n"
"font: 11pt;\n"
"color: rgb(255, 255, 255);"));
"color: rgb(234, 234, 234);"));
label_14 = new QLabel(centralWidget);
label_14->setObjectName(QStringLiteral("label_14"));
label_14->setGeometry(QRect(10, 440, 81, 21));
QFont font1;
font1.setPointSize(11);
font1.setBold(false);
font1.setItalic(false);
font1.setWeight(50);
label_14->setFont(font1);
QFont font;
font.setPointSize(11);
font.setBold(false);
font.setItalic(false);
font.setWeight(50);
label_14->setFont(font);
label_14->setStyleSheet(QLatin1String("\n"
"font: 11pt;\n"
"color: rgb(255, 255, 255);"));
"color: rgb(234, 234, 234);"));
pushButton_8 = new QPushButton(centralWidget);
pushButton_8->setObjectName(QStringLiteral("pushButton_8"));
pushButton_8->setGeometry(QRect(10, 110, 151, 31));
QFont font2;
font2.setPointSize(12);
pushButton_8->setFont(font2);
QFont font1;
font1.setPointSize(12);
pushButton_8->setFont(font1);
pushButton_8->setLayoutDirection(Qt::LeftToRight);
pushButton_8->setStyleSheet(QLatin1String("#pushButton_8\n"
"{\n"
......@@ -392,9 +387,9 @@ public:
pushButton_9 = new QPushButton(centralWidget);
pushButton_9->setObjectName(QStringLiteral("pushButton_9"));
pushButton_9->setGeometry(QRect(10, 150, 151, 31));
QFont font3;
font3.setPointSize(11);
pushButton_9->setFont(font3);
QFont font2;
font2.setPointSize(11);
pushButton_9->setFont(font2);
pushButton_9->setStyleSheet(QLatin1String("#pushButton_9\n"
"{\n"
"text-align:left;\n"
......@@ -415,7 +410,7 @@ public:
pushButton_10 = new QPushButton(centralWidget);
pushButton_10->setObjectName(QStringLiteral("pushButton_10"));
pushButton_10->setGeometry(QRect(10, 190, 151, 31));
pushButton_10->setFont(font2);
pushButton_10->setFont(font1);
pushButton_10->setStyleSheet(QLatin1String("#pushButton_10\n"
"{\n"
"text-align:left;\n"
......@@ -436,7 +431,7 @@ public:
pushButton_11 = new QPushButton(centralWidget);
pushButton_11->setObjectName(QStringLiteral("pushButton_11"));
pushButton_11->setGeometry(QRect(10, 270, 151, 31));
pushButton_11->setFont(font2);
pushButton_11->setFont(font1);
pushButton_11->setStyleSheet(QLatin1String("#pushButton_11\n"
"{\n"
"text-align:left;\n"
......@@ -457,7 +452,7 @@ public:
pushButton_12 = new QPushButton(centralWidget);
pushButton_12->setObjectName(QStringLiteral("pushButton_12"));
pushButton_12->setGeometry(QRect(10, 350, 151, 31));
pushButton_12->setFont(font2);
pushButton_12->setFont(font1);
pushButton_12->setStyleSheet(QLatin1String("#pushButton_12\n"
"{\n"
"text-align:left;\n"
......@@ -478,7 +473,7 @@ public:
pushButton_13 = new QPushButton(centralWidget);
pushButton_13->setObjectName(QStringLiteral("pushButton_13"));
pushButton_13->setGeometry(QRect(10, 390, 151, 31));
pushButton_13->setFont(font2);
pushButton_13->setFont(font1);
pushButton_13->setStyleSheet(QLatin1String("#pushButton_13\n"
"{\n"
"text-align:left;\n"
......@@ -500,7 +495,7 @@ public:
pushButton_14 = new QPushButton(centralWidget);
pushButton_14->setObjectName(QStringLiteral("pushButton_14"));
pushButton_14->setGeometry(QRect(10, 470, 151, 31));
pushButton_14->setFont(font2);
pushButton_14->setFont(font1);
pushButton_14->setStyleSheet(QLatin1String("#pushButton_14\n"
"{\n"
"text-align:left;\n"
......@@ -521,7 +516,7 @@ public:
pushButton_15 = new QPushButton(centralWidget);
pushButton_15->setObjectName(QStringLiteral("pushButton_15"));
pushButton_15->setGeometry(QRect(10, 510, 151, 31));
pushButton_15->setFont(font2);
pushButton_15->setFont(font1);
pushButton_15->setStyleSheet(QLatin1String("#pushButton_15\n"
"{\n"
"text-align:left;\n"
......@@ -542,7 +537,7 @@ public:
pushButton = new QPushButton(centralWidget);
pushButton->setObjectName(QStringLiteral("pushButton"));
pushButton->setGeometry(QRect(10, 550, 151, 31));
pushButton->setFont(font2);
pushButton->setFont(font1);
pushButton->setStyleSheet(QLatin1String("#pushButton\n"
"{\n"
"text-align:left;\n"
......@@ -563,7 +558,7 @@ public:
pushButton_16 = new QPushButton(centralWidget);
pushButton_16->setObjectName(QStringLiteral("pushButton_16"));
pushButton_16->setGeometry(QRect(10, 310, 151, 31));
pushButton_16->setFont(font2);
pushButton_16->setFont(font1);
pushButton_16->setStyleSheet(QLatin1String("#pushButton_16\n"
"{\n"
"text-align:left;\n"
......@@ -584,17 +579,17 @@ public:
pushButton_16->setIconSize(QSize(16, 16));
label_10 = new QLabel(centralWidget);
label_10->setObjectName(QStringLiteral("label_10"));
label_10->setGeometry(QRect(44, 640, 45, 45));
label_10->setStyleSheet(QString::fromUtf8("border-image: url(:/lib/QQ\345\233\276\347\211\20720200810205923.png);\n"
label_10->setGeometry(QRect(46, 634, 45, 45));
label_10->setStyleSheet(QLatin1String("\n"
"border-radius:4px;"));
label_15 = new QLabel(centralWidget);
label_15->setObjectName(QStringLiteral("label_15"));
label_15->setGeometry(QRect(142, 665, 20, 20));
label_15->setGeometry(QRect(144, 660, 20, 18));
label_15->setStyleSheet(QStringLiteral("border-image: url(:/lib/xiazai.png);"));
stackedWidget = new QStackedWidget(centralWidget);
stackedWidget->setObjectName(QStringLiteral("stackedWidget"));
stackedWidget->setGeometry(QRect(170, 49, 921, 567));
stackedWidget->setStyleSheet(QStringLiteral("background-color: rgba(255, 255, 255, 0);"));
stackedWidget->setStyleSheet(QStringLiteral("background-color: rgba(255, 255, 255, 200);"));
page = new QWidget();
page->setObjectName(QStringLiteral("page"));
frame = new QFrame(page);
......@@ -624,13 +619,13 @@ public:
listWidget = new QListWidget(page_2);
listWidget->setObjectName(QStringLiteral("listWidget"));
listWidget->setGeometry(QRect(10, 50, 581, 341));
QFont font4;
font4.setFamily(QString::fromUtf8("\345\256\213\344\275\223"));
font4.setPointSize(9);
font4.setBold(false);
font4.setItalic(false);
font4.setWeight(50);
listWidget->setFont(font4);
QFont font3;
font3.setFamily(QString::fromUtf8("\345\256\213\344\275\223"));
font3.setPointSize(9);
font3.setBold(false);
font3.setItalic(false);
font3.setWeight(50);
listWidget->setFont(font3);
listWidget->setStyleSheet(QString::fromUtf8("font: 9pt \"\345\256\213\344\275\223\";"));
listWidget->setFrameShape(QFrame::NoFrame);
listWidget->setFrameShadow(QFrame::Plain);
......@@ -694,10 +689,10 @@ public:
tableWidget->setVerticalHeaderItem(14, __qtablewidgetitem19);
tableWidget->setObjectName(QStringLiteral("tableWidget"));
tableWidget->setGeometry(QRect(0, 0, 921, 581));
QFont font5;
font5.setBold(true);
font5.setWeight(75);
tableWidget->setFont(font5);
QFont font4;
font4.setBold(true);
font4.setWeight(75);
tableWidget->setFont(font4);
tableWidget->setContextMenuPolicy(Qt::DefaultContextMenu);
tableWidget->setStyleSheet(QString::fromUtf8("QTableWidget{\n"
"background-color: rgb(116, 116, 116);\n"
......@@ -742,7 +737,7 @@ public:
page_4->setObjectName(QStringLiteral("page_4"));
lineEdit_4 = new QLineEdit(page_4);
lineEdit_4->setObjectName(QStringLiteral("lineEdit_4"));
lineEdit_4->setGeometry(QRect(10, 240, 781, 171));
lineEdit_4->setGeometry(QRect(70, 50, 781, 171));
stackedWidget->addWidget(page_4);
lineEdit_3 = new QLineEdit(centralWidget);
lineEdit_3->setObjectName(QStringLiteral("lineEdit_3"));
......@@ -750,9 +745,17 @@ public:
pushButton_6 = new QPushButton(centralWidget);
pushButton_6->setObjectName(QStringLiteral("pushButton_6"));
pushButton_6->setGeometry(QRect(1110, 100, 75, 23));
label_16 = new QLabel(centralWidget);
label_16->setObjectName(QStringLiteral("label_16"));
label_16->setGeometry(QRect(0, 49, 170, 567));
label_16->setStyleSheet(QStringLiteral("background-color: rgba(206, 206, 206, 80);"));
label_17 = new QLabel(centralWidget);
label_17->setObjectName(QStringLiteral("label_17"));
label_17->setGeometry(QRect(20, 650, 21, 16));
label_17->setStyleSheet(QStringLiteral("border-image: url(:/lib/zhankai.png);"));
MainWindow->setCentralWidget(centralWidget);
label_3->raise();
label_6->raise();
label_16->raise();
frame_4->raise();
frame_2->raise();
horizontalSlider->raise();
......@@ -785,6 +788,7 @@ public:
stackedWidget->raise();
lineEdit_3->raise();
pushButton_6->raise();
label_17->raise();
retranslateUi(MainWindow);
QObject::connect(toolButton_4, SIGNAL(clicked()), MainWindow, SLOT(close()));
......@@ -806,15 +810,14 @@ public:
toolButton_3->setText(QString());
toolButton_4->setText(QString());
label_3->setText(QString());
label_6->setText(QString());
pushButton_4->setText(QString());
pushButton_5->setText(QString());
pushButton_1->setText(QString());
pushButton_3->setText(QString());
pushButton_2->setText(QString());
label->setText(QApplication::translate("MainWindow", "6:25/7:52", nullptr));
label->setText(QString());
label_4->setText(QString());
label_2->setText(QApplication::translate("MainWindow", "\351\230\277\346\202\240\346\202\240 - \346\227\247\346\242\246\344\270\200\345\234\272.mp3", nullptr));
label_2->setText(QString());
label_5->setText(QString());
label_7->setText(QString());
lineEdit_2->setInputMask(QString());
......@@ -882,6 +885,8 @@ public:
QTableWidgetItem *___qtablewidgetitem19 = tableWidget->verticalHeaderItem(14);
___qtablewidgetitem19->setText(QApplication::translate("MainWindow", "\346\226\260\345\273\272\350\241\214", nullptr));
pushButton_6->setText(QApplication::translate("MainWindow", "PushButton", nullptr));
label_16->setText(QString());
label_17->setText(QString());
} // retranslateUi
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册