]> git.sesse.net Git - kdenlive/commitdiff
Move mlt interlace and rescale into main menu
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Sun, 10 Mar 2013 11:48:52 +0000 (12:48 +0100)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Sun, 10 Mar 2013 11:48:52 +0000 (12:48 +0100)
src/kdenliveui.rc
src/mainwindow.cpp
src/mainwindow.h
src/monitor.cpp
src/monitor.h

index 87aeff610f251f4658a8c3d42278993e8bff6ba2..5019601e741a24cc894ddf954943d4152a417cc5 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
-<gui name="kdenlive" version="72">
+<gui name="kdenlive" version="76">
   <ToolBar name="extraToolBar" >
     <text>Extra Toolbar</text>
        <Action name="project_render" />
       <Action name="mark_out" />
       <Separator />
       <Action name="monitor_fullscreen" />
+      <Action name="mlt_interlace" />
+      <Action name="mlt_interpolation" />
       <Action name="switch_monitor" />
       <Action name="insert_project_tree" />
       <Action name="insert_timeline" />
index 517f31c2102d37dd8601ff5cc0142458216ecaac..bae50b8fb8b190c70b6e6acfeb74be9aa7189aa4 100644 (file)
@@ -1334,6 +1334,30 @@ void MainWindow::setupActions()
     fullMon->setText(i18n("Switch monitor fullscreen"));
     fullMon->setIcon(KIcon("view-fullscreen"));
     connect(fullMon, SIGNAL(triggered(bool)), m_monitorManager, SLOT(slotSwitchFullscreen()));
+    
+    KSelectAction *interlace = new KSelectAction(i18n("Deinterlacer"), this);
+    interlace->addAction(i18n("One Field (fast)"));
+    interlace->addAction(i18n("Linear Blend (fast)"));
+    interlace->addAction(i18n("YADIF - temporal only (good)"));
+    interlace->addAction(i18n("YADIF - temporal + spacial (best)"));
+    if (KdenliveSettings::mltdeinterlacer() == "linearblend") interlace->setCurrentItem(1);
+    else if (KdenliveSettings::mltdeinterlacer() == "yadif-temporal") interlace->setCurrentItem(2);
+    else if (KdenliveSettings::mltdeinterlacer() == "yadif") interlace->setCurrentItem(3);
+    else interlace->setCurrentItem(0);
+    collection.addAction("mlt_interlace", interlace);
+    connect(interlace, SIGNAL(triggered(int)), this, SLOT(slotSetDeinterlacer(int)));
+    
+    KSelectAction *interpol = new KSelectAction(i18n("Interpolation"), this);
+    interpol->addAction(i18n("Nearest Neighbor (fast)"));
+    interpol->addAction(i18n("Bilinear (good)"));
+    interpol->addAction(i18n("Bicubic (better)"));
+    interpol->addAction(i18n("Hyper/Lanczos (best)"));
+    if (KdenliveSettings::mltinterpolation() == "bilinear") interpol->setCurrentItem(1);
+    else if (KdenliveSettings::mltinterpolation() == "bicubic") interpol->setCurrentItem(2);
+    else if (KdenliveSettings::mltinterpolation() == "hyper") interpol->setCurrentItem(3);
+    else interpol->setCurrentItem(0);
+    collection.addAction("mlt_interpolation", interpol);
+    connect(interpol, SIGNAL(triggered(int)), this, SLOT(slotSetInterpolation(int)));
 
     KAction *insertTree = collection.addAction("insert_project_tree");
     insertTree->setText(i18n("Insert zone in project tree"));
@@ -4663,6 +4687,47 @@ void MainWindow::slotAlignPlayheadToMousePos()
     m_activeTimeline->projectView()->slotAlignPlayheadToMousePos();
 }
 
+void MainWindow::slotSetDeinterlacer(int ix)
+{
+    QString value;
+    switch (ix) {
+      
+      case 1:
+       value = "linearblend";
+       break;
+      case 2:
+       value = "yadif-nospatial";
+       break;
+      case 3:
+       value = "yadif";
+       break;
+      default:
+       value = "onefield";
+    }
+    KdenliveSettings::setMltdeinterlacer(value);
+    m_monitorManager->setConsumerProperty("deinterlace_method", value);
+}
+
+void MainWindow::slotSetInterpolation(int ix)
+{
+    QString value;
+    switch (ix) {
+      case 1:
+       value = "bilinear";
+       break;
+      case 2:
+       value = "bicubic";
+       break;
+      case 3:
+       value = "hyper";
+       break;
+      default:
+       value = "nearest";
+    }
+    KdenliveSettings::setMltinterpolation(value);
+    m_monitorManager->setConsumerProperty("rescale", value);
+}
+
 #include "mainwindow.moc"
 
 #ifdef DEBUG_MAINW
index acba2873dcc8e3dfa3ed21188db0b26c82b2eb36..d4d760842604d6c4f303847cedf4943c25837e72 100644 (file)
@@ -570,6 +570,10 @@ private slots:
     void slotProcessImportKeyframes(GRAPHICSRECTITEM type, const QString& data, int maximum);
     /** @brief Move playhead to mouse curser position if defined key is pressed */
     void slotAlignPlayheadToMousePos();
+    /** @brief Set MLT's consumer deinterlace method */
+    void slotSetDeinterlacer(int ix);
+    /** @brief Set MLT's consumer interpolation method */
+    void slotSetInterpolation(int ix);
 
 signals:
     Q_SCRIPTABLE void abortRenderJob(const QString &url);
index 4c3fd13ebfd96cda7d0c2a5cc505142722f11bf7..34f1c7bd0d8bb35258eb0c05f3f1bc2230c69488 100644 (file)
@@ -290,28 +290,6 @@ void Monitor::setupMenu(QMenu *goMenu, QAction *playZone, QAction *loopZone, QMe
     showTips->setCheckable(true);
     connect(showTips, SIGNAL(toggled(bool)), this, SLOT(slotSwitchMonitorInfo(bool)));
     showTips->setChecked(KdenliveSettings::displayMonitorInfo());
-    
-    KSelectAction *interlace = new KSelectAction(i18n("Deinterlacer"), this);
-    interlace->addAction(i18n("One Field (fast)"));
-    interlace->addAction(i18n("Linear Blend (fast)"));
-    interlace->addAction(i18n("YADIF - temporal only (good)"));
-    interlace->addAction(i18n("YADIF - temporal + spacial (best)"));
-    if (KdenliveSettings::mltdeinterlacer() == "linearblend") interlace->setCurrentItem(1);
-    else if (KdenliveSettings::mltdeinterlacer() == "yadif-temporal") interlace->setCurrentItem(2);
-    else if (KdenliveSettings::mltdeinterlacer() == "yadif") interlace->setCurrentItem(3);
-    else interlace->setCurrentItem(0);
-    connect(interlace, SIGNAL(triggered(int)), this, SLOT(slotSetDeinterlacer(int)));
-    
-    KSelectAction *interpol = new KSelectAction(i18n("Interpolation"), this);
-    interpol->addAction(i18n("Nearest Neighbor (fast)"));
-    interpol->addAction(i18n("Bilinear (good)"));
-    interpol->addAction(i18n("Bicubic (better)"));
-    interpol->addAction(i18n("Hyper/Lanczos (best)"));
-    if (KdenliveSettings::mltinterpolation() == "bilinear") interpol->setCurrentItem(1);
-    else if (KdenliveSettings::mltinterpolation() == "bicubic") interpol->setCurrentItem(2);
-    else if (KdenliveSettings::mltinterpolation() == "hyper") interpol->setCurrentItem(3);
-    else interpol->setCurrentItem(0);
-    connect(interpol, SIGNAL(triggered(int)), this, SLOT(slotSetInterpolation(int)));
 
     QAction *dropFrames = m_contextMenu->addAction(KIcon(), i18n("Real time (drop frames)"));
     dropFrames->setCheckable(true);
@@ -320,9 +298,6 @@ void Monitor::setupMenu(QMenu *goMenu, QAction *playZone, QAction *loopZone, QMe
     
     m_configMenu->addAction(showTips);
     m_configMenu->addAction(dropFrames);
-    m_configMenu->addAction(interlace);
-    m_configMenu->addAction(interpol);
-
 }
 
 void Monitor::slotGoToMarker(QAction *action)
@@ -1006,48 +981,6 @@ void Monitor::slotSwitchDropFrames(bool show)
     render->setDropFrames(show);
 }
 
-void Monitor::slotSetDeinterlacer(int ix)
-{
-    QString value;
-    switch (ix) {
-      
-      case 1:
-       value = "linearblend";
-       break;
-      case 2:
-       value = "yadif-nospatial";
-       break;
-      case 3:
-       value = "yadif";
-       break;
-      default:
-       value = "onefield";
-    }
-    KdenliveSettings::setMltdeinterlacer(value);
-    m_monitorManager->setConsumerProperty("deinterlace_method", value);
-}
-
-void Monitor::slotSetInterpolation(int ix)
-{
-    QString value;
-    switch (ix) {
-      case 1:
-       value = "bilinear";
-       break;
-      case 2:
-       value = "bicubic";
-       break;
-      case 3:
-       value = "hyper";
-       break;
-      default:
-       value = "nearest";
-    }
-    KdenliveSettings::setMltinterpolation(value);
-    m_monitorManager->setConsumerProperty("rescale", value);
-}
-
-
 void Monitor::slotSwitchMonitorInfo(bool show)
 {
     KdenliveSettings::setDisplayMonitorInfo(show);
index 1de74ffa0cb2d7bcce33f1d6a58c9ed025bd0b27..c7821273f87f231cf22a1f95cf91395ca933bfff 100644 (file)
@@ -170,8 +170,6 @@ private slots:
     void setClipZone(QPoint pos);
     void slotSwitchMonitorInfo(bool show);
     void slotSwitchDropFrames(bool show);
-    void slotSetDeinterlacer(int ix);
-    void slotSetInterpolation(int ix);
     void slotGoToMarker(QAction *action);
     void slotSetVolume(int volume);
     void slotShowVolume();