X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fpositionedit.cpp;h=f96ebae967e4adcd4e12719db462b990a4534ac8;hb=c3302003093710ee247ad84c0fe2ef3c579d417f;hp=ad8d4e14e92fa5efcbd4232190c40783e8675db7;hpb=6fa9db6c7fe703c5831bee5d157c0f169ebc8240;p=kdenlive diff --git a/src/positionedit.cpp b/src/positionedit.cpp index ad8d4e14..f96ebae9 100644 --- a/src/positionedit.cpp +++ b/src/positionedit.cpp @@ -25,8 +25,8 @@ #include #include -PositionEdit::PositionEdit(const QString name, int pos, int min, int max, const Timecode tc, QWidget* parent) : - QWidget(parent) +PositionEdit::PositionEdit(const QString &name, int pos, int min, int max, const Timecode&tc, QWidget* parent) : + QWidget(parent) { QHBoxLayout *layout = new QHBoxLayout(this); @@ -81,10 +81,15 @@ void PositionEdit::slotUpdatePosition() emit parameterChanged(m_display->getValue()); } -void PositionEdit::setRange(int min, int max) +void PositionEdit::setRange(int min, int max, bool absolute) { - m_slider->setRange(0, max - min); - m_display->setRange(0, max - min); + if (absolute) { + m_slider->setRange(min, max); + m_display->setRange(min, max); + } else { + m_slider->setRange(0, max - min); + m_display->setRange(0, max - min); + } } #include "positionedit.moc"