| 84 | } |
| 85 | |
| 86 | PlaybackController::PlaybackController() |
| 87 | { |
| 88 | this->ui.setupUi(this); |
| 89 | |
| 90 | if (is_Q_OS_MAC) |
| 91 | // There is a bug in Qt that significantly slows down drawing QSlider ticks on Mac |
| 92 | this->ui.frameSlider->setTickPosition(QSlider::NoTicks); |
| 93 | |
| 94 | this->ui.fpsLabel->setText("0"); |
| 95 | this->ui.fpsLabel->setStyleSheet(""); |
| 96 | |
| 97 | QSettings settings; |
| 98 | const auto repeatModeOffIndex = static_cast<int>(RepeatModeMapper.indexOf(RepeatMode::Off)); |
| 99 | auto repeatModeIdx = settings.value("RepeatMode", repeatModeOffIndex).toInt(); |
| 100 | if (auto newRepeatMode = RepeatModeMapper.at(repeatModeIdx)) |
| 101 | this->repeatMode = *newRepeatMode; |
| 102 | |
| 103 | this->loadButtonIcons(); |
| 104 | this->updatePlayPauseButtonIcon(); |
| 105 | this->ui.stopButton->setIcon(this->iconStop); |
| 106 | this->setRepeatModeAndUpdateIcons(this->repeatMode); |
| 107 | |
| 108 | this->updateSettings(); |
| 109 | this->enableControls(false); |
| 110 | } |
| 111 | |
| 112 | void PlaybackController::setSplitViews(splitViewWidget *primary, splitViewWidget *separate) |
| 113 | { |
nothing calls this directly
no test coverage detected