]> git.sesse.net Git - kdenlive/blobdiff - src/monitormanager.cpp
* Add actions and shortcut for "set inpoint" and "set outpoint"
[kdenlive] / src / monitormanager.cpp
index 1765fa86cc4567ef0be401c32891741332050bf4..ed94e58d8457e1ad55818d2ee725318e84a2bd01 100644 (file)
 
 MonitorManager::MonitorManager(QWidget *parent)
         : QObject(parent) {
-
-
-}
-
-void MonitorManager::setTimecode(Timecode tc) {
-    m_timecode = tc;
 }
 
 Timecode MonitorManager::timecode() {
@@ -43,7 +37,6 @@ void MonitorManager::initMonitors(Monitor *clipMonitor, Monitor *projectMonitor)
     m_projectMonitor = projectMonitor;
 }
 
-
 void MonitorManager::activateMonitor(QString name) {
     if (m_activeMonitor == name) return;
     if (name == "clip") {
@@ -79,9 +72,47 @@ void MonitorManager::slotPlay() {
     else m_projectMonitor->slotPlay();
 }
 
-void MonitorManager::resetProfiles(QString prof) {
-    m_clipMonitor->resetProfile(prof);
-    m_projectMonitor->resetProfile(prof);
+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::slotStart() {
+    if (m_activeMonitor == "clip") m_clipMonitor->slotStart();
+    else m_projectMonitor->slotStart();
+}
+
+void MonitorManager::slotEnd() {
+    if (m_activeMonitor == "clip") m_clipMonitor->slotEnd();
+    else m_projectMonitor->slotEnd();
+}
+
+void MonitorManager::resetProfiles(Timecode tc) {
+    m_timecode = tc;
+    slotResetProfiles();
+}
+
+void MonitorManager::slotResetProfiles() {
+    activateMonitor("clip");
+    m_clipMonitor->resetProfile();
+    activateMonitor("project");
+    m_projectMonitor->resetProfile();
+    //m_projectMonitor->refreshMonitor(true);
 }
 
 #include "monitormanager.moc"