| 107 | } |
| 108 | |
| 109 | QString PAGView::getTotalFrame() const { |
| 110 | if (pagFile == nullptr) { |
| 111 | return "0"; |
| 112 | } |
| 113 | int64_t totalFrames = |
| 114 | static_cast<int64_t>(std::round(getDuration().toLongLong() * pagFile->frameRate() / 1000.0)); |
| 115 | if (totalFrames < 1) { |
| 116 | totalFrames = 0; |
| 117 | } |
| 118 | return QString::number(totalFrames); |
| 119 | } |
| 120 | |
| 121 | QString PAGView::getCurrentFrame() const { |
| 122 | int64_t totalFrames = getTotalFrame().toLongLong(); |