]> git.sesse.net Git - kdenlive/blobdiff - src/monitormanager.cpp
Initial support for Jog Shuttle devices
[kdenlive] / src / monitormanager.cpp
index 3cad95b4e229bac35a37859efef29934323e2a6f..9c163f07c91b7bdaae5996f6f7509184e797f821 100644 (file)
@@ -59,13 +59,48 @@ void MonitorManager::activateMonitor(QString name) {
     m_activeMonitor = name;
 }
 
+void MonitorManager::switchMonitors() {
+    if (m_activeMonitor == "clip") {
+        m_clipMonitor->stop();
+        m_projectMonitor->start();
+        m_projectMonitor->raise();
+        m_activeMonitor = m_projectMonitor->name();
+        emit raiseClipMonitor(false);
+    } else {
+        m_projectMonitor->stop();
+        m_clipMonitor->start();
+        m_activeMonitor = m_clipMonitor->name();
+        emit raiseClipMonitor(true);
+    }
+}
+
 void MonitorManager::slotPlay() {
     if (m_activeMonitor == "clip") m_clipMonitor->slotPlay();
     else m_projectMonitor->slotPlay();
 }
 
+void MonitorManager::slotRewind(double speed) {
+    if (m_activeMonitor == "clip") m_clipMonitor->slotRewind(speed);
+    else m_projectMonitor->slotRewind(speed);
+}
+
+void MonitorManager::slotForward(double speed) {
+    if (m_activeMonitor == "clip") m_clipMonitor->slotForward(speed);
+    else m_projectMonitor->slotForward(speed);
+}
+
+void MonitorManager::slotRewindOneFrame() {
+    if (m_activeMonitor == "clip") m_clipMonitor->slotRewindOneFrame();
+    else m_projectMonitor->slotRewindOneFrame();
+}
+
+void MonitorManager::slotForwardOneFrame() {
+    if (m_activeMonitor == "clip") m_clipMonitor->slotForwardOneFrame();
+    else m_projectMonitor->slotForwardOneFrame();
+}
+
 void MonitorManager::resetProfiles(QString prof) {
-    //m_clipMonitor->resetProfile(prof);
+    m_clipMonitor->resetProfile(prof);
     m_projectMonitor->resetProfile(prof);
 }