]> git.sesse.net Git - kdenlive/blobdiff - src/stopmotion/stopmotion.cpp
Integrate with the required MLT hooks for getting Movit to work.
[kdenlive] / src / stopmotion / stopmotion.cpp
index 6235ac91485874d904866f5c2f2298f3028645e0..120e208f8c697c39a23ebaabdbba84681bb69eb0 100644 (file)
@@ -93,7 +93,7 @@ void MyLabel::paintEvent(QPaintEvent* event)
 
 
 StopmotionMonitor::StopmotionMonitor(MonitorManager *manager, QWidget *parent) :
-    AbstractMonitor(Kdenlive::stopmotionMonitor, manager, parent),
+    AbstractMonitor(Kdenlive::StopMotionMonitor, manager, parent),
     m_captureDevice(NULL)
 {
     createVideoSurface();
@@ -117,9 +117,9 @@ AbstractRender *StopmotionMonitor::abstractRender()
     return m_captureDevice;
 }
 
-Kdenlive::MONITORID StopmotionMonitor::id() const
+Kdenlive::MonitorId StopmotionMonitor::id() const
 {
-    return Kdenlive::stopmotionMonitor;
+    return Kdenlive::StopMotionMonitor;
 }
 
 
@@ -347,7 +347,8 @@ StopmotionWidget::~StopmotionWidget()
 
 void StopmotionWidget::slotUpdateOverlayEffect(QAction* act)
 {
-    if (act) m_effectIndex = act->data().toInt();
+    if (act)
+        m_effectIndex = act->data().toInt();
     KdenliveSettings::setStopmotioneffect(m_effectIndex);
     slotUpdateOverlay();
 }
@@ -490,7 +491,7 @@ void StopmotionWidget::slotLive(bool isOn)
             connect(m_captureDevice, SIGNAL(frameSaved(QString)), this, SLOT(slotNewThumb(QString)));
         }
 
-        m_manager->activateMonitor(Kdenlive::stopmotionMonitor);
+        m_manager->activateMonitor(Kdenlive::StopMotionMonitor);
         QString producer = createProducer(profile, service, resource);
         if (m_captureDevice->slotStartPreview(producer, true)) {
             if (m_showOverlay->isChecked()) {
@@ -552,7 +553,7 @@ void StopmotionWidget::slotShowOverlay(bool isOn)
 
 void StopmotionWidget::reloadOverlay()
 {
-    QString path = getPathForFrame(m_sequenceFrame - 1);
+    const QString path = getPathForFrame(m_sequenceFrame - 1);
     if (!QFile::exists(path)) {
         log_box->insertItem(-1, i18n("No previous frame found"));
         log_box->setCurrentIndex(0);
@@ -651,10 +652,12 @@ void StopmotionWidget::slotCaptureFrame()
     m_sequenceFrame++;
     button_addsequence->setEnabled(true);
     if (capture_interval->isChecked()) {
-        if (KdenliveSettings::sm_prenotify()) QTimer::singleShot((KdenliveSettings::captureinterval() - KdenliveSettings::sm_notifytime()) * 1000, this, SLOT(slotPreNotify()));
+        if (KdenliveSettings::sm_prenotify())
+            QTimer::singleShot((KdenliveSettings::captureinterval() - KdenliveSettings::sm_notifytime()) * 1000, this, SLOT(slotPreNotify()));
         m_intervalTimer.start();
     }
-    else m_captureAction->setChecked(false);
+    else
+        m_captureAction->setChecked(false);
 }
 
 void StopmotionWidget::slotPreNotify()
@@ -674,7 +677,8 @@ void StopmotionWidget::slotNewThumb(const QString &path)
 
 void StopmotionWidget::slotPrepareThumbs()
 {
-    if (m_filesList.isEmpty()) return;
+    if (m_filesList.isEmpty())
+        return;
     QString path = m_filesList.takeFirst();
     emit doCreateThumbs(QImage(path), SlideshowClip::getFrameNumberFromPath(path));