Example #1
0
DialogMsg::DialogMsg( QWidget * parent ) :
	QDialog( parent ),
	m_ui( new Ui::DialogMsg )
{
	m_ui->setupUi( this ) ;
	if( parent  ){
		this->setFont( parent->font() ) ;
	}
	connect( m_ui->pbNo,SIGNAL( clicked() ),this,SLOT( pbNo() ) ) ;
	connect( m_ui->pbYes,SIGNAL( clicked() ),this,SLOT( pbYes() ) ) ;
	connect( m_ui->pbOk,SIGNAL( clicked() ),this,SLOT( pbOK() ) ) ;

	this->installEventFilter( this ) ;
}
Example #2
0
createVolumeDialog::createVolumeDialog( const QString& path,QWidget * parent,std::function< void( int ) > f ) :
    QDialog( parent ),m_ui( new Ui::createVolumeDialog ),m_path( path ),m_function( std::move( f ) )
{
    m_ui->setupUi( this ) ;

    this->setFixedSize( this->size() ) ;
    this->setFont( parent->font() ) ;

    m_opt_count = 0 ;

    m_ui->pbNo->setFocus() ;

    connect( m_ui->pbYes,SIGNAL( clicked() ),this,SLOT( pbYes() ) ) ;
    connect( m_ui->pbNo,SIGNAL( clicked() ),this,SLOT( pbNo() ) ) ;

    this->ShowUI() ;
}