Commit 9cac200d authored by Francois Cartegnie's avatar Francois Cartegnie

Qt: EPG Dialog: use DialogButtonBox

parent d854ccd9
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include <QGroupBox> #include <QGroupBox>
#include <QPushButton> #include <QPushButton>
#include <QTextEdit> #include <QTextEdit>
#include <QDialogButtonBox>
#include "qt4.hpp" #include "qt4.hpp"
#include "input_manager.hpp" #include "input_manager.hpp"
...@@ -73,15 +74,18 @@ EpgDialog::EpgDialog( intf_thread_t *_p_intf ): QVLCFrame( _p_intf ) ...@@ -73,15 +74,18 @@ EpgDialog::EpgDialog( intf_thread_t *_p_intf ): QVLCFrame( _p_intf )
CONNECT( epg, itemSelectionChanged( EPGEvent *), this, showEvent( EPGEvent *) ); CONNECT( epg, itemSelectionChanged( EPGEvent *), this, showEvent( EPGEvent *) );
CONNECT( THEMIM->getIM(), epgChanged(), this, updateInfos() ); CONNECT( THEMIM->getIM(), epgChanged(), this, updateInfos() );
QDialogButtonBox *buttonsBox = new QDialogButtonBox( this );
#if 0 #if 0
QPushButton *update = new QPushButton( qtr( "Update" ) ); // Temporary to test QPushButton *update = new QPushButton( qtr( "Update" ) ); // Temporary to test
boxLayout->addWidget( update, 0, Qt::AlignRight ); buttonsBox->addButton( update, QDialogButtonBox::ActionRole );
BUTTONACT( update, updateInfos() ); BUTTONACT( update, updateInfos() );
#endif #endif
QPushButton *close = new QPushButton( qtr( "&Close" ) ); buttonsBox->addButton( new QPushButton( qtr( "&Close" ) ),
boxLayout->addWidget( close, 0, Qt::AlignRight ); QDialogButtonBox::RejectRole );
BUTTONACT( close, close() ); boxLayout->addWidget( buttonsBox );
CONNECT( buttonsBox, rejected(), this, close() );
updateInfos(); updateInfos();
readSettings( "EPGDialog", QSize( 650, 450 ) ); readSettings( "EPGDialog", QSize( 650, 450 ) );
......
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