-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
36 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,7 +32,7 @@ MainWindow::MainWindow(QWidget *parent) : | |
move((QApplication::desktop()->width() - width())/2, (QApplication::desktop()->height() - height())/2); | ||
sr = 1; | ||
m_bPressed = false; | ||
version = "1.12"; | ||
version = "1.13"; | ||
isManualUpdate = false; | ||
ui->btnSkipB->setIcon(style()->standardIcon(QStyle::SP_MediaSkipBackward)); | ||
ui->btnSeekB->setIcon(style()->standardIcon(QStyle::SP_MediaSeekBackward)); | ||
|
@@ -54,9 +54,9 @@ MainWindow::MainWindow(QWidget *parent) : | |
video->setMouseTracking(true); | ||
video->show(); | ||
|
||
// labelTL = new QLabel(this); | ||
// labelTL->move(50,50); | ||
// labelTL->setStyleSheet("color:white;"); | ||
//labelTL = new QLabel(this); | ||
//labelTL->move(50,50); | ||
//labelTL->setStyleSheet("font-size:20px; color:white;"); | ||
|
||
labelLogo = new QLabel(this); | ||
labelLogo->setPixmap(QPixmap(":/icon.png")); | ||
|
@@ -113,11 +113,16 @@ MainWindow::MainWindow(QWidget *parent) : | |
|
||
fillTable("tv.txt"); | ||
|
||
QStringList Largs = QApplication::arguments(); | ||
qDebug() << Largs; | ||
if(Largs.length()>1){ | ||
if(!Largs.at(1).contains("chrome-extension://")){ | ||
QUrl url(Largs.at(1)); | ||
QStringList SL_args = QApplication::arguments(); | ||
qDebug() << SL_args; | ||
QDateTime currentDateTime = QDateTime::currentDateTime(); | ||
QString log = currentDateTime.toString("yyyy/MM/dd HH:mm:ss") + "\n"; | ||
for(int i=0; i< SL_args.length(); i++){ | ||
log += SL_args.at(i) + " "; | ||
} | ||
if(SL_args.length()>1){ | ||
if(!SL_args.at(1).contains("chrome-extension://")){ | ||
QUrl url(SL_args.at(1)); | ||
open(url.toLocalFile()); | ||
}else{ | ||
// 下面这段放在外面会导致调试时窗口出不来和从外部程序打开文件中断 | ||
|
@@ -134,6 +139,16 @@ MainWindow::MainWindow(QWidget *parent) : | |
for (int i = 0; i < length; i++) { | ||
url += getwchar(); | ||
} | ||
|
||
log += "\n" + url; | ||
//QString path = QStandardPaths::standardLocations(QStandardPaths::CacheLocation).first() + "/log.txt"; | ||
//qDebug() << path; | ||
QFile file("log.txt"); | ||
if (file.open(QFile::WriteOnly)) { //|QIODevice::Append | ||
file.write(log.toUtf8()); | ||
file.close(); | ||
} | ||
|
||
//浏览器端传来的数据会有一个双引号引在两端 | ||
url = url.mid(1, url.length()-2); | ||
qDebug() << url; | ||
|
@@ -380,7 +395,7 @@ void MainWindow::on_action_help_triggered() | |
|
||
void MainWindow::on_action_changelog_triggered() | ||
{ | ||
QString s = "1.12\n(2018-06)\n增加:自动更新和手动更新。\n改动:历史记录限制到20条。\n\n1.11\n(2018-05)\n修复:从右键打开方式无法打开文件。\n(2018-04)\n修复:视频分辨率为0X0时,缩放出错。\n\n1.10\n(2018-03)\n修复:拖动进度条时,进度条被拉回的问题。\n修复:从历史记录打开视频没有修改文件名,导致剧情连拍文件名错误。\n修复:增加从Chrome扩展打开后,调试时窗口无法启动和从外部程序启动打开文件中断。\n\n1.9\n(2018-01)\n打开URL时自动粘贴剪贴板文字。\n\n1.8\n(2017-12)\n文件信息增加文件大小。\n增加视频缩放。\n\n1.7\n(2017-11)\n增加对直播API的解析,换鼠标拖动代码更平滑,增加windows版编译图标。\n(2017-10)\n增加历史记录。\n增加接收Chrome扩展传来的直播网址。\n修复m_bPressed没有初始化引起鼠标移动界面移动的Bug,音频封面Windows调试,取消会引起窗口宽度变化的关闭直播列表缩小窗宽,感谢Snail1991。\n如果播放的音乐有封面则显示。\n(2017-09)\n启动、暂停、停止显示广告。\n解决网络视频媒体信息频繁变更引起界面多余的缩放动作。\n\n1.6\n(2017-09)\n增加解析分号分隔的网络媒体字符串到播放列表。\n遍历媒体信息。\n\n1.5\n(2017-09)\n增加显示错误信息。\n(2017-08-20)\n增加拖放打开文件。\n\n1.4\n(2017-06)\n更新日志太长,消息框改成带滚动条的文本框。\n打开本地文件,自动隐藏直播列表。\n(2017-05)\n系统升级后出现有声音无视频,根据 https://bugreports.qt.io/browse/QTBUG-23761,卸载 sudo apt-get remove gstreamer1.0-vaapi 修复。\n\n1.3 (2017-04)\n记忆全屏前直播列表是否显示,以便退出全屏后恢复。\n直播列表做进主窗体内并支持显隐。\n\n1.2 (2017-03)\n增加打开方式打开文件。\n右键增加截图菜单。\n增加剧情连拍。\n增加截图。\n\n1.1 (2017-03)\n窗口标题增加台号。\n (2017-02)\n合并导入重复代码。\n加入逗号判断,解决导入崩溃。\n增加导入直播列表菜单。\n上一个、下一个按钮换台。\n增加直播列表。\n\n1.0 (2017-02)\n静音修改图标和拖动条。\n增加快进、快退。\n增加时间。\n修复拖动进度条卡顿BUG。\n全屏修改进度条样式。\n实现全屏。\n增加视频控件。\n增加控制栏。"; | ||
QString s = "1.13\n(2018-09)\n增加:写日志。\n修复Qt5.10按钮黑色背景。\n\n1.12\n(2018-06)\n增加:自动更新和手动更新。\n改动:历史记录限制到20条。\n\n1.11\n(2018-05)\n修复:从右键打开方式无法打开文件。\n(2018-04)\n修复:视频分辨率为0X0时,缩放出错。\n\n1.10\n(2018-03)\n修复:拖动进度条时,进度条被拉回的问题。\n修复:从历史记录打开视频没有修改文件名,导致剧情连拍文件名错误。\n修复:增加从Chrome扩展打开后,调试时窗口无法启动和从外部程序启动打开文件中断。\n\n1.9\n(2018-01)\n打开URL时自动粘贴剪贴板文字。\n\n1.8\n(2017-12)\n文件信息增加文件大小。\n增加视频缩放。\n\n1.7\n(2017-11)\n增加对直播API的解析,换鼠标拖动代码更平滑,增加windows版编译图标。\n(2017-10)\n增加历史记录。\n增加接收Chrome扩展传来的直播网址。\n修复m_bPressed没有初始化引起鼠标移动界面移动的Bug,音频封面Windows调试,取消会引起窗口宽度变化的关闭直播列表缩小窗宽,感谢Snail1991。\n如果播放的音乐有封面则显示。\n(2017-09)\n启动、暂停、停止显示广告。\n解决网络视频媒体信息频繁变更引起界面多余的缩放动作。\n\n1.6\n(2017-09)\n增加解析分号分隔的网络媒体字符串到播放列表。\n遍历媒体信息。\n\n1.5\n(2017-09)\n增加显示错误信息。\n(2017-08-20)\n增加拖放打开文件。\n\n1.4\n(2017-06)\n更新日志太长,消息框改成带滚动条的文本框。\n打开本地文件,自动隐藏直播列表。\n(2017-05)\n系统升级后出现有声音无视频,根据 https://bugreports.qt.io/browse/QTBUG-23761,卸载 sudo apt-get remove gstreamer1.0-vaapi 修复。\n\n1.3 (2017-04)\n记忆全屏前直播列表是否显示,以便退出全屏后恢复。\n直播列表做进主窗体内并支持显隐。\n\n1.2 (2017-03)\n增加打开方式打开文件。\n右键增加截图菜单。\n增加剧情连拍。\n增加截图。\n\n1.1 (2017-03)\n窗口标题增加台号。\n (2017-02)\n合并导入重复代码。\n加入逗号判断,解决导入崩溃。\n增加导入直播列表菜单。\n上一个、下一个按钮换台。\n增加直播列表。\n\n1.0 (2017-02)\n静音修改图标和拖动条。\n增加快进、快退。\n增加时间。\n修复拖动进度条卡顿BUG。\n全屏修改进度条样式。\n实现全屏。\n增加视频控件。\n增加控制栏。"; | ||
QDialog *dialog = new QDialog; | ||
dialog->setWindowIcon(QIcon(":/icon.png")); | ||
dialog->setWindowTitle("更新历史"); | ||
|
@@ -411,7 +426,7 @@ void MainWindow::on_action_aboutQt_triggered() | |
|
||
void MainWindow::on_action_about_triggered() | ||
{ | ||
QMessageBox aboutMB(QMessageBox::NoIcon, "关于", "海天鹰媒体播放器 1.12\n一款基于 Qt 的媒体播放器。\n作者:黄颖\nE-mail: [email protected]\n主页:https://github.com/sonichy\n致谢:\n播放列表:http://blog.sina.com.cn/s/blog_74a7e56e0101agit.html\n获取媒体信息:https://www.zhihu.com/question/36859497"); | ||
QMessageBox aboutMB(QMessageBox::NoIcon, "关于", "海天鹰媒体播放器 1.13\n一款基于 Qt5 的媒体播放器。\n作者:黄颖\nE-mail: [email protected]\n主页:https://github.com/sonichy\n致谢:\n播放列表:http://blog.sina.com.cn/s/blog_74a7e56e0101agit.html\n获取媒体信息:https://www.zhihu.com/question/36859497"); | ||
aboutMB.setIconPixmap(QPixmap(":/icon.png")); | ||
aboutMB.exec(); | ||
} | ||
|
@@ -545,9 +560,10 @@ void MainWindow::volumeChange(int v) | |
{ | ||
ui->sliderVolume->setValue(v); | ||
ui->sliderVolume->setToolTip(QString::number(v)); | ||
// labelTL->setText("音量:"+QString::number(v)); | ||
// labelTL->show(); | ||
// QTimer::singleShot(3000,labelTL,SLOT(hide())); | ||
//labelTL->setText("音量:" + QString::number(v)); | ||
//labelTL->adjustSize(); | ||
//labelTL->show(); | ||
//QTimer::singleShot(3000,labelTL,SLOT(hide())); | ||
} | ||
|
||
void MainWindow::playPause() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.12 | ||
1.13 |