[vlc-devel] commit: Qt: provide a way to jump forward and backward programatically without going through hotkeys . (Jean-Baptiste Kempf )

git version control git at videolan.org
Sun Feb 22 22:19:11 CET 2009


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun Feb 22 17:27:53 2009 +0100| [8d5ee287550bd1bca53358d31f436a0200b8a18c] | committer: Jean-Baptiste Kempf 

Qt: provide a way to jump forward and backward programatically without going through hotkeys.

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

 modules/gui/qt4/input_manager.cpp |   22 ++++++++++++++++++++++
 modules/gui/qt4/input_manager.hpp |    3 +++
 2 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/modules/gui/qt4/input_manager.cpp b/modules/gui/qt4/input_manager.cpp
index 9067b76..a38807e 100644
--- a/modules/gui/qt4/input_manager.cpp
+++ b/modules/gui/qt4/input_manager.cpp
@@ -791,6 +791,28 @@ void InputManager::setRate( int new_rate )
         var_SetInteger( p_input, "rate", new_rate );
 }
 
+void InputManager::jumpFwd()
+{
+    int i_interval = config_GetInt( p_input, "short-jump-size" );
+    if( i_interval > 0 )
+    {
+        vlc_value_t val;
+        val.i_time = (mtime_t)(i_interval) * 1000000L;
+        var_Set( p_input, "time-offset", val );
+    }
+}
+
+void InputManager::jumpBwd()
+{
+    int i_interval = config_GetInt( p_input, "short-jump-size" );
+    if( i_interval > 0 )
+    {
+        vlc_value_t val;
+        val.i_time = -1 *(mtime_t)(i_interval) * 1000000L;
+        var_Set( p_input, "time-offset", val );
+    }
+}
+
 void InputManager::setAtoB()
 {
     if( !timeA )
diff --git a/modules/gui/qt4/input_manager.hpp b/modules/gui/qt4/input_manager.hpp
index 2560045..19af8ac 100644
--- a/modules/gui/qt4/input_manager.hpp
+++ b/modules/gui/qt4/input_manager.hpp
@@ -147,6 +147,9 @@ public slots:
     void faster();
     void normalRate();
     void setRate( int );
+    /* Jumping */
+    void jumpFwd();
+    void jumpBwd();
     /* Menus */
     void sectionNext();
     void sectionPrev();




More information about the vlc-devel mailing list