]> git.sesse.net Git - vlc/commitdiff
Qt4 - no more timeElapsed/timeReamining menu for a boolean option. Right and left...
authorJean-Baptiste Kempf <jb@videolan.org>
Tue, 9 Oct 2007 02:16:30 +0000 (02:16 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Tue, 9 Oct 2007 02:16:30 +0000 (02:16 +0000)
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/main_interface.hpp

index c8d77326b5e2838a83eb55f02a5bf3dff93a87f4..f46e797e252a9b06f0f0876c93a1c0596c4ae9b8 100644 (file)
@@ -44,6 +44,8 @@
 #include <QLabel>
 #include <QSlider>
 #include <QWidgetAction>
+#include <QDockWidget>
+#include <QToolBar>
 
 #include <assert.h>
 #include <vlc_keys.h>
@@ -125,6 +127,17 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
     setVLCWindowsTitle();
     handleMainUi( settings );
 
+#if 0 /* dock part */
+    QDockWidget *dock = new QDockWidget( this );
+    PlaylistWidget *plw = new PlaylistWidget( p_intf );
+    dock->setWidget( plw );
+    addDockWidget( Qt::RightDockWidgetArea, dock );
+
+    QToolBar *tb = new QToolBar(this);
+    tb->addAction( "playlist", dock, SLOT( hide() ) );
+    addToolBar(Qt::RightToolBarArea, tb);
+#endif
+
     /* Menu Bar */
     QVLCMenu::createMenuBar( this, p_intf, playlistEmbeddedFlag,
                              visualSelectorEnabled );
@@ -148,10 +161,11 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
     speedLabel->setContextMenuPolicy ( Qt::CustomContextMenu );
     timeLabel->setContextMenuPolicy ( Qt::CustomContextMenu );
     CONNECT( timeLabel, timeLabelClicked(), this, toggleTimeDisplay() );
+    CONNECT( timeLabel, timeLabelDoubleClicked(), THEDP, gotoTimeDialog() );
     CONNECT( speedLabel, customContextMenuRequested( QPoint ),
              this, showSpeedMenu( QPoint ) );
     CONNECT( timeLabel, customContextMenuRequested( QPoint ),
-             this, showTimeMenu( QPoint ) );
+             this, toggleTimeDisplay() );
 
     /**********************
      * Systray Management *
@@ -409,14 +423,6 @@ void MainInterface::showSpeedMenu( QPoint pos )
     speedControlMenu->exec( QCursor::pos() - pos + QPoint( 0, speedLabel->height() ) );
 }
 
-void MainInterface::showTimeMenu( QPoint pos )
-{
-    QMenu menu( this );
-    menu.addAction(  qtr("Elapsed Time") , this, SLOT( setElapsedTime() ) );
-    menu.addAction(  qtr("Remaining Time") , this, SLOT( setRemainTime() ) );
-    menu.exec( QCursor::pos() - pos +QPoint( 0, timeLabel->height() ) );
-}
-
 /****************************************************************************
  * Video Handling
  ****************************************************************************/
@@ -675,12 +681,10 @@ void MainInterface::setDisplayPosition( float pos, int time, int length )
 
 void MainInterface::toggleTimeDisplay()
 {
+    msg_Dbg( p_intf, "Hello" );
     b_remainingTime = ( b_remainingTime ? false : true );
 }
 
-void MainInterface::setElapsedTime(){ b_remainingTime = false; }
-void MainInterface::setRemainTime(){ b_remainingTime = true; }
-
 void MainInterface::setName( QString name )
 {
     input_name = name;
index fa9cf2efdb54d19bf95de9425e1c6a494b3567a9..2273455187a54afe7a635518c70102c7857121e0 100644 (file)
@@ -117,7 +117,7 @@ private:
     QLabel              *timeLabel;
     QLabel              *speedLabel;
     QLabel              *nameLabel;
+
     bool                 b_remainingTime;
 
     void customEvent( QEvent *);
@@ -136,8 +136,6 @@ private slots:
     void setVLCWindowsTitle( QString title = "" );
     void setDisplayPosition( float, int, int );
     void toggleTimeDisplay();
-    void setElapsedTime();
-    void setRemainTime();
 #if 0
     void visual();
 #endif
@@ -146,7 +144,6 @@ private slots:
     void updateSystrayTooltipName( QString );
     void updateSystrayTooltipStatus( int );
     void showSpeedMenu( QPoint );
-    void showTimeMenu( QPoint );
 };
 
 #endif