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.
This commit is contained in:
Thomas Wilshaw
2020-05-07 22:14:37 +01:00
parent 502ce85828
commit cb1127936a
10 changed files with 69 additions and 18 deletions
@@ -93,6 +93,7 @@ SpeedDurationDialog::SpeedDurationDialog(const rational& timebase, const QList<C
speed_slider_ = new FloatSlider();
speed_slider_->SetMinimum(0);
speed_slider_->SetDisplayType(FloatSlider::kPercentage);
speed_slider_->SetDefaultValue(1);
speed_layout->addWidget(speed_slider_, row, 1);
if (same_speed) {
@@ -111,6 +112,7 @@ SpeedDurationDialog::SpeedDurationDialog(const rational& timebase, const QList<C
duration_slider_ = new TimeSlider();
duration_slider_->SetTimebase(timebase_);
duration_slider_->SetMinimum(1);
duration_slider_->SetDefaultValue(Timecode::time_to_timestamp(clips_.first()->length(), timebase_));
speed_layout->addWidget(duration_slider_, row, 1);
if (same_duration) {