Files
oak-editor/app/dialog/export/exportadvancedvideodialog.cpp
T
Thomas Wilshaw cb1127936a Implement Alt Click to default on sliders
The following sliders now have Alt Click functionality:
 - Nodes (What it's initialy set too or 0 if not)
 - Export Dialog Dimensions~ (Defaults to Sequence width/height)
 - Export Compression Settings~
    - Advanced (0)
 - Speed/Duration
    - Speed (100%)
    - Duration (clip length)
 - Stream Properties Image sequence
    - Start Index (1)
    - End Index (sequence length)

Sliders with no default value set ignore an Alt
Click.

Added SliderBase::SetDefaultValue() which sets the
default value of a slider.

Added ValueReset() to SliderBase signals which is
called if a slider is Alt Clicked on. Only updates
if default_value_ is not Null.
2020-05-07 22:14:37 +01:00

44 lines
1.1 KiB
C++

#include "exportadvancedvideodialog.h"
#include <QDialogButtonBox>
#include <QGridLayout>
#include <QLabel>
OLIVE_NAMESPACE_ENTER
ExportAdvancedVideoDialog::ExportAdvancedVideoDialog(QWidget *parent) :
QDialog(parent)
{
setWindowTitle(tr("Advanced"));
QGridLayout* layout = new QGridLayout(this);
int row = 0;
layout->addWidget(new QLabel(tr("Threads:")), row, 0);
thread_slider_ = new IntegerSlider();
thread_slider_->SetMinimum(0);
thread_slider_->SetDefaultValue(0);
layout->addWidget(thread_slider_, row, 1);
row++;
QDialogButtonBox* buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
connect(buttons, &QDialogButtonBox::accepted, this, &ExportAdvancedVideoDialog::accept);
connect(buttons, &QDialogButtonBox::rejected, this, &ExportAdvancedVideoDialog::reject);
layout->addWidget(buttons, row, 0, 1, 2);
}
int ExportAdvancedVideoDialog::threads() const
{
return static_cast<int>(thread_slider_->GetValue());
}
void ExportAdvancedVideoDialog::set_threads(int t)
{
thread_slider_->SetValue(t);
}
OLIVE_NAMESPACE_EXIT