ErrorsDialog::ErrorsDialog( intf_thread_t *_p_intf ) : QVLCDialog( (QWidget*)_p_intf->p_sys->p_mi, _p_intf ) { setWindowTitle( qtr( "Errors" ) ); setWindowRole( "vlc-errors" ); resize( 500 , 300 ); QGridLayout *layout = new QGridLayout( this ); QDialogButtonBox *buttonBox = new QDialogButtonBox( Qt::Horizontal, this ); QPushButton *clearButton = new QPushButton( qtr( "Cl&ear" ), this ); buttonBox->addButton( clearButton, QDialogButtonBox::ActionRole ); buttonBox->addButton( new QPushButton( qtr("&Close"), this ), QDialogButtonBox::RejectRole ); messages = new QTextEdit(); messages->setReadOnly( true ); messages->setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff ); stopShowing = new QCheckBox( qtr( "Hide future errors" ) ); layout->addWidget( messages, 0, 0, 1, 3 ); layout->addWidget( stopShowing, 1, 0 ); layout->addWidget( buttonBox, 1, 2 ); CONNECT( buttonBox, rejected(), this, close() ); BUTTONACT( clearButton, clear() ); BUTTONACT( stopShowing, dontShow() ); }
int ErrorsDialog::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QVLCDialog::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: close(); break; case 1: clear(); break; case 2: dontShow(); break; default: ; } _id -= 3; } return _id; }