X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fclipdurationdialog.cpp;h=24d5cb7b74da4d4d325a5a1923f2f1bec76af411;hb=255cfc0146db2aa12cbce15f6a3590efc5d9ef83;hp=6365bdf1cc2636e3d45ba7b520045b534cb9cf38;hpb=052a54cda58f34e15d0f353671c9f933dd35ea10;p=kdenlive diff --git a/src/clipdurationdialog.cpp b/src/clipdurationdialog.cpp index 6365bdf1..24d5cb7b 100644 --- a/src/clipdurationdialog.cpp +++ b/src/clipdurationdialog.cpp @@ -27,7 +27,7 @@ #include -ClipDurationDialog::ClipDurationDialog(AbstractClipItem *clip, Timecode tc, GenTime min, GenTime max, QWidget * parent): +ClipDurationDialog::ClipDurationDialog(AbstractClipItem *clip, const Timecode &tc, const GenTime &min, const GenTime &max, QWidget * parent): QDialog(parent), m_clip(clip), m_min(min), @@ -37,24 +37,24 @@ ClipDurationDialog::ClipDurationDialog(AbstractClipItem *clip, Timecode tc, GenT setupUi(this); m_pos = new TimecodeDisplay(tc); - m_dur = new TimecodeDisplay(tc); m_cropStart = new TimecodeDisplay(tc); + m_dur = new TimecodeDisplay(tc); m_cropEnd = new TimecodeDisplay(tc); clip_position_box->addWidget(m_pos); + crop_start_box->addWidget(m_cropStart); clip_duration_box->addWidget(m_dur); - crop_start_box->addWidget(m_cropStart), crop_end_box->addWidget(m_cropEnd); bool allowCrop = true; - if (clip->type() == AVWIDGET) { + if (clip->type() == AVWidget) { ClipItem *item = static_cast (clip); - int t = item->clipType(); - if (t == COLOR || t == IMAGE || t == TEXT) + const int t = item->clipType(); + if (t == Color || t == Image || t == Text) allowCrop = false; } - if (!allowCrop || clip->type() == TRANSITIONWIDGET) { + if (!allowCrop || clip->type() == TransitionWidget) { m_cropStart->setHidden(true); crop_label->hide(); m_cropEnd->setHidden(true), @@ -68,10 +68,10 @@ ClipDurationDialog::ClipDurationDialog(AbstractClipItem *clip, Timecode tc, GenT m_cropStart->setValue(m_clip->cropStart()); m_cropEnd->setValue(m_clip->maxDuration() - m_clip->cropDuration() - m_clip->cropStart()); - connect(m_pos, SIGNAL(editingFinished()), this, SLOT(slotCheckStart())); - connect(m_dur, SIGNAL(editingFinished()), this, SLOT(slotCheckDuration())); - connect(m_cropStart, SIGNAL(editingFinished()), this, SLOT(slotCheckCrop())); - connect(m_cropEnd, SIGNAL(editingFinished()), this, SLOT(slotCheckEnd())); + connect(m_pos, SIGNAL(timeCodeEditingFinished()), this, SLOT(slotCheckStart())); + connect(m_dur, SIGNAL(timeCodeEditingFinished()), this, SLOT(slotCheckDuration())); + connect(m_cropStart, SIGNAL(timeCodeEditingFinished()), this, SLOT(slotCheckCrop())); + connect(m_cropEnd, SIGNAL(timeCodeEditingFinished()), this, SLOT(slotCheckEnd())); adjustSize(); }