Qt4 - time left implementation. Do it better, faster, with also a middle click, and...
authorJean-Baptiste Kempf <jb@videolan.org>
Wed, 24 Oct 2007 03:57:57 +0000 (03:57 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Wed, 24 Oct 2007 03:57:57 +0000 (03:57 +0000)
modules/gui/qt4/components/interface_widgets.hpp
modules/gui/qt4/main_interface.cpp

index 61edabb..0605da2 100644 (file)
@@ -212,7 +212,7 @@ class TimeLabel : public QLabel
     Q_OBJECT
     void mousePressEvent( QMouseEvent *event )
     {
-        if( event->button() == Qt::LeftButton ) emit timeLabelClicked();
+        emit timeLabelClicked();
     }
     void mouseDoubleClickEvent( QMouseEvent *event )
     {
index 93e2a98..5cb24e1 100644 (file)
@@ -146,7 +146,6 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
     nameLabel = new QLabel;
     speedLabel = new QLabel( "1.00x" );
     speedLabel->setContextMenuPolicy ( Qt::CustomContextMenu );
-    timeLabel->setContextMenuPolicy ( Qt::CustomContextMenu );
 
     /* Styling those labels */
     timeLabel->setFrameStyle( QFrame::Sunken | QFrame::Panel );
@@ -163,9 +162,8 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
        - right-clicking and clicking just toggle between remaining and
          elapsed time.*/
     CONNECT( timeLabel, timeLabelClicked(), this, toggleTimeDisplay() );
-    CONNECT( timeLabel, customContextMenuRequested( QPoint ),
-             this, toggleTimeDisplay() );
     CONNECT( timeLabel, timeLabelDoubleClicked(), THEDP, gotoTimeDialog() );
+    CONNECT( timeLabel, timeLabelDoubleClicked(), this, toggleTimeDisplay() );
 
     /* Speed Label behaviour:
        - right click gives the vertical speed slider */