Compare commits
10 Commits
51eed417f5
...
95719184ec
Author | SHA1 | Date |
---|---|---|
flykhan | 95719184ec | |
flykhan | 749120f14a | |
flykhan | effdecb2e7 | |
flykhan | bb93831252 | |
flykhan | fd2d480e33 | |
flykhan | 6383a53fbe | |
flykhan | de57e166c1 | |
flykhan | 42a4be7a34 | |
flykhan | cc43a876f5 | |
flykhan | 44913a15c1 |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.9 KiB |
145
mainwindow.cpp
|
@ -2,8 +2,10 @@
|
||||||
#include "ui_mainwindow.h"
|
#include "ui_mainwindow.h"
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
int mplayer_pid;
|
int mplayer_pid; // 子进程号
|
||||||
pthread_t t1,t2; //
|
pthread_t t1,t2; // 线程
|
||||||
|
char current_song_path_name[128] = ""; // 当前歌曲路径
|
||||||
|
int currentVolume = 20; // 当前音量 10
|
||||||
|
|
||||||
void *getTimerThreadFunc(void *arg); // 发送获取当前时间的 mplayer 命令
|
void *getTimerThreadFunc(void *arg); // 发送获取当前时间的 mplayer 命令
|
||||||
void *readPipeMSG(void *arg); // 获取当前时间的线程
|
void *readPipeMSG(void *arg); // 获取当前时间的线程
|
||||||
|
@ -13,6 +15,15 @@ MainWindow::MainWindow(QWidget *parent)
|
||||||
, ui(new Ui::MainWindow)
|
, ui(new Ui::MainWindow)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
|
|
||||||
|
QSize windowSize = QSize(geometry().width(), geometry().height());
|
||||||
|
// 设置背景图片
|
||||||
|
setAutoFillBackground(true);
|
||||||
|
QPalette pal = this->palette();
|
||||||
|
pal.setBrush(backgroundRole(),QPixmap(":/img/background1").scaled(windowSize, Qt::KeepAspectRatio));
|
||||||
|
setPalette(pal);
|
||||||
|
|
||||||
initMainWindow(); // 初始化主界面
|
initMainWindow(); // 初始化主界面
|
||||||
mplayerInit(); // 初始化 mplayer
|
mplayerInit(); // 初始化 mplayer
|
||||||
kill(mplayer_pid,SIGSTOP);
|
kill(mplayer_pid,SIGSTOP);
|
||||||
|
@ -21,8 +32,10 @@ MainWindow::MainWindow(QWidget *parent)
|
||||||
|
|
||||||
// 捕获当前时间信号
|
// 捕获当前时间信号
|
||||||
connect(this, SIGNAL(currentTimeSignal(int)), this, SLOT(setCurrentTimeLabel(int)));
|
connect(this, SIGNAL(currentTimeSignal(int)), this, SLOT(setCurrentTimeLabel(int)));
|
||||||
// 建立滑块修改信号通讯
|
// 建立歌曲进度滑块修改信号通讯
|
||||||
connect(this, SIGNAL(currentProgressSignal(int)), this, SLOT(setCurrentSlider(int)));
|
connect(this, SIGNAL(currentProgressSignal(int)), this, SLOT(setCurrentSlider(int)));
|
||||||
|
// 建立音量大小滑块信号通讯
|
||||||
|
// connect(this, SIGNAL(currentVolumeSignal(int)), this, SLOT(setVolumeSlider(int)));
|
||||||
}
|
}
|
||||||
|
|
||||||
MainWindow::~MainWindow()
|
MainWindow::~MainWindow()
|
||||||
|
@ -36,8 +49,10 @@ void MainWindow::initMainWindow()
|
||||||
{
|
{
|
||||||
// 设置主窗体属性
|
// 设置主窗体属性
|
||||||
setWindowTitle("音乐播放器");
|
setWindowTitle("音乐播放器");
|
||||||
|
setFixedSize(1055,750);
|
||||||
setWindowIcon(QIcon(":/icon/button"));
|
setWindowIcon(QIcon(":/icon/button"));
|
||||||
|
|
||||||
|
|
||||||
// 设置子组件背景透明
|
// 设置子组件背景透明
|
||||||
ui->song_list_widget->setAttribute(Qt::WA_TranslucentBackground);
|
ui->song_list_widget->setAttribute(Qt::WA_TranslucentBackground);
|
||||||
ui->label_artist->setAttribute(Qt::WA_TranslucentBackground);
|
ui->label_artist->setAttribute(Qt::WA_TranslucentBackground);
|
||||||
|
@ -52,9 +67,11 @@ void MainWindow::initMainWindow()
|
||||||
ui->time_right_label->setAttribute(Qt::WA_TranslucentBackground);
|
ui->time_right_label->setAttribute(Qt::WA_TranslucentBackground);
|
||||||
ui->time_widget->setAttribute(Qt::WA_TranslucentBackground);
|
ui->time_widget->setAttribute(Qt::WA_TranslucentBackground);
|
||||||
|
|
||||||
|
// 设置按钮属性
|
||||||
|
|
||||||
// 设置滑块属性
|
// 设置滑块属性
|
||||||
ui->time_slider->setStyleSheet("QSlider::groove:horizontal { background-color: white; }"
|
ui->time_slider->setStyleSheet("QSlider::groove:horizontal { background-color: gray; }"
|
||||||
"QSlider::handle:horizontal { background-color: blue; width: 20px;}");
|
"QSlider::handle:horizontal { background-color: yellow; width: 20px;}");
|
||||||
ui->volume_slider->setStyleSheet("QSlider::groove:horizontal { background-color: gray; }"
|
ui->volume_slider->setStyleSheet("QSlider::groove:horizontal { background-color: gray; }"
|
||||||
"QSlider::handle:horizontal { background-color: yellow; width: 20px;}");
|
"QSlider::handle:horizontal { background-color: yellow; width: 20px;}");
|
||||||
ui->volume_slider->setMinimum(0); // 最小音量 0
|
ui->volume_slider->setMinimum(0); // 最小音量 0
|
||||||
|
@ -85,7 +102,7 @@ void MainWindow::mplayerInit()
|
||||||
dup2(fd[1], 1);
|
dup2(fd[1], 1);
|
||||||
// 使用 exec 启动 mplayer
|
// 使用 exec 启动 mplayer
|
||||||
// execlp("mplayer","mplayer","-idle","-slave","-quiet","/home/flykhan/qtmplayer/song/StopLove.mp3",NULL);
|
// execlp("mplayer","mplayer","-idle","-slave","-quiet","/home/flykhan/qtmplayer/song/StopLove.mp3",NULL);
|
||||||
execlp("/usr/bin/mplayer","mplayer","-idle","-slave","-quiet","-input","file=fifo_cmd","/home/flykhan/qtmplayer/song/StopLove.mp3",NULL);
|
execlp("/usr/bin/mplayer","mplayer","-idle","-slave","-quiet","-input","file=fifo_cmd","/home/flykhan/qtmplayer/song/Diamonds.mp3",NULL);
|
||||||
_exit(-1); // 异常退出
|
_exit(-1); // 异常退出
|
||||||
}
|
}
|
||||||
else if(pid>0) // 父进程
|
else if(pid>0) // 父进程
|
||||||
|
@ -95,6 +112,9 @@ void MainWindow::mplayerInit()
|
||||||
pthread_create(&t1,NULL,getTimerThreadFunc,this);
|
pthread_create(&t1,NULL,getTimerThreadFunc,this);
|
||||||
pthread_create(&t2,NULL,readPipeMSG,this);
|
pthread_create(&t2,NULL,readPipeMSG,this);
|
||||||
|
|
||||||
|
volume_control(currentVolume, 1); // 初始音量设置为 currentVolume->50
|
||||||
|
setVolumeSlider(currentVolume); // 设置音量滑块初始位置
|
||||||
|
|
||||||
// pthread_detach(t1);
|
// pthread_detach(t1);
|
||||||
// pthread_detach(t2);
|
// pthread_detach(t2);
|
||||||
|
|
||||||
|
@ -152,6 +172,7 @@ void MainWindow::playNextSong()
|
||||||
// int len = sprintf(changeSongBuf, "loadfile ./song/%s\n", vectorSong[index].c_str());
|
// int len = sprintf(changeSongBuf, "loadfile ./song/%s\n", vectorSong[index].c_str());
|
||||||
qDebug() << changeSongBuf << endl; // 控制台打印下一首歌的名字
|
qDebug() << changeSongBuf << endl; // 控制台打印下一首歌的名字
|
||||||
// write(this->fifo_fd, changeSongBuf.toUtf8().toStdString().c_str(),changeSongBuf.toUtf8().toStdString().size());
|
// write(this->fifo_fd, changeSongBuf.toUtf8().toStdString().c_str(),changeSongBuf.toUtf8().toStdString().size());
|
||||||
|
ui->song_list_widget->setCurrentRow(index);
|
||||||
write(this->fifo_fd, changeSongBuf, len); // 将获取的下一首歌曲名写入到有名管道中
|
write(this->fifo_fd, changeSongBuf, len); // 将获取的下一首歌曲名写入到有名管道中
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -166,6 +187,7 @@ void MainWindow::playLastSong()
|
||||||
// int len = sprintf(changeSongBuf, "loadfile ./song/%s\n", vectorSong[index].c_str());
|
// int len = sprintf(changeSongBuf, "loadfile ./song/%s\n", vectorSong[index].c_str());
|
||||||
qDebug() << changeSongBuf << endl; // 控制台打印下一首歌的名字
|
qDebug() << changeSongBuf << endl; // 控制台打印下一首歌的名字
|
||||||
// write(this->fifo_fd, changeSongBuf.toUtf8().toStdString().c_str(),changeSongBuf.toUtf8().toStdString().size());
|
// write(this->fifo_fd, changeSongBuf.toUtf8().toStdString().c_str(),changeSongBuf.toUtf8().toStdString().size());
|
||||||
|
ui->song_list_widget->setCurrentRow(index);
|
||||||
write(this->fifo_fd, changeSongBuf, len); // 将获取的下一首歌曲名写入到有名管道中
|
write(this->fifo_fd, changeSongBuf, len); // 将获取的下一首歌曲名写入到有名管道中
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -186,6 +208,12 @@ void MainWindow::setCurrentSlider(int currentProgress)
|
||||||
ui->time_slider->setValue(currentProgress);
|
ui->time_slider->setValue(currentProgress);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::setVolumeSlider(int currentVolume)
|
||||||
|
{
|
||||||
|
// 设置音量滑动条状态
|
||||||
|
ui->volume_slider->setValue(currentVolume);
|
||||||
|
}
|
||||||
|
|
||||||
void *getTimerThreadFunc(void *arg)
|
void *getTimerThreadFunc(void *arg)
|
||||||
{
|
{
|
||||||
MainWindow *p = (MainWindow *)arg;
|
MainWindow *p = (MainWindow *)arg;
|
||||||
|
@ -195,25 +223,25 @@ void *getTimerThreadFunc(void *arg)
|
||||||
// 发送获取的当前时间的命令
|
// 发送获取的当前时间的命令
|
||||||
// 发送 get_time_pos 命令到管道中
|
// 发送 get_time_pos 命令到管道中
|
||||||
write(p->fifo_fd, "get_time_pos\n", strlen("get_time_pos\n"));
|
write(p->fifo_fd, "get_time_pos\n", strlen("get_time_pos\n"));
|
||||||
// usleep(500*1000); // 休眠 0.5 秒
|
usleep(100*1000); // 休眠 0.5 秒
|
||||||
|
|
||||||
// 发送获取当前歌曲进度的命令
|
// 发送获取当前歌曲进度的命令
|
||||||
write(p->fifo_fd,"get_percent_pos\n",strlen("get_percent_pos\n"));
|
write(p->fifo_fd,"get_percent_pos\n",strlen("get_percent_pos\n"));
|
||||||
usleep(500*1000); // 休眠 0.5 秒
|
usleep(100*1000); // 休眠 0.5 秒
|
||||||
|
|
||||||
// // 发送获取的当前歌曲元数据信息的命令
|
// // 发送获取的当前歌曲元数据信息的命令
|
||||||
// // 发送获取当前歌曲长度的命令 ANS_LENGTH
|
// // 发送获取当前歌曲长度的命令 ANS_LENGTH
|
||||||
// write(p->fifo_fd, "get_time_length\n", strlen("get_time_length\n"));
|
// write(p->fifo_fd, "get_time_length\n", strlen("get_time_length\n"));
|
||||||
// usleep(125*1000);
|
// usleep(125*1000);
|
||||||
// // 发送获取当前歌曲名的命令 ANS_META_TITLE
|
// // 发送获取当前歌曲名的命令 ANS_META_TITLE
|
||||||
// write(p->fifo_fd, "get_file_name\n", strlen("get_file_name\n"));
|
// write(p->fifo_fd, "get_file_name\n", strlen("get_file_name\n"));
|
||||||
// usleep(125*1000);
|
// usleep(125*1000);
|
||||||
// // 发送获取当前歌曲歌手的命令 ANS_META_ARTIST
|
// // 发送获取当前歌曲歌手的命令 ANS_META_ARTIST
|
||||||
// write(p->fifo_fd, "get_meta_artist\n", strlen("get_meta_artist\n"));
|
// write(p->fifo_fd, "get_meta_artist\n", strlen("get_meta_artist\n"));
|
||||||
// usleep(125*1000);
|
// usleep(125*1000);
|
||||||
// // 发送获取当前歌曲专辑的命令 ANS_META_ALBU
|
// // 发送获取当前歌曲专辑的命令 ANS_META_ALBU
|
||||||
// write(p->fifo_fd, "get_meta_album\n", strlen("get_meta_album\n"));
|
// write(p->fifo_fd, "get_meta_album\n", strlen("get_meta_album\n"));
|
||||||
// usleep(125*1000);
|
// usleep(125*1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -246,14 +274,14 @@ void *readPipeMSG(void *arg)
|
||||||
emit p->currentProgressSignal(currentProgress);
|
emit p->currentProgressSignal(currentProgress);
|
||||||
}
|
}
|
||||||
|
|
||||||
// // 如果消息是 "当前歌曲元数据信息"
|
// // 如果消息是 "当前歌曲元数据信息"
|
||||||
// else if(strncmp(buf,"ANS_LENGTH", strlen("ANS_LENGTH")) == 0)
|
// else if(strncmp(buf,"ANS_LENGTH", strlen("ANS_LENGTH")) == 0)
|
||||||
// {
|
// {
|
||||||
// int currentProgress = 0;
|
// int currentProgress = 0;
|
||||||
// sscanf(buf, "ANS_LENGTH=%d", ¤tProgress);
|
// sscanf(buf, "ANS_LENGTH=%d", ¤tProgress);
|
||||||
// // 给 UI 发送进度信号
|
// // 给 UI 发送进度信号
|
||||||
// emit p->currentProgressSignal(currentProgress);
|
// emit p->currentProgressSignal(currentProgress);
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -267,20 +295,20 @@ void MainWindow::setSongList()
|
||||||
strList.append(QString::fromStdString(*it));
|
strList.append(QString::fromStdString(*it));
|
||||||
}
|
}
|
||||||
ui->song_list_widget->addItems(strList);
|
ui->song_list_widget->addItems(strList);
|
||||||
// ui->song_list_widget->setCurrentRow(2);
|
// ui->song_list_widget->setCurrentRow(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_play_btn_clicked()
|
void MainWindow::on_play_btn_clicked()
|
||||||
{
|
{
|
||||||
if(play_btn_flag == 0)
|
if(play_btn_flag == 0)
|
||||||
{
|
{
|
||||||
ui->play_btn->setIcon(QIcon(":/icon/button_play"));
|
ui->play_btn->setIcon(QIcon(":/icon2/pause"));
|
||||||
kill(mplayer_pid,SIGCONT);
|
kill(mplayer_pid,SIGCONT);
|
||||||
play_btn_flag = 1;
|
play_btn_flag = 1;
|
||||||
}
|
}
|
||||||
else if (play_btn_flag == 1)
|
else if (play_btn_flag == 1)
|
||||||
{
|
{
|
||||||
ui->play_btn->setIcon(QIcon(":/icon/button"));
|
ui->play_btn->setIcon(QIcon(":/icon2/play"));
|
||||||
kill(mplayer_pid,SIGSTOP);
|
kill(mplayer_pid,SIGSTOP);
|
||||||
play_btn_flag = 0;
|
play_btn_flag = 0;
|
||||||
}
|
}
|
||||||
|
@ -301,9 +329,23 @@ void MainWindow::player_rewind_or_forward(int seconds)
|
||||||
{
|
{
|
||||||
char changeSongBuf[128] = "";
|
char changeSongBuf[128] = "";
|
||||||
int len = sprintf(changeSongBuf, "seek %d\n", seconds); // 快进快退 seconds 秒 (seconds 为正->进,为负->退)
|
int len = sprintf(changeSongBuf, "seek %d\n", seconds); // 快进快退 seconds 秒 (seconds 为正->进,为负->退)
|
||||||
write(this->fifo_fd, changeSongBuf, len); // 将获取的下一首歌曲名写入到有名管道中
|
write(this->fifo_fd, changeSongBuf, len); // 将快进快退指令写入到有名管道中
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::volume_control(int value, int abs)
|
||||||
|
{
|
||||||
|
char changeSongBuf[128] = "";
|
||||||
|
// 音量调整到 value 大小(-数减+数加), abs 为 0 时在当前音量上加减一个值,abs 不为 0 时将当前音量设置为 value 大小
|
||||||
|
int len = sprintf(changeSongBuf, "volume %d %d\n", value, abs);
|
||||||
|
write(this->fifo_fd, changeSongBuf, len); // 将音量控制指令写入到有名管道中
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::volume_mute_switch(int mute_arg)
|
||||||
|
{
|
||||||
|
char changeSongBuf[128] = "";
|
||||||
|
int len = sprintf(changeSongBuf, "mute %d\n", mute_arg); // mute_arg 静音开关参数 (1->静音,0->取消静音)
|
||||||
|
write(this->fifo_fd, changeSongBuf, len); // 将静音控制指令写入到有名管道中
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::on_last_btn_clicked()
|
void MainWindow::on_last_btn_clicked()
|
||||||
{
|
{
|
||||||
|
@ -314,3 +356,40 @@ void MainWindow::on_next_btn_clicked()
|
||||||
{
|
{
|
||||||
player_rewind_or_forward(10); // 快退 10 秒
|
player_rewind_or_forward(10); // 快退 10 秒
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::on_mute_btn_clicked()
|
||||||
|
{
|
||||||
|
if(mute_flag == 0) // 没静音则按下后设置静音
|
||||||
|
{
|
||||||
|
ui->mute_btn->setIcon(QIcon(":/icon2/sound-on"));
|
||||||
|
// volume_mute_switch(1);
|
||||||
|
// mute_flag = 1;
|
||||||
|
volume_mute_switch(++mute_flag);
|
||||||
|
}
|
||||||
|
else if (mute_flag == 1) // 已静音则按下后取消静音
|
||||||
|
{
|
||||||
|
ui->mute_btn->setIcon(QIcon(":/icon2/sound-off"));
|
||||||
|
volume_mute_switch(--mute_flag);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::on_volume_down_btn_clicked()
|
||||||
|
{
|
||||||
|
if(currentVolume-2 >= 0)
|
||||||
|
{
|
||||||
|
currentVolume -= 2;
|
||||||
|
volume_control(currentVolume, 1); // 减 10 音量
|
||||||
|
setVolumeSlider(currentVolume); // 设置音量滑块位置
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::on_volume_up_btn_clicked()
|
||||||
|
{
|
||||||
|
if(currentVolume+2 <= 100)
|
||||||
|
{
|
||||||
|
currentVolume += 2;
|
||||||
|
volume_control(currentVolume, 1); // 加 10 音量
|
||||||
|
// emit this->currentVolumeSignal(currentVolume);
|
||||||
|
setVolumeSlider(currentVolume); // 设置音量滑块位置
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
17
mainwindow.h
|
@ -33,6 +33,7 @@ public:
|
||||||
vector<string> vectorSong; // 歌曲名动态数组
|
vector<string> vectorSong; // 歌曲名动态数组
|
||||||
|
|
||||||
int play_btn_flag = 0; // play 按钮点击标识
|
int play_btn_flag = 0; // play 按钮点击标识
|
||||||
|
int mute_flag = 0; // 静音状态标识
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MainWindow(QWidget *parent = nullptr);
|
MainWindow(QWidget *parent = nullptr);
|
||||||
|
@ -47,13 +48,17 @@ public:
|
||||||
public slots:
|
public slots:
|
||||||
void playNextSong(); // 切换歌曲槽函数I
|
void playNextSong(); // 切换歌曲槽函数I
|
||||||
void playLastSong();
|
void playLastSong();
|
||||||
void player_rewind_or_forward(int seconds); // 快进快退函数
|
void player_rewind_or_forward(int seconds); // 快进快退函数
|
||||||
|
void volume_control(int value, int abs); // 音量设置函数
|
||||||
|
void volume_mute_switch(int mute_arg); // 静音切换函数
|
||||||
void setCurrentTimeLabel(int time); // 设置当前时间标签槽函数
|
void setCurrentTimeLabel(int time); // 设置当前时间标签槽函数
|
||||||
void setCurrentSlider(int currentProgress); // 设置当前进度条
|
void setCurrentSlider(int currentProgress); // 设置当前进度条
|
||||||
|
void setVolumeSlider(int currentVolume); // 设置当前音量条
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void currentTimeSignal(int time); // 当前时间信号
|
void currentTimeSignal(int time); // 当前时间信号
|
||||||
void currentProgressSignal(int currentProgress); // 当前进度信号
|
void currentProgressSignal(int currentProgress); // 当前进度信号
|
||||||
|
void currentVolumeSignal(int currentVolume); // 当前音量信号
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void on_play_btn_clicked();
|
void on_play_btn_clicked();
|
||||||
|
@ -62,6 +67,16 @@ private slots:
|
||||||
|
|
||||||
void on_front_btn_clicked();
|
void on_front_btn_clicked();
|
||||||
|
|
||||||
|
void on_last_btn_clicked();
|
||||||
|
|
||||||
|
void on_next_btn_clicked();
|
||||||
|
|
||||||
|
void on_mute_btn_clicked();
|
||||||
|
|
||||||
|
void on_volume_down_btn_clicked();
|
||||||
|
|
||||||
|
void on_volume_up_btn_clicked();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::MainWindow *ui;
|
Ui::MainWindow *ui;
|
||||||
};
|
};
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<string>MainWindow</string>
|
<string>MainWindow</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">background-image: url(:/img/background5);</string>
|
<string notr="true">background-color: rgb(136, 138, 133);</string>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="centralwidget">
|
<widget class="QWidget" name="centralwidget">
|
||||||
<widget class="QWidget" name="widget_show" native="true">
|
<widget class="QWidget" name="widget_show" native="true">
|
||||||
|
@ -133,12 +133,15 @@ color: rgb(255, 255, 0);</string>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QToolButton" name="back_btn">
|
<widget class="QToolButton" name="back_btn">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">border: none;</string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>...</string>
|
<string>...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="res.qrc">
|
<iconset resource="res.qrc">
|
||||||
<normaloff>:/icon/back</normaloff>:/icon/back</iconset>
|
<normaloff>:/icon2/play-previous</normaloff>:/icon2/play-previous</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
|
@ -150,12 +153,15 @@ color: rgb(255, 255, 0);</string>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QToolButton" name="last_btn">
|
<widget class="QToolButton" name="last_btn">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">border: none;</string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>...</string>
|
<string>...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="res.qrc">
|
<iconset resource="res.qrc">
|
||||||
<normaloff>:/icon/last</normaloff>:/icon/last</iconset>
|
<normaloff>:/icon2/rewind-back</normaloff>:/icon2/rewind-back</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
|
@ -167,12 +173,15 @@ color: rgb(255, 255, 0);</string>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QToolButton" name="play_btn">
|
<widget class="QToolButton" name="play_btn">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">border: none;</string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>...</string>
|
<string>...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="res.qrc">
|
<iconset resource="res.qrc">
|
||||||
<normaloff>:/icon/button</normaloff>:/icon/button</iconset>
|
<normaloff>:/icon2/play</normaloff>:/icon2/play</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
|
@ -184,12 +193,15 @@ color: rgb(255, 255, 0);</string>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QToolButton" name="next_btn">
|
<widget class="QToolButton" name="next_btn">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">border: none;</string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>...</string>
|
<string>...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="res.qrc">
|
<iconset resource="res.qrc">
|
||||||
<normaloff>:/icon/next</normaloff>:/icon/next</iconset>
|
<normaloff>:/icon2/rewind-forward</normaloff>:/icon2/rewind-forward</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
|
@ -201,12 +213,15 @@ color: rgb(255, 255, 0);</string>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QToolButton" name="front_btn">
|
<widget class="QToolButton" name="front_btn">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">border: none;</string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>...</string>
|
<string>...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="res.qrc">
|
<iconset resource="res.qrc">
|
||||||
<normaloff>:/icon/front</normaloff>:/icon/front</iconset>
|
<normaloff>:/icon2/play-next</normaloff>:/icon2/play-next</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
|
@ -240,12 +255,15 @@ color: rgb(255, 255, 0);</string>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QToolButton" name="mute_btn">
|
<widget class="QToolButton" name="mute_btn">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">border: none;</string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>...</string>
|
<string>...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="res.qrc">
|
<iconset resource="res.qrc">
|
||||||
<normaloff>:/icon/mute2</normaloff>:/icon/mute2</iconset>
|
<normaloff>:/icon2/sound-off</normaloff>:/icon2/sound-off</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
|
@ -257,12 +275,15 @@ color: rgb(255, 255, 0);</string>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QToolButton" name="volume_down_btn">
|
<widget class="QToolButton" name="volume_down_btn">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">border: none;</string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>...</string>
|
<string>...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="res.qrc">
|
<iconset resource="res.qrc">
|
||||||
<normaloff>:/icon/volume0</normaloff>:/icon/volume0</iconset>
|
<normaloff>:/icon2/volume-down</normaloff>:/icon2/volume-down</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
|
@ -274,12 +295,15 @@ color: rgb(255, 255, 0);</string>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QToolButton" name="volume_up_btn">
|
<widget class="QToolButton" name="volume_up_btn">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">border: none;</string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>...</string>
|
<string>...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="res.qrc">
|
<iconset resource="res.qrc">
|
||||||
<normaloff>:/icon/volume1</normaloff>:/icon/volume1</iconset>
|
<normaloff>:/icon2/volume-up</normaloff>:/icon2/volume-up</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
|
@ -306,8 +330,11 @@ color: rgb(255, 255, 0);</string>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="time_left_label">
|
<widget class="QLabel" name="time_left_label">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">color: rgb(255, 255, 0);</string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>TextLabel</string>
|
<string>------</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -320,8 +347,11 @@ color: rgb(255, 255, 0);</string>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="time_right_label">
|
<widget class="QLabel" name="time_right_label">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">color: rgb(255, 255, 0);</string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>TextLabel</string>
|
<string>------</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
12
res.qrc
|
@ -20,4 +20,16 @@
|
||||||
<file alias="background2">picture/background2.jpg</file>
|
<file alias="background2">picture/background2.jpg</file>
|
||||||
<file alias="background5">picture/5.jpg</file>
|
<file alias="background5">picture/5.jpg</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
|
<qresource prefix="/icon2">
|
||||||
|
<file alias="pause">icon2/pause.png</file>
|
||||||
|
<file alias="play">icon2/play.png</file>
|
||||||
|
<file alias="play-next">icon2/play-next.png</file>
|
||||||
|
<file alias="play-previous">icon2/play-previous.png</file>
|
||||||
|
<file alias="rewind-back">icon2/rewind-back.png</file>
|
||||||
|
<file alias="rewind-forward">icon2/rewind-forward.png</file>
|
||||||
|
<file alias="sound-off">icon2/sound-off.png</file>
|
||||||
|
<file alias="sound-on">icon2/sound-on.png</file>
|
||||||
|
<file alias="volume-down">icon2/volume-down.png</file>
|
||||||
|
<file alias="volume-up">icon2/volume-up.png</file>
|
||||||
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|