Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
sfewfsaf
FdogMusicPlayer
提交
95a4e59e
F
FdogMusicPlayer
项目概览
sfewfsaf
/
FdogMusicPlayer
与 Fork 源项目一致
Fork自
花狗Fdog / FdogMusicPlayer
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
FdogMusicPlayer
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
95a4e59e
编写于
8月 17, 2020
作者:
花狗Fdog
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
添加歌词显示
上级
2744cda7
变更
10
展开全部
显示空白变更内容
内联
并排
Showing
10 changed file
with
44 addition
and
842 deletion
+44
-842
debug/FdogMusicPlayer.exe
debug/FdogMusicPlayer.exe
+0
-0
debug/FdogMusicPlayer.ilk
debug/FdogMusicPlayer.ilk
+0
-0
debug/FdogMusicPlayer.pdb
debug/FdogMusicPlayer.pdb
+0
-0
debug/FdogMusicPlayer.vc.pdb
debug/FdogMusicPlayer.vc.pdb
+0
-0
debug/main.obj
debug/main.obj
+0
-0
debug/mainwindow.obj
debug/mainwindow.obj
+0
-0
debug/moc_mainwindow.obj
debug/moc_mainwindow.obj
+0
-0
mainwindow.cpp
mainwindow.cpp
+44
-69
mainwindow.cpp.autosave
mainwindow.cpp.autosave
+0
-772
mainwindow.h
mainwindow.h
+0
-1
未找到文件。
debug/FdogMusicPlayer.exe
浏览文件 @
95a4e59e
无法预览此类型文件
debug/FdogMusicPlayer.ilk
浏览文件 @
95a4e59e
无法预览此类型文件
debug/FdogMusicPlayer.pdb
浏览文件 @
95a4e59e
无法预览此类型文件
debug/FdogMusicPlayer.vc.pdb
浏览文件 @
95a4e59e
无法预览此类型文件
debug/main.obj
浏览文件 @
95a4e59e
无法预览此类型文件
debug/mainwindow.obj
浏览文件 @
95a4e59e
无法预览此类型文件
debug/moc_mainwindow.obj
浏览文件 @
95a4e59e
无法预览此类型文件
mainwindow.cpp
浏览文件 @
95a4e59e
...
...
@@ -30,7 +30,7 @@ MainWindow::MainWindow(QWidget *parent) :
playlist
=
new
QMediaPlaylist
(
this
);
playlist
->
setPlaybackMode
(
QMediaPlaylist
::
Sequential
);
player
->
setPlaylist
(
playlist
);
player
->
setNotifyInterval
(
10
00
);
player
->
setNotifyInterval
(
5
00
);
connect
(
player
,
SIGNAL
(
stateChanged
(
QMediaPlayer
::
State
)),
this
,
SLOT
(
onStateChanged
(
QMediaPlayer
::
State
)));
connect
(
player
,
SIGNAL
(
positionChanged
(
qint64
)),
...
...
@@ -295,8 +295,8 @@ void MainWindow::parseJsonSongInfo(QString json)
int
s_count
=
(
s_1
*
60
+
s_2
)
*
100
+
s_3
;
//规定写法
//QString str = s_1+s_2+s_3;
int
lrctime
=
s_count
;
qDebug
()
<<
"规定格式:"
<<
lrctime
;
qDebug
()
<<
"字符串:"
<<
ss1
;
//
qDebug()<<"规定格式:"<<lrctime;
//
qDebug()<<"字符串:"<<ss1;
QString
lrcstr
=
ss1
.
mid
(
10
);
lrcMap
.
insert
(
lrctime
,
lrcstr
);
}
...
...
@@ -408,67 +408,47 @@ void MainWindow::onPositionChanged(qint64 position)
secs
=
secs
%
60
;
positionTime
=
QString
::
asprintf
(
"%d:%d"
,
mins
,
secs
);
ui
->
label
->
setText
(
positionTime
+
"/"
+
durationTime
);
//position/1000/60 = 分
//position/1000%60 = 秒
//position/10-(分*60+秒)*100=厘秒
//时间标签得法
//(分*60+秒)*100+厘秒
int
secs_lrc
=
position
/
10
;
// 1秒用100表示 100倍
int
mins_lrc
=
secs
/
60
;
//分
QString
s_min
=
QString
::
number
(
mins_lrc
);
secs_lrc
=
secs_lrc
%
60
;
//剩下的秒
if
(
secs_lrc
<=
10
)
int
pos
=
position
/
10
;
//qDebug()<<"pos"<<pos<<endl;
QMap
<
int
,
QString
>::
iterator
iter
=
lrcMap
.
begin
();
while
(
iter
!=
lrcMap
.
end
())
{
QString
s_lrc
=
QString
::
number
(
secs_lrc
);
QString
s_str
=
"0"
+
s_lrc
;
if
(
pos
-
50
<=
iter
.
key
()
&&
pos
+
50
>=
iter
.
key
())
{
int
j
=
0
;
if
(
iter
!=
lrcMap
.
begin
())
{
iter
--
;
ui
->
label_20
->
setText
(
iter
.
value
());
j
++
;
}
if
(
iter
!=
lrcMap
.
begin
())
{
iter
--
;
ui
->
label_19
->
setText
(
iter
.
value
());
j
++
;
}
int
shenxia_secs
=
position
-
mins_lrc
*
60
-
secs_lrc
;
qDebug
()
<<
"position"
<<
position
<<
endl
;
QMap
<
int
,
QString
>::
iterator
iter
=
lrcMap
.
begin
();
while
(
iter
!=
lrcMap
.
end
())
if
(
iter
!=
lrcMap
.
begin
())
{
//中间
if
(
position
-
500
<=
iter
.
key
()
&&
position
+
500
>=
iter
.
key
())
iter
--
;
ui
->
label_6
->
setText
(
iter
.
value
());
j
++
;
}
for
(;
j
>
0
;
j
--
)
{
iter
++
;
}
//中间
ui
->
label_21
->
setText
(
iter
.
value
());
//未播放
if
(
iter
!=
lrcMap
.
end
())
{
iter
++
;
if
(
iter
!=
lrcMap
.
end
())
{
ui
->
label_22
->
setText
(
iter
.
value
());
}
else
...
...
@@ -476,10 +456,9 @@ void MainWindow::onPositionChanged(qint64 position)
ui
->
label_22
->
setText
(
""
);
return
;
}
if
(
iter
!=
lrcMap
.
end
())
{
iter
++
;
if
(
iter
!=
lrcMap
.
end
())
{
ui
->
label_23
->
setText
(
iter
.
value
());
}
else
...
...
@@ -487,10 +466,9 @@ void MainWindow::onPositionChanged(qint64 position)
ui
->
label_23
->
setText
(
""
);
return
;
}
if
(
iter
!=
lrcMap
.
end
())
{
iter
++
;
if
(
iter
!=
lrcMap
.
end
())
{
ui
->
label_24
->
setText
(
iter
.
value
());
}
else
...
...
@@ -498,10 +476,9 @@ void MainWindow::onPositionChanged(qint64 position)
ui
->
label_24
->
setText
(
""
);
return
;
}
if
(
iter
!=
lrcMap
.
end
())
{
iter
++
;
if
(
iter
!=
lrcMap
.
end
())
{
ui
->
label_25
->
setText
(
iter
.
value
());
}
else
...
...
@@ -509,10 +486,9 @@ void MainWindow::onPositionChanged(qint64 position)
ui
->
label_25
->
setText
(
""
);
return
;
}
if
(
iter
!=
lrcMap
.
end
())
{
iter
++
;
if
(
iter
!=
lrcMap
.
end
())
{
ui
->
label_26
->
setText
(
iter
.
value
());
}
else
...
...
@@ -520,10 +496,9 @@ void MainWindow::onPositionChanged(qint64 position)
ui
->
label_26
->
setText
(
""
);
return
;
}
if
(
iter
!=
lrcMap
.
end
())
{
iter
++
;
if
(
iter
!=
lrcMap
.
end
())
{
ui
->
label_27
->
setText
(
iter
.
value
());
}
else
...
...
mainwindow.cpp.autosave
已删除
100644 → 0
浏览文件 @
2744cda7
此差异已折叠。
点击以展开。
mainwindow.h
浏览文件 @
95a4e59e
...
...
@@ -54,7 +54,6 @@ private:
int
isnull
=
0
;
int
sum
=
0
;
int
sum_1
=
0
;
public:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录