[vlc-devel] commit: Connect the buttons to the actions. (Jean-Baptiste Kempf )
git version control
git at videolan.org
Mon Mar 31 07:22:16 CEST 2008
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun Mar 30 22:09:12 2008 -0700| [2257a1a255effdc64412d2246f5e7804fc909ffe]
Connect the buttons to the actions.
Renamings.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2257a1a255effdc64412d2246f5e7804fc909ffe
---
modules/gui/qt4/components/extended_panels.cpp | 33 +++++++++++++++++------
modules/gui/qt4/components/extended_panels.hpp | 1 +
2 files changed, 25 insertions(+), 9 deletions(-)
diff --git a/modules/gui/qt4/components/extended_panels.cpp b/modules/gui/qt4/components/extended_panels.cpp
index 5c64e91..a6ab55c 100755
--- a/modules/gui/qt4/components/extended_panels.cpp
+++ b/modules/gui/qt4/components/extended_panels.cpp
@@ -1165,32 +1165,34 @@ SyncControls::SyncControls( intf_thread_t *_p_intf, QWidget *_parent ) :
QWidget( _parent ) , p_intf( _p_intf )
{
QGroupBox *AVBox, *subsBox;
- QToolButton *moinsAV, *plusAV;
+ QToolButton *moinsAV, *plusAV;
QToolButton *moinssubs, *plussubs;
QToolButton *moinssubSpeed, *plussubSpeed;
+ QToolButton *updateButton;
- QVBoxLayout *vboxLayout = new QVBoxLayout( this );
+ QGridLayout *mainLayout = new QGridLayout( this );
+ /* AV sync */
AVBox = new QGroupBox( qtr( "Audio/Video" ) );
- QGridLayout *gridLayout = new QGridLayout( AVBox );
+ QGridLayout *AVLayout = new QGridLayout( AVBox );
moinsAV = new QToolButton;
moinsAV->setToolButtonStyle( Qt::ToolButtonTextOnly );
moinsAV->setAutoRaise( true );
moinsAV->setText( "-" );
- gridLayout->addWidget( moinsAV, 1, 0, 1, 1 );
+ AVLayout->addWidget( moinsAV, 1, 0, 1, 1 );
plusAV = new QToolButton;
plusAV->setToolButtonStyle( Qt::ToolButtonTextOnly );
plusAV->setAutoRaise( true );
plusAV->setText( "+" );
- gridLayout->addWidget( plusAV, 1, 2, 1, 1 );
+ AVLayout->addWidget( plusAV, 1, 2, 1, 1 );
QLabel *AVLabel = new QLabel;
AVLabel->setText( qtr( "Advance of audio over video" ) );
- gridLayout->addWidget( AVLabel, 0, 0, 1, 3 );
+ AVLayout->addWidget( AVLabel, 0, 0, 1, 3 );
AVSpin = new QDoubleSpinBox;
AVSpin->setAlignment( Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter );
@@ -1201,10 +1203,11 @@ SyncControls::SyncControls( intf_thread_t *_p_intf, QWidget *_parent ) :
AVSpin->setToolTip( qtr( "A positive value means that\n"
"the audio is ahead of the video" ) );
AVSpin->setSuffix( "s" );
- gridLayout->addWidget( AVSpin, 1, 1, 1, 1 );
- vboxLayout->addWidget( AVBox );
+ AVLayout->addWidget( AVSpin, 1, 1, 1, 1 );
+ mainLayout->addWidget( AVBox, 1, 0, 1, 5 );
+ /* Subs */
subsBox = new QGroupBox( qtr( "Subtitles/Video" ) );
QGridLayout *subsLayout = new QGridLayout( subsBox );
@@ -1260,15 +1263,19 @@ SyncControls::SyncControls( intf_thread_t *_p_intf, QWidget *_parent ) :
subSpeedSpin->setSingleStep( 0.2 );
subsLayout->addWidget( subSpeedSpin, 3, 1, 1, 1 );
- vboxLayout->addWidget( subsBox );
+ mainLayout->addWidget( subsBox, 2, 0, 1, 5 );
/* Various Connects */
CONNECT( moinsAV, clicked(), AVSpin, stepDown () );
CONNECT( plusAV, clicked(), AVSpin, stepUp () );
CONNECT( moinssubs, clicked(), subsSpin, stepDown () );
CONNECT( plussubs, clicked(), subsSpin, stepUp () );
+ CONNECT( moinssubSpeed, clicked(), subSpeedSpin, stepDown () );
+ CONNECT( plussubSpeed, clicked(), subSpeedSpin, stepUp () );
CONNECT( AVSpin, valueChanged ( double ), this, advanceAudio( double ) ) ;
CONNECT( subsSpin, valueChanged ( double ), this, advanceSubs( double ) ) ;
+ CONNECT( subSpeedSpin, alueChanged ( double ),
+ this, adjustSubsSpeed( double ) );
/* Set it */
update();
@@ -1309,6 +1316,14 @@ void SyncControls::advanceSubs( double f_advance )
}
}
+void SyncControls::adjustSubsSpeed( double f_fps )
+{
+ if( THEMIM->getInput() )
+ {
+ var_SetFloat( THEMIM->getInput(), "sub-fps", f_fps );
+ }
+}
+
/**********************************************************************
* Video filters / Adjust
**********************************************************************/
diff --git a/modules/gui/qt4/components/extended_panels.hpp b/modules/gui/qt4/components/extended_panels.hpp
index 4d19770..60a2fd4 100644
--- a/modules/gui/qt4/components/extended_panels.hpp
+++ b/modules/gui/qt4/components/extended_panels.hpp
@@ -166,6 +166,7 @@ public slots:
private slots:
void advanceAudio( double );
void advanceSubs( double );
+ void adjustSubsSpeed( double );
};
#endif
More information about the vlc-devel
mailing list