erasedevice::erasedevice( QWidget * parent ) : QDialog( parent ),m_ui( new Ui::erasedevice ) { m_ui->setupUi( this ) ; this->setFixedSize( this->size() ) ; this->setFont( parent->font() ) ; m_ui->progressBar->setValue( 0 ) ; m_ui->progressBar->setMaximum( 100 ) ; m_ui->progressBar->setMinimum( 0 ) ; this->setWindowTitle( tr( "Write Random Data Over Existing Data" ) ) ; connect( m_ui->pushButtonFile,SIGNAL( clicked() ),this,SLOT( pbFile() ) ) ; connect( m_ui->pushButtonPartition,SIGNAL( clicked() ),this,SLOT( pbPartition() ) ) ; connect( m_ui->pushButtonStart,SIGNAL( clicked() ),this,SLOT( pbStart() ) ) ; connect( m_ui->pushButtonCancel,SIGNAL( clicked() ),this,SLOT( pbCancel() ) ) ; connect( this,SIGNAL( sendProgress( int ) ),this,SLOT( setProgress( int ) ) ) ; m_ui->pushButtonFile->setIcon( QIcon( ":/file.png" ) ) ; m_ui->pushButtonPartition->setIcon( QIcon( ":/partition.png" ) ) ; m_ui->lineEdit->setFocus() ; this->installEventFilter( this ) ; }
manageSystemVolumes::manageSystemVolumes( QWidget * parent ) : QDialog( parent ),m_ui( new Ui::manageSystemVolumes ) { m_ui->setupUi( this ) ; this->setFont( parent->font() ) ; this->setFixedSize( this->size() ) ; connect( m_ui->pbDone,SIGNAL( clicked() ),this,SLOT( pbDone() ) ) ; connect( m_ui->pbFile,SIGNAL( clicked() ),this,SLOT( pbFile() ) ) ; connect( m_ui->pbPartition,SIGNAL( clicked() ),this,SLOT( pbPartition() ) ) ; connect( m_ui->tableWidget,SIGNAL( currentItemChanged( QTableWidgetItem *,QTableWidgetItem * ) ),this, SLOT( currentItemChanged( QTableWidgetItem *,QTableWidgetItem * ) ) ) ; connect( m_ui->tableWidget,SIGNAL( itemClicked( QTableWidgetItem * ) ),this, SLOT( itemClicked( QTableWidgetItem * ) ) ) ; this->addAction( [ this ](){ auto ac = new QAction( this ) ; QList<QKeySequence> keys ; keys.append( Qt::Key_Enter ) ; keys.append( Qt::Key_Return ) ; keys.append( Qt::Key_Menu ) ; ac->setShortcuts( keys ) ; connect( ac,SIGNAL( triggered() ),this,SLOT( defaultButton() ) ) ; return ac ; }() ) ; this->installEventFilter( this ) ; }