[vlc-commits] Qt, provide new combo-buttons for next/fwd, prev/bckwd

Jean-Baptiste Kempf git at videolan.org
Thu Apr 21 00:58:21 CEST 2011


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Apr 21 00:49:11 2011 +0200| [1bcf6df4ca756c919bd11b5d3751a060a131f1bc] | committer: Jean-Baptiste Kempf

Qt, provide new combo-buttons for next/fwd, prev/bckwd

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

 modules/gui/qt4/components/controller.cpp |   18 ++++++++++++++++++
 modules/gui/qt4/components/controller.hpp |   10 +++++++---
 2 files changed, 25 insertions(+), 3 deletions(-)

diff --git a/modules/gui/qt4/components/controller.cpp b/modules/gui/qt4/components/controller.cpp
index 01efd91..31aefd1 100644
--- a/modules/gui/qt4/components/controller.cpp
+++ b/modules/gui/qt4/components/controller.cpp
@@ -266,6 +266,24 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options )
         ENABLE_ON_INPUT( FASTERButton );
         }
         break;
+    case PREV_SLOW_BUTTON:{
+        QToolButtonExt *but = new QToolButtonExt;
+        setupButton( but );
+        BUTTON_SET_BAR( but );
+        CONNECT( but, shortClicked(), THEMIM, prev() );
+        CONNECT( but, longClicked(), THEAM, skipBackward() );
+        widget = but;
+        }
+        break;
+    case NEXT_FAST_BUTTON:{
+        QToolButtonExt *but = new QToolButtonExt;
+        setupButton( but );
+        BUTTON_SET_BAR( but );
+        CONNECT( but, shortClicked(), THEMIM, next() );
+        CONNECT( but, longClicked(), THEAM, skipForward() );
+        widget = but;
+        }
+        break;
     case FRAME_BUTTON: {
         NORMAL_BUTTON( FRAME );
         ENABLE_ON_VIDEO( FRAMEButton );
diff --git a/modules/gui/qt4/components/controller.hpp b/modules/gui/qt4/components/controller.hpp
index 0edb09d..68487f6 100644
--- a/modules/gui/qt4/components/controller.hpp
+++ b/modules/gui/qt4/components/controller.hpp
@@ -83,6 +83,8 @@ typedef enum buttonType_e
     RANDOM_BUTTON,
     LOOP_BUTTON,
     INFO_BUTTON,
+    PREV_SLOW_BUTTON,
+    NEXT_FAST_BUTTON,
     BUTTON_MAX,
 
     SPLITTER = 0x20,
@@ -106,7 +108,7 @@ static const char* const nameL[BUTTON_MAX] = { N_("Play"), N_("Stop"), N_("Open"
    N_("De-Fullscreen"), N_("Extended panel"), N_("Playlist"), N_("Snapshot"),
    N_("Record"), N_("A->B Loop"), N_("Frame By Frame"), N_("Trickplay Reverse"),
    N_("Step backward" ), N_("Step forward"), N_("Quit"), N_("Random"),
-   N_("Loop/Repeat mode"), N_("Information") };
+   N_("Loop/Repeat mode"), N_("Information"), N_("Previous"), N_("Next") };
 static const char* const tooltipL[BUTTON_MAX] = { I_PLAY_TOOLTIP,
     N_("Stop playback"), N_("Open a medium"),
     N_("Previous media in the playlist"),
@@ -116,7 +118,8 @@ static const char* const tooltipL[BUTTON_MAX] = { I_PLAY_TOOLTIP,
     N_( "Take a snapshot" ), N_( "Record" ),
     N_( "Loop from point A to point B continuously." ), N_("Frame by frame"),
     N_("Reverse"), N_("Step backward"), N_("Step forward"), N_("Quit"),
-    N_("Random"), N_("Change the loop and repeat modes"), N_("Information") };
+    N_("Random"), N_("Change the loop and repeat modes"), N_("Information"),
+    N_("Previous media or slower"), N_("Next media or faster")};
 static const QString iconL[BUTTON_MAX] ={ ":/toolbar/play_b", ":/toolbar/stop_b",
     ":/toolbar/eject", ":/toolbar/previous_b", ":/toolbar/next_b",
     ":/toolbar/slower", ":/toolbar/faster", ":/toolbar/fullscreen",
@@ -124,7 +127,8 @@ static const QString iconL[BUTTON_MAX] ={ ":/toolbar/play_b", ":/toolbar/stop_b"
     ":/toolbar/snapshot", ":/toolbar/record", ":/toolbar/atob_nob",
     ":/toolbar/frame", ":/toolbar/reverse", ":/toolbar/skip_back",
     ":/toolbar/skip_fw", ":/toolbar/clear", ":/buttons/playlist/shuffle_on",
-    ":/buttons/playlist/repeat_all", ":/menu/info" };
+    ":/buttons/playlist/repeat_all", ":/menu/info",
+    ":/toolbar/previous_b", ":/toolbar/next_b", };
 
 enum
 {



More information about the vlc-commits mailing list