sequence: add test preview option

This commit is contained in:
itsmattkc
2022-05-29 09:20:12 -07:00
parent 8455e94de3
commit abb9c409e2
3 changed files with 25 additions and 1 deletions
+1
View File
@@ -102,6 +102,7 @@ void Config::SetDefaults()
SetEntryInternal(QStringLiteral("StopPlaybackOnLastFrame"), NodeValue::kBoolean, false);
SetEntryInternal(QStringLiteral("UseLegacyColorInInputTab"), NodeValue::kBoolean, false);
SetEntryInternal(QStringLiteral("ReassocLinToNonLin"), NodeValue::kBoolean, false);
SetEntryInternal(QStringLiteral("PreviewNonFloatDontAskAgain"), NodeValue::kBoolean, false);
SetEntryInternal(QStringLiteral("AutoCacheDelay"), NodeValue::kInt, 1000);
+23
View File
@@ -106,6 +106,29 @@ void SequenceDialog::accept()
return;
}
if (!VideoParams::FormatIsFloat(parameter_tab_->GetSelectedPreviewFormat())
&& !OLIVE_CONFIG("PreviewNonFloatDontAskAgain").toBool()) {
QMessageBox b(this);
QCheckBox *dont_show_again_ = new QCheckBox(tr("Don't ask me again"));
b.setIcon(QMessageBox::Warning);
b.setWindowTitle(tr("Low Quality Preview"));
b.setText(tr("The preview resolution has been set to a non-float format. This may cause banding and clipping artifacts in the preview.\n\n"
"Do you wish to continue?"));
b.setCheckBox(dont_show_again_);
b.addButton(QMessageBox::Yes);
b.addButton(QMessageBox::No);
if (b.exec() == QMessageBox::No) {
return;
}
if (dont_show_again_->isChecked()) {
OLIVE_CONFIG("PreviewNonFloatDontAskAgain") = true;
}
}
// Generate video and audio parameter structs from data
VideoParams video_params = VideoParams(parameter_tab_->GetSelectedVideoWidth(),
parameter_tab_->GetSelectedVideoHeight(),
@@ -71,7 +71,7 @@ SequenceDialogParameterTab::SequenceDialogParameterTab(Sequence* sequence, QWidg
preview_layout->addWidget(preview_resolution_label_, row, 2);
row++;
preview_layout->addWidget(new QLabel(tr("Quality:")), row, 0);
preview_format_field_ = new PixelFormatComboBox(true);
preview_format_field_ = new PixelFormatComboBox(false);
preview_layout->addWidget(preview_format_field_, row, 1, 1, 2);
row++;
preview_layout->addWidget(new QLabel(tr("Auto-Cache:")), row, 0);