Commit 896ea8a4 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Layout rework and update button.

parent 2257a1a2
...@@ -1182,17 +1182,17 @@ SyncControls::SyncControls( intf_thread_t *_p_intf, QWidget *_parent ) : ...@@ -1182,17 +1182,17 @@ SyncControls::SyncControls( intf_thread_t *_p_intf, QWidget *_parent ) :
moinsAV->setToolButtonStyle( Qt::ToolButtonTextOnly ); moinsAV->setToolButtonStyle( Qt::ToolButtonTextOnly );
moinsAV->setAutoRaise( true ); moinsAV->setAutoRaise( true );
moinsAV->setText( "-" ); moinsAV->setText( "-" );
AVLayout->addWidget( moinsAV, 1, 0, 1, 1 ); AVLayout->addWidget( moinsAV, 0, 1, 1, 1 );
plusAV = new QToolButton; plusAV = new QToolButton;
plusAV->setToolButtonStyle( Qt::ToolButtonTextOnly ); plusAV->setToolButtonStyle( Qt::ToolButtonTextOnly );
plusAV->setAutoRaise( true ); plusAV->setAutoRaise( true );
plusAV->setText( "+" ); plusAV->setText( "+" );
AVLayout->addWidget( plusAV, 1, 2, 1, 1 ); AVLayout->addWidget( plusAV, 0, 3, 1, 1 );
QLabel *AVLabel = new QLabel; QLabel *AVLabel = new QLabel;
AVLabel->setText( qtr( "Advance of audio over video" ) ); AVLabel->setText( qtr( "Advance of audio over video:" ) );
AVLayout->addWidget( AVLabel, 0, 0, 1, 3 ); AVLayout->addWidget( AVLabel, 0, 0, 1, 1 );
AVSpin = new QDoubleSpinBox; AVSpin = new QDoubleSpinBox;
AVSpin->setAlignment( Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter ); AVSpin->setAlignment( Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter );
...@@ -1203,7 +1203,7 @@ SyncControls::SyncControls( intf_thread_t *_p_intf, QWidget *_parent ) : ...@@ -1203,7 +1203,7 @@ SyncControls::SyncControls( intf_thread_t *_p_intf, QWidget *_parent ) :
AVSpin->setToolTip( qtr( "A positive value means that\n" AVSpin->setToolTip( qtr( "A positive value means that\n"
"the audio is ahead of the video" ) ); "the audio is ahead of the video" ) );
AVSpin->setSuffix( "s" ); AVSpin->setSuffix( "s" );
AVLayout->addWidget( AVSpin, 1, 1, 1, 1 ); AVLayout->addWidget( AVSpin, 0, 2, 1, 1 );
mainLayout->addWidget( AVBox, 1, 0, 1, 5 ); mainLayout->addWidget( AVBox, 1, 0, 1, 5 );
...@@ -1215,17 +1215,17 @@ SyncControls::SyncControls( intf_thread_t *_p_intf, QWidget *_parent ) : ...@@ -1215,17 +1215,17 @@ SyncControls::SyncControls( intf_thread_t *_p_intf, QWidget *_parent ) :
moinssubs->setToolButtonStyle( Qt::ToolButtonTextOnly ); moinssubs->setToolButtonStyle( Qt::ToolButtonTextOnly );
moinssubs->setAutoRaise( true ); moinssubs->setAutoRaise( true );
moinssubs->setText( "-" ); moinssubs->setText( "-" );
subsLayout->addWidget( moinssubs, 1, 0, 1, 1 ); subsLayout->addWidget( moinssubs, 0, 1, 1, 1 );
plussubs = new QToolButton; plussubs = new QToolButton;
plussubs->setToolButtonStyle( Qt::ToolButtonTextOnly ); plussubs->setToolButtonStyle( Qt::ToolButtonTextOnly );
plussubs->setAutoRaise( true ); plussubs->setAutoRaise( true );
plussubs->setText( "+" ); plussubs->setText( "+" );
subsLayout->addWidget( plussubs, 1, 2, 1, 1 ); subsLayout->addWidget( plussubs, 0, 3, 1, 1 );
QLabel *subsLabel = new QLabel; QLabel *subsLabel = new QLabel;
subsLabel->setText( qtr( "Advance of subtitles over video" ) ); subsLabel->setText( qtr( "Advance of subtitles over video:" ) );
subsLayout->addWidget( subsLabel, 0, 0, 1, 3 ); subsLayout->addWidget( subsLabel, 0, 0, 1, 1 );
subsSpin = new QDoubleSpinBox; subsSpin = new QDoubleSpinBox;
subsSpin->setAlignment( Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter ); subsSpin->setAlignment( Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter );
...@@ -1236,24 +1236,24 @@ SyncControls::SyncControls( intf_thread_t *_p_intf, QWidget *_parent ) : ...@@ -1236,24 +1236,24 @@ SyncControls::SyncControls( intf_thread_t *_p_intf, QWidget *_parent ) :
subsSpin->setToolTip( qtr( "A positive value means that\n" subsSpin->setToolTip( qtr( "A positive value means that\n"
"the subtitles are ahead of the video" ) ); "the subtitles are ahead of the video" ) );
subsSpin->setSuffix( "s" ); subsSpin->setSuffix( "s" );
subsLayout->addWidget( subsSpin, 1, 1, 1, 1 ); subsLayout->addWidget( subsSpin, 0, 2, 1, 1 );
moinssubSpeed = new QToolButton; moinssubSpeed = new QToolButton;
moinssubSpeed->setToolButtonStyle( Qt::ToolButtonTextOnly ); moinssubSpeed->setToolButtonStyle( Qt::ToolButtonTextOnly );
moinssubSpeed->setAutoRaise( true ); moinssubSpeed->setAutoRaise( true );
moinssubSpeed->setText( "-" ); moinssubSpeed->setText( "-" );
subsLayout->addWidget( moinssubSpeed, 3, 0, 1, 1 ); subsLayout->addWidget( moinssubSpeed, 1, 1, 1, 1 );
plussubSpeed = new QToolButton; plussubSpeed = new QToolButton;
plussubSpeed->setToolButtonStyle( Qt::ToolButtonTextOnly ); plussubSpeed->setToolButtonStyle( Qt::ToolButtonTextOnly );
plussubSpeed->setAutoRaise( true ); plussubSpeed->setAutoRaise( true );
plussubSpeed->setText( "+" ); plussubSpeed->setText( "+" );
subsLayout->addWidget( plussubSpeed, 3, 2, 1, 1 ); subsLayout->addWidget( plussubSpeed, 1, 3, 1, 1 );
QLabel *subSpeedLabel = new QLabel; QLabel *subSpeedLabel = new QLabel;
subSpeedLabel->setText( qtr( "Speed of the subtitles" ) ); subSpeedLabel->setText( qtr( "Speed of the subtitles:" ) );
subsLayout->addWidget( subSpeedLabel, 2, 0, 1, 3 ); subsLayout->addWidget( subSpeedLabel, 1, 0, 1, 3 );
subSpeedSpin = new QDoubleSpinBox; subSpeedSpin = new QDoubleSpinBox;
subSpeedSpin->setAlignment( Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter ); subSpeedSpin->setAlignment( Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter );
...@@ -1261,9 +1261,16 @@ SyncControls::SyncControls( intf_thread_t *_p_intf, QWidget *_parent ) : ...@@ -1261,9 +1261,16 @@ SyncControls::SyncControls( intf_thread_t *_p_intf, QWidget *_parent ) :
subSpeedSpin->setMinimum( 1 ); subSpeedSpin->setMinimum( 1 );
subSpeedSpin->setMaximum( 100 ); subSpeedSpin->setMaximum( 100 );
subSpeedSpin->setSingleStep( 0.2 ); subSpeedSpin->setSingleStep( 0.2 );
subsLayout->addWidget( subSpeedSpin, 3, 1, 1, 1 ); subsLayout->addWidget( subSpeedSpin, 1, 2, 1, 1 );
mainLayout->addWidget( subsBox, 2, 0, 2, 5 );
updateButton = new QToolButton;
updateButton->setAutoRaise( true );
updateButton->setText( "u" );
updateButton->setToolTip( qtr( "Force update of the values in this dialog" ) );
mainLayout->addWidget( updateButton, 0, 4, 1, 1 );
mainLayout->addWidget( subsBox, 2, 0, 1, 5 );
/* Various Connects */ /* Various Connects */
CONNECT( moinsAV, clicked(), AVSpin, stepDown () ); CONNECT( moinsAV, clicked(), AVSpin, stepDown () );
...@@ -1274,8 +1281,9 @@ SyncControls::SyncControls( intf_thread_t *_p_intf, QWidget *_parent ) : ...@@ -1274,8 +1281,9 @@ SyncControls::SyncControls( intf_thread_t *_p_intf, QWidget *_parent ) :
CONNECT( plussubSpeed, clicked(), subSpeedSpin, stepUp () ); CONNECT( plussubSpeed, clicked(), subSpeedSpin, stepUp () );
CONNECT( AVSpin, valueChanged ( double ), this, advanceAudio( double ) ) ; CONNECT( AVSpin, valueChanged ( double ), this, advanceAudio( double ) ) ;
CONNECT( subsSpin, valueChanged ( double ), this, advanceSubs( double ) ) ; CONNECT( subsSpin, valueChanged ( double ), this, advanceSubs( double ) ) ;
CONNECT( subSpeedSpin, alueChanged ( double ), CONNECT( subSpeedSpin, valueChanged ( double ),
this, adjustSubsSpeed( double ) ); this, adjustSubsSpeed( double ) );
BUTTONACT( updateButton, update() );
/* Set it */ /* Set it */
update(); update();
......
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