Merge branch 'olive-editor:master' into av1
This commit is contained in:
@@ -44,10 +44,10 @@ AboutDialog::AboutDialog(bool welcome_dialog, QWidget *parent) :
|
||||
QFontMetrics fm = fontMetrics();
|
||||
|
||||
QVBoxLayout* layout = new QVBoxLayout(this);
|
||||
layout->setMargin(fm.height());
|
||||
layout->setContentsMargins(fm.height(), fm.height(), fm.height(), fm.height());
|
||||
|
||||
QHBoxLayout *horiz_layout = new QHBoxLayout();
|
||||
horiz_layout->setMargin(fm.height());
|
||||
horiz_layout->setContentsMargins(fm.height(), fm.height(), fm.height(), fm.height());
|
||||
horiz_layout->setSpacing(fm.height()*2);
|
||||
|
||||
QLabel* icon = new QLabel(QStringLiteral("<html><img src=':/graphics/olive-splash.png'></html>"));
|
||||
@@ -108,7 +108,7 @@ AboutDialog::AboutDialog(bool welcome_dialog, QWidget *parent) :
|
||||
layout->addWidget(new QLabel());
|
||||
|
||||
QHBoxLayout *btn_layout = new QHBoxLayout();
|
||||
btn_layout->setMargin(0);
|
||||
btn_layout->setContentsMargins(0, 0, 0, 0);
|
||||
btn_layout->setSpacing(0);
|
||||
|
||||
if (welcome_dialog) {
|
||||
|
||||
@@ -30,7 +30,7 @@ CineformSection::CineformSection(QWidget *parent) :
|
||||
{
|
||||
QGridLayout *layout = new QGridLayout(this);
|
||||
|
||||
layout->setMargin(0);
|
||||
layout->setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
int row = 0;
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ H264Section::H264Section(int default_crf, QWidget *parent) :
|
||||
CodecSection(parent)
|
||||
{
|
||||
QGridLayout* layout = new QGridLayout(this);
|
||||
layout->setMargin(0);
|
||||
layout->setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
int row = 0;
|
||||
layout->addWidget(new QLabel(tr("Encode Speed:")), row, 0);
|
||||
@@ -173,7 +173,7 @@ H264CRFSection::H264CRFSection(int default_crf, QWidget *parent) :
|
||||
QWidget(parent)
|
||||
{
|
||||
QHBoxLayout* layout = new QHBoxLayout(this);
|
||||
layout->setMargin(0);
|
||||
layout->setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
crf_slider_ = new QSlider(Qt::Horizontal);
|
||||
crf_slider_->setMinimum(kMinimumCRF);
|
||||
@@ -207,7 +207,7 @@ H264BitRateSection::H264BitRateSection(QWidget *parent) :
|
||||
QWidget(parent)
|
||||
{
|
||||
QGridLayout* layout = new QGridLayout(this);
|
||||
layout->setMargin(0);
|
||||
layout->setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
int row = 0;
|
||||
|
||||
@@ -261,7 +261,7 @@ H264FileSizeSection::H264FileSizeSection(QWidget *parent) :
|
||||
QWidget(parent)
|
||||
{
|
||||
QGridLayout* layout = new QGridLayout(this);
|
||||
layout->setMargin(0);
|
||||
layout->setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
int row = 0;
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ ImageSection::ImageSection(QWidget* parent) :
|
||||
CodecSection(parent)
|
||||
{
|
||||
QGridLayout* layout = new QGridLayout(this);
|
||||
layout->setMargin(0);
|
||||
layout->setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
int row = 0;
|
||||
|
||||
@@ -47,6 +47,7 @@ ImageSection::ImageSection(QWidget* parent) :
|
||||
frame_slider_->SetMinimum(0);
|
||||
frame_slider_->SetValue(0);
|
||||
frame_slider_->SetDisplayType(RationalSlider::kTime);
|
||||
connect(frame_slider_, &RationalSlider::ValueChanged, this, &ImageSection::TimeChanged);
|
||||
layout->addWidget(frame_slider_, row, 1);
|
||||
}
|
||||
|
||||
|
||||
@@ -59,6 +59,9 @@ public:
|
||||
frame_slider_->SetValue(t);
|
||||
}
|
||||
|
||||
signals:
|
||||
void TimeChanged(const rational &t);
|
||||
|
||||
private:
|
||||
QCheckBox* image_sequence_checkbox_;
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ ExportDialog::ExportDialog(ViewerOutput *viewer_node, bool stills_only_mode, QWi
|
||||
|
||||
preferences_area_ = new QWidget();
|
||||
QGridLayout* preferences_layout = new QGridLayout(preferences_area_);
|
||||
preferences_layout->setMargin(0);
|
||||
preferences_layout->setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
int row = 0;
|
||||
|
||||
@@ -148,6 +148,11 @@ ExportDialog::ExportDialog(ViewerOutput *viewer_node, bool stills_only_mode, QWi
|
||||
video_tab_ = new ExportVideoTab(color_manager_);
|
||||
AddPreferencesTab(video_tab_, tr("Video"));
|
||||
|
||||
// Set video tab time and make connections
|
||||
connect(viewer_node, &ViewerOutput::PlayheadChanged, video_tab_, &ExportVideoTab::SetTime);
|
||||
connect(video_tab_, &ExportVideoTab::TimeChanged, viewer_node, &ViewerOutput::SetPlayhead);
|
||||
video_tab_->SetTime(viewer_node->GetPlayhead());
|
||||
|
||||
audio_tab_ = new ExportAudioTab();
|
||||
AddPreferencesTab(audio_tab_, tr("Audio"));
|
||||
|
||||
@@ -183,7 +188,7 @@ ExportDialog::ExportDialog(ViewerOutput *viewer_node, bool stills_only_mode, QWi
|
||||
row++;
|
||||
|
||||
QHBoxLayout *btn_layout = new QHBoxLayout();
|
||||
btn_layout->setMargin(0);
|
||||
btn_layout->setContentsMargins(0, 0, 0, 0);
|
||||
preferences_layout->addLayout(btn_layout, row, 0, 1, 4);
|
||||
|
||||
btn_layout->addStretch();
|
||||
@@ -206,7 +211,6 @@ ExportDialog::ExportDialog(ViewerOutput *viewer_node, bool stills_only_mode, QWi
|
||||
preview_viewer_ = new ViewerWidget();
|
||||
preview_viewer_->ruler()->SetMarkerEditingEnabled(false);
|
||||
preview_viewer_->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
connect(preview_viewer_, &ViewerWidget::TimeChanged, video_tab_, &ExportVideoTab::SetTime);
|
||||
preview_layout->addWidget(preview_viewer_);
|
||||
splitter->addWidget(preview_area);
|
||||
|
||||
@@ -391,7 +395,7 @@ void ExportDialog::ExportFinished()
|
||||
// If this task was cancelled, we stay open so the user can potentially queue another export
|
||||
} else {
|
||||
// Accept this dialog and close
|
||||
if (import_file_after_export_) {
|
||||
if (import_file_after_export_->isEnabled() && import_file_after_export_->isChecked()) {
|
||||
QString filename = filename_edit_->text().trimmed();
|
||||
emit RequestImportFile(filename);
|
||||
}
|
||||
@@ -437,7 +441,7 @@ void ExportDialog::PresetComboBoxChanged()
|
||||
if (loading_presets_) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
QComboBox *c = static_cast<QComboBox *>(sender());
|
||||
|
||||
int preset_number = c->currentData().toInt();
|
||||
|
||||
@@ -51,14 +51,6 @@ public:
|
||||
rational GetSelectedTimebase() const;
|
||||
void SetSelectedTimebase(const rational &r);
|
||||
|
||||
void SetTime(const rational &time)
|
||||
{
|
||||
preview_viewer_->SetAudioScrubbingEnabled(false);
|
||||
preview_viewer_->SetTime(time);
|
||||
video_tab_->SetTime(time);
|
||||
preview_viewer_->SetAudioScrubbingEnabled(true);
|
||||
}
|
||||
|
||||
EncodingParams GenerateParams() const;
|
||||
void SetParams(const EncodingParams &e);
|
||||
|
||||
|
||||
@@ -184,6 +184,7 @@ QWidget *ExportVideoTab::SetupCodecSection()
|
||||
codec_layout->addWidget(codec_stack_, row, 0, 1, 2);
|
||||
|
||||
image_section_ = new ImageSection();
|
||||
connect(image_section_, &ImageSection::TimeChanged, this, &ExportVideoTab::TimeChanged);
|
||||
codec_stack_->addWidget(image_section_);
|
||||
|
||||
h264_section_ = new H264Section();
|
||||
|
||||
@@ -167,6 +167,8 @@ signals:
|
||||
|
||||
void ImageSequenceCheckBoxChanged(bool e);
|
||||
|
||||
void TimeChanged(const rational &time);
|
||||
|
||||
private:
|
||||
QWidget* SetupResolutionSection();
|
||||
QWidget* SetupColorSection();
|
||||
|
||||
@@ -38,7 +38,7 @@ VideoStreamProperties::VideoStreamProperties(Footage *footage, int video_index)
|
||||
video_premultiply_alpha_(nullptr)
|
||||
{
|
||||
QGridLayout* video_layout = new QGridLayout(this);
|
||||
video_layout->setMargin(0);
|
||||
video_layout->setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
int row = 0;
|
||||
|
||||
|
||||
@@ -102,8 +102,16 @@ void FootageRelinkDialog::BrowseForFootage()
|
||||
|
||||
QString new_fn = QFileDialog::getOpenFileName(this,
|
||||
tr("Relink \"%1\"").arg(f->GetLabel()),
|
||||
info.absolutePath(),
|
||||
QStringLiteral("%1;;%2 (**)").arg(info.fileName(), tr("All Files")));
|
||||
info.absolutePath());
|
||||
|
||||
// Originally, this function would attempt to filter to the exact filename of the missing file.
|
||||
// However, this would break on Windows if the filename had any spaces in it. The reason is
|
||||
// Windows separates its extensions with ';' while Qt separates them with ' '. Qt isn't
|
||||
// intelligent enough to determine whether it's a list of extensions or a single filename with a
|
||||
// space in it, it just does a global replace of ' ' to ';'. There's no way around it, outside of
|
||||
// bypassing Qt entirely and using Win32's GetOpenFileName() directly. As annoying as it is, I've
|
||||
// just disabled it for now.
|
||||
//QStringLiteral("%1 (\"%1\");;%2 (*)").arg(info.fileName(), tr("All Files")));
|
||||
|
||||
// We received a new filename
|
||||
if (!new_fn.isEmpty()) {
|
||||
|
||||
@@ -36,7 +36,7 @@ PreferencesAudioTab::PreferencesAudioTab()
|
||||
{
|
||||
// Backend Layout
|
||||
QGridLayout* main_layout = new QGridLayout();
|
||||
main_layout->setMargin(0);
|
||||
main_layout->setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
int row = 0;
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ PreferencesBehaviorTab::PreferencesBehaviorTab()
|
||||
tr("Hold ALT on any UI element to switch scrolling axes"),
|
||||
timeline_group);
|
||||
AddItem(tr("Seek Also Selects"),
|
||||
QStringLiteral("SelectAlsoSeeks"),
|
||||
QStringLiteral("SeekAlsoSelects"),
|
||||
timeline_group);
|
||||
AddItem(tr("Seek to the End of Pastes"),
|
||||
QStringLiteral("PasteSeeks"),
|
||||
@@ -107,6 +107,11 @@ PreferencesBehaviorTab::PreferencesBehaviorTab()
|
||||
tr("Multiple clips can share the same nodes. Disable this to automatically share node "
|
||||
"dependencies among clips when copying or splitting them."),
|
||||
node_group);
|
||||
|
||||
QTreeWidgetItem* opengl_group = AddParent(tr("OpenGL"));
|
||||
AddItem(tr("Use glFinish"),
|
||||
QStringLiteral("UseGLFinish"),
|
||||
opengl_group);
|
||||
}
|
||||
|
||||
void PreferencesBehaviorTab::Accept(MultiUndoCommand *command)
|
||||
|
||||
@@ -55,7 +55,7 @@ ProgressDialog::ProgressDialog(const QString& message, const QString& title, QWi
|
||||
|
||||
QHBoxLayout* cancel_layout = new QHBoxLayout();
|
||||
layout->addLayout(cancel_layout);
|
||||
cancel_layout->setMargin(0);
|
||||
cancel_layout->setContentsMargins(0, 0, 0, 0);
|
||||
cancel_layout->setSpacing(0);
|
||||
cancel_layout->addStretch();
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ SequenceDialogPresetTab::SequenceDialogPresetTab(QWidget* parent) :
|
||||
PresetManager<SequencePreset>(this, QStringLiteral("sequencepresets"))
|
||||
{
|
||||
QVBoxLayout* outer_layout = new QVBoxLayout(this);
|
||||
outer_layout->setMargin(0);
|
||||
outer_layout->setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
preset_tree_ = new QTreeWidget();
|
||||
preset_tree_->setColumnCount(1);
|
||||
|
||||
@@ -100,9 +100,9 @@ SpeedDurationDialog::SpeedDurationDialog(const QVector<ClipBlock *> &clips, cons
|
||||
loop_layout->addWidget(new QLabel(tr("Loop:")), row, 0);
|
||||
|
||||
loop_combo_ = new QComboBox();
|
||||
loop_combo_->addItem(tr("None"), Decoder::kLoopModeOff);
|
||||
loop_combo_->addItem(tr("Loop"), Decoder::kLoopModeLoop);
|
||||
loop_combo_->addItem(tr("Clamp"), Decoder::kLoopModeClamp);
|
||||
loop_combo_->addItem(tr("None"), int(LoopMode::kLoopModeOff));
|
||||
loop_combo_->addItem(tr("Loop"), int(LoopMode::kLoopModeLoop));
|
||||
loop_combo_->addItem(tr("Clamp"), int(LoopMode::kLoopModeClamp));
|
||||
loop_layout->addWidget(loop_combo_, row, 1);
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ SpeedDurationDialog::SpeedDurationDialog(const QVector<ClipBlock *> &clips, cons
|
||||
start_duration_ = clips.first()->length();
|
||||
start_reverse_ = clips.first()->reverse();
|
||||
start_maintain_audio_pitch_ = clips.first()->maintain_audio_pitch();
|
||||
start_loop_ = clips.first()->loop_mode();
|
||||
start_loop_ = int(clips.first()->loop_mode());
|
||||
for (int i=1; i<clips.size(); i++) {
|
||||
ClipBlock *c = clips.at(i);
|
||||
|
||||
@@ -141,7 +141,7 @@ SpeedDurationDialog::SpeedDurationDialog(const QVector<ClipBlock *> &clips, cons
|
||||
start_maintain_audio_pitch_ = -1;
|
||||
}
|
||||
|
||||
if (start_loop_ != -1 && c->loop_mode() != start_loop_) {
|
||||
if (start_loop_ != -1 && int(c->loop_mode()) != start_loop_) {
|
||||
start_loop_ = -1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,7 +56,13 @@ void TaskDialog::showEvent(QShowEvent *e)
|
||||
this, &TaskDialog::TaskFinished, Qt::QueuedConnection);
|
||||
|
||||
// Run task in another thread with QtConcurrent
|
||||
task_watcher->setFuture(QtConcurrent::run(task_, &Task::Start));
|
||||
task_watcher->setFuture(
|
||||
#if QT_VERSION_MAJOR >= 6
|
||||
QtConcurrent::run(&Task::Start, task_)
|
||||
#else
|
||||
QtConcurrent::run(task_, &Task::Start)
|
||||
#endif
|
||||
);
|
||||
|
||||
already_shown_ = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user