]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/components/controller.hpp
Qt4: fix enum switch warning
[vlc] / modules / gui / qt4 / components / controller.hpp
index 05d38261c3214b8c783d2aff596f22d05aeb7d85..5f9ca15f2b3159a5ca525adece98f69f704e1917 100644 (file)
@@ -32,6 +32,7 @@
 
 #include <QFrame>
 #include <QString>
+#include <QSizeGrip>
 
 #define MAIN_TB1_DEFAULT "64;39;64;38;65"
 #define MAIN_TB2_DEFAULT "0-2;64;3;1;4;64;7;9;64;10;20;19;64-4;37;65;35-4"
@@ -85,6 +86,7 @@ typedef enum buttonType_e
     INFO_BUTTON,
     PREVIOUS_BUTTON,
     NEXT_BUTTON,
+    OPEN_SUB_BUTTON,
     BUTTON_MAX,
 
     SPLITTER = 0x20,
@@ -95,6 +97,7 @@ typedef enum buttonType_e
     MENU_BUTTONS,
     TELETEXT_BUTTONS,
     ADVANCED_CONTROLLER,
+    PLAYBACK_BUTTONS,
     SPECIAL_MAX,
 
     WIDGET_SPACER = 0x40,
@@ -108,7 +111,8 @@ 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_("Previous"), N_("Next") };
+   N_("Loop/Repeat mode"), N_("Information"), N_("Previous"), N_("Next"),
+   N_("Open subtitles file")};
 static const char* const tooltipL[BUTTON_MAX] = { I_PLAY_TOOLTIP,
     N_("Stop playback"), N_("Open a medium"),
     N_("Previous media in the playlist, skip backward when keep-pressed"),
@@ -119,7 +123,8 @@ static const char* const tooltipL[BUTTON_MAX] = { I_PLAY_TOOLTIP,
     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_("Previous media in the playlist"), N_("Next media in the playlist")};
+    N_("Previous media in the playlist"), N_("Next media in the playlist"),
+    N_("Open subtitles file")};
 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",
@@ -128,7 +133,7 @@ static const QString iconL[BUTTON_MAX] ={ ":/toolbar/play_b", ":/toolbar/stop_b"
     ":/toolbar/frame", ":/toolbar/reverse", ":/toolbar/skip_back",
     ":/toolbar/skip_fw", ":/toolbar/clear", ":/buttons/playlist/shuffle_on",
     ":/buttons/playlist/repeat_all", ":/menu/info",
-    ":/toolbar/previous_b", ":/toolbar/next_b", };
+    ":/toolbar/previous_b", ":/toolbar/next_b", "" };
 
 enum
 {
@@ -204,11 +209,17 @@ public:
     ControlsWidget( intf_thread_t *_p_i, bool b_advControls,
                     QWidget *_parent = 0 );
 
+    void setGripVisible( bool b_visible )
+    { grip->setVisible( b_visible ); }
+
 protected:
     friend class MainInterface;
 
     bool b_advancedVisible;
 
+private:
+    QSizeGrip *grip;
+
 protected slots:
     void toggleAdvanced();
 
@@ -255,6 +266,8 @@ protected:
     virtual void leaveEvent( QEvent *event );
     virtual void keyPressEvent( QKeyEvent *event );
 
+    virtual void customEvent( QEvent *event );
+
 private slots:
     void showFSC();
     void planHideFSC();
@@ -263,13 +276,12 @@ private slots:
     void centerFSC( int );
 
 private:
-    virtual void customEvent( QEvent *event );
-
     QTimer *p_hideTimer;
 #if HAVE_TRANSPARENCY
     QTimer *p_slowHideTimer;
     bool b_slow_hide_begin;
     int  i_slow_hide_timeout;
+    float f_opacity;
 #endif
 
     int i_mouse_last_x, i_mouse_last_y;