Commit bb2e79b2 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4 - time left implementation. Do it better, faster, with also a middle...

Qt4 - time left implementation. Do it better, faster, with also a middle click, and fix the double click toggling time left bug.

parent 4eb0c737
...@@ -212,7 +212,7 @@ class TimeLabel : public QLabel ...@@ -212,7 +212,7 @@ class TimeLabel : public QLabel
Q_OBJECT Q_OBJECT
void mousePressEvent( QMouseEvent *event ) void mousePressEvent( QMouseEvent *event )
{ {
if( event->button() == Qt::LeftButton ) emit timeLabelClicked(); emit timeLabelClicked();
} }
void mouseDoubleClickEvent( QMouseEvent *event ) void mouseDoubleClickEvent( QMouseEvent *event )
{ {
......
...@@ -146,7 +146,6 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf ) ...@@ -146,7 +146,6 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
nameLabel = new QLabel; nameLabel = new QLabel;
speedLabel = new QLabel( "1.00x" ); speedLabel = new QLabel( "1.00x" );
speedLabel->setContextMenuPolicy ( Qt::CustomContextMenu ); speedLabel->setContextMenuPolicy ( Qt::CustomContextMenu );
timeLabel->setContextMenuPolicy ( Qt::CustomContextMenu );
/* Styling those labels */ /* Styling those labels */
timeLabel->setFrameStyle( QFrame::Sunken | QFrame::Panel ); timeLabel->setFrameStyle( QFrame::Sunken | QFrame::Panel );
...@@ -163,9 +162,8 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf ) ...@@ -163,9 +162,8 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
- right-clicking and clicking just toggle between remaining and - right-clicking and clicking just toggle between remaining and
elapsed time.*/ elapsed time.*/
CONNECT( timeLabel, timeLabelClicked(), this, toggleTimeDisplay() ); CONNECT( timeLabel, timeLabelClicked(), this, toggleTimeDisplay() );
CONNECT( timeLabel, customContextMenuRequested( QPoint ),
this, toggleTimeDisplay() );
CONNECT( timeLabel, timeLabelDoubleClicked(), THEDP, gotoTimeDialog() ); CONNECT( timeLabel, timeLabelDoubleClicked(), THEDP, gotoTimeDialog() );
CONNECT( timeLabel, timeLabelDoubleClicked(), this, toggleTimeDisplay() );
/* Speed Label behaviour: /* Speed Label behaviour:
- right click gives the vertical speed slider */ - right click gives the vertical speed slider */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment