Commit 1cb34c79 authored by Ludovic Fauvet's avatar Ludovic Fauvet

Qt: make the resume panel timer cancellable

parent c7acc872
......@@ -385,6 +385,12 @@ void MainInterface::createContinueDialog( QWidget *w )
continueDialogLayout->addWidget( ok );
continueDialogLayout->addWidget( cancel );
continueTimer = new QTimer( continueDialog );
continueTimer->setSingleShot( true );
continueTimer->setInterval( 6000 );
CONNECT( continueTimer, timeout(), this, hideContinueDialog() );
CONNECT( cancel, clicked(), this, hideContinueDialog() );
BUTTONACT(ok, continuePlayback() );
......@@ -406,7 +412,7 @@ void MainInterface::showContinueDialog( int64_t _time ) {
else
{
continueDialog->setVisible(true);
QTimer::singleShot(6000, this, SLOT(hideContinueDialog()));
continueTimer->start();
}
}
......@@ -417,6 +423,7 @@ void MainInterface::hideContinueDialog()
if( !isFullScreen() && !isMaximized() )
resize( width(), height() - continueDialog->height() );
continueDialog->hide();
continueTimer->stop();
}
}
......
......@@ -54,6 +54,7 @@ class SpeedControlWidget;
class QVBoxLayout;
class QMenu;
class QSize;
class QTimer;
class StandardPLPanel;
struct vout_window_t;
......@@ -150,6 +151,7 @@ private:
/* continue */
QWidget *continueDialog;
QTimer *continueTimer;
int64_t i_continueTime;
/* Status Bar */
......
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