Skip to content

Commit

Permalink
add shortcut I(interpolation) to change display quality
Browse files Browse the repository at this point in the history
  • Loading branch information
wang-bin committed Jun 3, 2013
1 parent 171a656 commit b98a45e
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 39 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ The default is Qt's paint engine.
- Ctrl+O: open a file
- Space: pause/continue
- F: fullscreen on/off
- I: switch display quality
- T: stays on top on/off
- N: show next frame. Continue the playing by pressing "Space"
- O: OSD
Expand Down Expand Up @@ -166,4 +167,4 @@ Video Wall
> Shanghai University, Shanghai, China
> 2013-01-21
> 2013-01-21
32 changes: 16 additions & 16 deletions examples/player/res/player_zh_CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,78 +4,78 @@
<context>
<name>MainWindow</name>
<message>
<location filename="../MainWindow.cpp" line="156"/>
<location filename="../MainWindow.cpp" line="157"/>
<source>Open Url</source>
<translation>打开 Url</translation>
</message>
<message>
<location filename="../MainWindow.cpp" line="157"/>
<location filename="../MainWindow.cpp" line="158"/>
<source>Online channels</source>
<translation>在线频道</translation>
</message>
<message>
<location filename="../MainWindow.cpp" line="166"/>
<location filename="../MainWindow.cpp" line="184"/>
<source>Setup</source>
<translation>设置</translation>
</message>
<message>
<location filename="../MainWindow.cpp" line="167"/>
<location filename="../MainWindow.cpp" line="185"/>
<source>Report</source>
<translation>反馈</translation>
</message>
<message>
<location filename="../MainWindow.cpp" line="168"/>
<location filename="../MainWindow.cpp" line="186"/>
<source>About</source>
<translation>关于</translation>
</message>
<message>
<location filename="../MainWindow.cpp" line="169"/>
<location filename="../MainWindow.cpp" line="187"/>
<source>Help</source>
<translation>帮助</translation>
</message>
<message>
<location filename="../MainWindow.cpp" line="171"/>
<location filename="../MainWindow.cpp" line="189"/>
<source>About Qt</source>
<translation>关于 Qt</translation>
</message>
<message>
<location filename="../MainWindow.cpp" line="174"/>
<location filename="../MainWindow.cpp" line="488"/>
<location filename="../MainWindow.cpp" line="192"/>
<location filename="../MainWindow.cpp" line="506"/>
<source>Aspect ratio</source>
<translation>比例</translation>
</message>
<message>
<location filename="../MainWindow.cpp" line="177"/>
<location filename="../MainWindow.cpp" line="195"/>
<source>Video</source>
<translation>视频</translation>
</message>
<message>
<location filename="../MainWindow.cpp" line="179"/>
<location filename="../MainWindow.cpp" line="197"/>
<source>Window</source>
<translation>窗口</translation>
</message>
<message>
<location filename="../MainWindow.cpp" line="182"/>
<location filename="../MainWindow.cpp" line="200"/>
<source>Custom</source>
<translation>自定义</translation>
</message>
<message>
<location filename="../MainWindow.cpp" line="188"/>
<location filename="../MainWindow.cpp" line="206"/>
<source>Renderer</source>
<translation>渲染引擎</translation>
</message>
<message>
<location filename="../MainWindow.cpp" line="348"/>
<location filename="../MainWindow.cpp" line="366"/>
<source>Open a media file</source>
<translation>打开媒体文件</translation>
</message>
<message>
<location filename="../MainWindow.cpp" line="469"/>
<location filename="../MainWindow.cpp" line="487"/>
<source>Open an url</source>
<translation>打开 url</translation>
</message>
<message>
<location filename="../MainWindow.cpp" line="469"/>
<location filename="../MainWindow.cpp" line="487"/>
<source>Url</source>
<translation></translation>
</message>
Expand Down
Binary file modified i18n/QtAV_zh_CN.qm
Binary file not shown.
40 changes: 23 additions & 17 deletions i18n/QtAV_zh_CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,26 +86,26 @@
<translation type="obsolete">关于 QtAV</translation>
</message>
<message>
<location filename="../src/EventFilter.cpp" line="92"/>
<location filename="../src/EventFilter.cpp" line="93"/>
<source>Ctrl+O: open a file
</source>
<translation>Ctrl+O: 打开文件</translation>
</message>
<message>
<location filename="../src/EventFilter.cpp" line="93"/>
<location filename="../src/EventFilter.cpp" line="94"/>
<source>O: OSD
</source>
<translation>O: OSD</translation>
</message>
<message>
<location filename="../src/EventFilter.cpp" line="101"/>
<location filename="../src/EventFilter.cpp" line="102"/>
<source>-&amp;gt;/&amp;lt;-: seek forward/backward
</source>
<translation>光标左右: 快退 快进</translation>
</message>
<message>
<location filename="../src/EventFilter.cpp" line="102"/>
<location filename="../src/EventFilter.cpp" line="299"/>
<location filename="../src/EventFilter.cpp" line="103"/>
<location filename="../src/EventFilter.cpp" line="302"/>
<source>Help</source>
<translation>帮助</translation>
</message>
Expand Down Expand Up @@ -144,13 +144,19 @@
</message>
<message>
<location filename="../src/EventFilter.cpp" line="90"/>
<source>I: switch video display quality
</source>
<translation>I: 切换显示质量</translation>
</message>
<message>
<location filename="../src/EventFilter.cpp" line="91"/>
<source>T: stays on top on/off
</source>
<translation>T: 窗口置顶开关
</translation>
</message>
<message>
<location filename="../src/EventFilter.cpp" line="91"/>
<location filename="../src/EventFilter.cpp" line="92"/>
<source>N: show next frame. Continue the playing by pressing &apos;Space&apos;
</source>
<translation>N: 播放下一帧
Expand All @@ -163,45 +169,45 @@
</translation>
</message>
<message>
<location filename="../src/EventFilter.cpp" line="94"/>
<location filename="../src/EventFilter.cpp" line="95"/>
<source>P: replay
</source>
<translation>P: 重新播放
</translation>
</message>
<message>
<location filename="../src/EventFilter.cpp" line="95"/>
<location filename="../src/EventFilter.cpp" line="96"/>
<source>Q/ESC: quit
</source>
<translation>Q/ESC: 退出</translation>
</message>
<message>
<location filename="../src/EventFilter.cpp" line="96"/>
<location filename="../src/EventFilter.cpp" line="97"/>
<source>S: stop
</source>
<translation>S: 停止播放
</translation>
</message>
<message>
<location filename="../src/EventFilter.cpp" line="97"/>
<location filename="../src/EventFilter.cpp" line="98"/>
<source>R: switch aspect ratio</source>
<translation>R: 切换显示比例</translation>
</message>
<message>
<location filename="../src/EventFilter.cpp" line="98"/>
<location filename="../src/EventFilter.cpp" line="99"/>
<source>M: mute on/off
</source>
<translation>M: 静音开关
</translation>
</message>
<message>
<location filename="../src/EventFilter.cpp" line="99"/>
<location filename="../src/EventFilter.cpp" line="100"/>
<source>C: capture video</source>
<translation>C: 视频截图
</translation>
</message>
<message>
<location filename="../src/EventFilter.cpp" line="100"/>
<location filename="../src/EventFilter.cpp" line="101"/>
<source>Up/Down: volume +/-
</source>
<translation>光标上下: 音量增减
Expand All @@ -214,22 +220,22 @@
</translation>
</message>
<message>
<location filename="../src/EventFilter.cpp" line="295"/>
<location filename="../src/EventFilter.cpp" line="298"/>
<source>Open</source>
<translation>打开</translation>
</message>
<message>
<location filename="../src/EventFilter.cpp" line="296"/>
<location filename="../src/EventFilter.cpp" line="299"/>
<source>Open Url</source>
<translation>打开 Url</translation>
</message>
<message>
<location filename="../src/EventFilter.cpp" line="298"/>
<location filename="../src/EventFilter.cpp" line="301"/>
<source>About</source>
<translation>关于</translation>
</message>
<message>
<location filename="../src/EventFilter.cpp" line="301"/>
<location filename="../src/EventFilter.cpp" line="304"/>
<source>About Qt</source>
<translation>关于 Qt</translation>
</message>
Expand Down
11 changes: 6 additions & 5 deletions src/EventFilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ void EventFilter::help()
"<p>" + tr("Shortcut:\n") + "</p>"
"<p>" + tr("Space: pause/continue\n") + "</p>"
"<p>" + tr("F: fullscreen on/off\n") + "</p>"
"<p>" + tr("I: switch video display quality\n") + "</p>"
"<p>" + tr("T: stays on top on/off\n") + "</p>"
"<p>" + tr("N: show next frame. Continue the playing by pressing 'Space'\n") + "</p>"
"<p>" + tr("Ctrl+O: open a file\n") + "</p>"
Expand Down Expand Up @@ -146,18 +147,18 @@ bool EventFilter::eventFilter(QObject *watched, QEvent *event)
case Qt::Key_C: //capture
player->captureVideo();
break;
case Qt::Key_I: { //Interpolation
VideoRenderer *renderer = player->renderer();
renderer->setQuality(VideoRenderer::Quality(((int)renderer->quality()+1)%3));
}
break;
case Qt::Key_N: //check playing?
player->playNextFrame();
break;
case Qt::Key_P:
player->play();
break;
case Qt::Key_Q:
if (modifiers == Qt::ControlModifier) {
VideoRenderer *renderer = player->renderer();
renderer->setQuality(VideoRenderer::Quality(((int)renderer->quality()+1)%3));
return true;
}
case Qt::Key_Escape:
qApp->quit();
break;
Expand Down

0 comments on commit b98a45e

Please sign in to comment.