Implement the main window and basic playback controls of viewer#2739
Merged
shlzxjp merged 21 commits intoTencent:mainfrom Mar 25, 2025
Merged
Implement the main window and basic playback controls of viewer#2739shlzxjp merged 21 commits intoTencent:mainfrom
shlzxjp merged 21 commits intoTencent:mainfrom
Conversation
… recommended by the viewer to be 6.2.0
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2739 +/- ##
==========================================
- Coverage 77.40% 77.38% -0.03%
==========================================
Files 419 419
Lines 22270 22270
Branches 6366 6366
==========================================
- Hits 17239 17234 -5
- Misses 3775 3779 +4
- Partials 1256 1257 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
shlzxjp
reviewed
Mar 21, 2025
viewer/src/PAGViewer.h
Outdated
| #include <QObject> | ||
| #include "PAGWindow.h" | ||
|
|
||
| class PAGWindow; |
viewer/src/rendering/PAGView.cpp
Outdated
|
|
||
| auto PAGView::getPAGWidth() const -> int { | ||
| if (pagFile == nullptr) { | ||
| return 100; |
Collaborator
There was a problem hiding this comment.
应该返回一个非法值,如:-1。返回100都不确定是pagFile为nullptr,还是width真的是100,下面的height也是一样的。
viewer/src/rendering/PAGView.cpp
Outdated
|
|
||
| auto PAGView::getBackgroundColor() const -> QColor { | ||
| if (pagFile == nullptr) { | ||
| return QColor::fromRgb(0, 0, 0); |
Collaborator
There was a problem hiding this comment.
使用QColor预置颜色常量更简洁,QColor::black()
viewer/src/rendering/PAGView.cpp
Outdated
| setIsPlaying(false); | ||
| auto progress = this->progress - progressPerFrame; | ||
| if (progress < 0) { | ||
| progress = 1; |
Collaborator
Author
There was a problem hiding this comment.
目前的逻辑是progress向后调整时,如果大于1,progress就为0,即从第一帧播放;如果progress向前调整时,如果小于0,progress就为1,即从最后一帧开始播放
shlzxjp
reviewed
Mar 24, 2025
shlzxjp
reviewed
Mar 25, 2025
shlzxjp
approved these changes
Mar 25, 2025
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
本次PR包含如下内容:
1、实现了viewer的主窗口
2、实现了viewer的一些基础功能,包括暂停/播放、上一帧/下一帧、拖动、调整大小、拖拽pag文件等
3、将第三方库winsparkle的引入方式从拉取代码之后编译变为以vendor的形式上传至vendor目录