[vlc-commits] qt: add pitch shifting slider under new Advanced tab

Valentin Deniaud git at videolan.org
Tue Sep 5 14:24:45 CEST 2017


vlc | branch: master | Valentin Deniaud <valentin.deniaud at inpt.fr> | Mon Sep  4 14:56:14 2017 +0200| [c077466338b1523d884bfd24cff5a6d45040b253] | committer: Thomas Guillem

qt: add pitch shifting slider under new Advanced tab

Signed-off-by: Thomas Guillem <thomas at gllm.fr>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c077466338b1523d884bfd24cff5a6d45040b253
---

 modules/gui/qt/components/extended_panels.cpp | 13 +++++++++++++
 modules/gui/qt/components/extended_panels.hpp |  8 ++++++++
 modules/gui/qt/dialogs/extended.cpp           | 13 +++++++++++++
 3 files changed, 34 insertions(+)

diff --git a/modules/gui/qt/components/extended_panels.cpp b/modules/gui/qt/components/extended_panels.cpp
index 2486a28ba2..82dfe9c3a9 100644
--- a/modules/gui/qt/components/extended_panels.cpp
+++ b/modules/gui/qt/components/extended_panels.cpp
@@ -1310,6 +1310,19 @@ StereoWidener::StereoWidener( intf_thread_t *p_intf, QWidget *parent )
     build();
 }
 
+/**********************************************************************
+ * Advanced
+ **********************************************************************/
+
+PitchShifter::PitchShifter( intf_thread_t *p_intf, QWidget *parent )
+    : AudioFilterControlWidget( p_intf, parent, "pitch", "scaletempo" )
+{
+    i_smallfont = -1;
+    controls.append( { "pitch-shift", N_("Adjust pitch"), "semitones",
+                        -12.0, 12.0, 0.0, 0.25, 1.0 } );
+    build();
+}
+
 #include <QToolButton>
 #include <QGridLayout>
 
diff --git a/modules/gui/qt/components/extended_panels.hpp b/modules/gui/qt/components/extended_panels.hpp
index 31ec67ec13..f303f1e978 100644
--- a/modules/gui/qt/components/extended_panels.hpp
+++ b/modules/gui/qt/components/extended_panels.hpp
@@ -216,6 +216,14 @@ public:
     StereoWidener( intf_thread_t *, QWidget * );
 };
 
+class PitchShifter: public AudioFilterControlWidget
+{
+    Q_OBJECT
+
+public:
+    PitchShifter( intf_thread_t *, QWidget * );
+};
+
 class SyncWidget : public QWidget
 {
     Q_OBJECT
diff --git a/modules/gui/qt/dialogs/extended.cpp b/modules/gui/qt/dialogs/extended.cpp
index fbcd70d23a..f8f42e0f2b 100644
--- a/modules/gui/qt/dialogs/extended.cpp
+++ b/modules/gui/qt/dialogs/extended.cpp
@@ -80,6 +80,19 @@ ExtendedDialog::ExtendedDialog( intf_thread_t *_p_intf )
     audioTab->addTab( stereowiden, qtr( "Stereo Widener" ) );
     audioLayout->addWidget( audioTab );
 
+    QWidget *advancedTab = new QWidget;
+    QGridLayout *advancedTabLayout = new QGridLayout;
+
+    PitchShifter *pitchshifter = new PitchShifter( p_intf, audioTab );
+    CONNECT( pitchshifter, configChanged(QString, QVariant), this, putAudioConfig(QString, QVariant) );
+
+    advancedTabLayout->setColumnStretch( 1, 10 );
+    advancedTabLayout->addWidget( pitchshifter );
+
+    advancedTab->setLayout( advancedTabLayout );
+    audioTab->addTab( advancedTab, qtr( "Advanced" ) );
+    audioLayout->addWidget( audioTab );
+
     mainTabW->insertTab( AUDIO_TAB, audioWidget, qtr( "Audio Effects" ) );
 
     /* Video Effects */



More information about the vlc-commits mailing list