Commit eb4d5bcf authored by Francois Cartegnie's avatar Francois Cartegnie

Qt: make extended dialog use standard buttons

parent e7e4692f
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include <QTabWidget> #include <QTabWidget>
#include <QGridLayout> #include <QGridLayout>
#include <QDialogButtonBox>
#include <vlc_modules.h> #include <vlc_modules.h>
ExtendedDialog::ExtendedDialog( intf_thread_t *_p_intf ): QVLCFrame( _p_intf ) ExtendedDialog::ExtendedDialog( intf_thread_t *_p_intf ): QVLCFrame( _p_intf )
...@@ -41,7 +42,7 @@ ExtendedDialog::ExtendedDialog( intf_thread_t *_p_intf ): QVLCFrame( _p_intf ) ...@@ -41,7 +42,7 @@ ExtendedDialog::ExtendedDialog( intf_thread_t *_p_intf ): QVLCFrame( _p_intf )
setWindowTitle( qtr( "Adjustments and Effects" ) ); setWindowTitle( qtr( "Adjustments and Effects" ) );
setWindowRole( "vlc-extended" ); setWindowRole( "vlc-extended" );
QGridLayout *layout = new QGridLayout( this ); QVBoxLayout *layout = new QVBoxLayout( this );
layout->setContentsMargins( 0, 2, 0, 1 ); layout->setContentsMargins( 0, 2, 0, 1 );
layout->setSpacing( 3 ); layout->setSpacing( 3 );
...@@ -84,11 +85,12 @@ ExtendedDialog::ExtendedDialog( intf_thread_t *_p_intf ): QVLCFrame( _p_intf ) ...@@ -84,11 +85,12 @@ ExtendedDialog::ExtendedDialog( intf_thread_t *_p_intf ): QVLCFrame( _p_intf )
mainTabW->addTab( v4l2, qtr( "v4l2 controls" ) ); mainTabW->addTab( v4l2, qtr( "v4l2 controls" ) );
} }
layout->addWidget( mainTabW, 0, 0, 1, 5 ); layout->addWidget( mainTabW );
QPushButton *closeButton = new QPushButton( qtr( "&Close" ) ); QDialogButtonBox *closeButtonBox =
layout->addWidget( closeButton, 1, 4, 1, 1 ); new QDialogButtonBox( QDialogButtonBox::Close, Qt::Horizontal, this );
CONNECT( closeButton, clicked(), this, close() ); layout->addWidget( closeButtonBox );
CONNECT( closeButtonBox, rejected(), this, close() );
/* Restore geometry or move this dialog on the left pane of the MI */ /* Restore geometry or move this dialog on the left pane of the MI */
if( !restoreGeometry( getSettings()->value("EPanel/geometry").toByteArray() ) ) if( !restoreGeometry( getSettings()->value("EPanel/geometry").toByteArray() ) )
......
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