createfile::createfile( QWidget * parent,std::function< void( const QString& ) > f ) : QDialog( parent ),m_ui( new Ui::createfile ),m_function( std::move( f ) ) { m_ui->setupUi( this ) ; this->setFixedSize( this->size() ) ; this->setFont( parent->font() ) ; m_ui->progressBar->setMinimum( 0 ) ; m_ui->progressBar->setMaximum( 100 ) ; m_ui->progressBar->setValue( 0 ) ; m_ui->pbOpenFolder->setIcon( QIcon( ":/folder.png" ) ) ; connect( m_ui->checkBoxNoRandomData,SIGNAL( stateChanged( int ) ),this,SLOT( warnAboutRandomData( int ) ) ) ; connect( m_ui->pbCancel,SIGNAL( clicked() ),this,SLOT( pbCancel() ) ) ; connect( m_ui->pbOpenFolder,SIGNAL( clicked() ),this,SLOT(pbOpenFolder() ) ) ; connect( m_ui->pbCreate,SIGNAL( clicked() ),this,SLOT( pbCreate() ) ) ; connect( m_ui->lineEditFileName,SIGNAL( textChanged( QString ) ),this,SLOT(fileTextChange( QString ) ) ) ; connect( this,SIGNAL( sendProgress( int ) ),this,SLOT( setProgress( int ) ) ) ; this->installEventFilter( this ) ; this->setWindowTitle( tr( "Create A Container File" ) ) ; m_running = false ; this->showUI() ; }
createkeyfile::createkeyfile( QWidget * parent ) : QDialog( parent ), m_ui( new Ui::createkeyfile ) { m_ui->setupUi( this ) ; this->setFont( parent->font() ) ; m_task = NULL ; m_ui->pbOpenFolder->setIcon( QIcon( QString( ":/folder.png" ) ) ) ; connect( m_ui->pbCreate,SIGNAL( clicked() ),this,SLOT( pbCreate() ) ) ; connect( m_ui->pbOpenFolder,SIGNAL( clicked() ),this,SLOT( pbOpenFolder() ) ) ; connect( m_ui->pbCancel,SIGNAL( clicked() ),this,SLOT( pbCancel() ) ) ; connect( m_ui->lineEditFileName,SIGNAL( textChanged( QString ) ),this,SLOT( keyTextChange( QString ) ) ) ; this->installEventFilter( this ) ; }
cryptfiles::cryptfiles( QWidget * parent ) :QDialog( parent ),m_ui( new Ui::cryptfiles ) { m_ui->setupUi( this ) ; this->setFont( parent->font() ) ; this->setFixedSize( this->size() ) ; m_ui->progressBar->setMinimum( 0 ) ; m_ui->progressBar->setMaximum( 100 ) ; m_ui->progressBar->setValue( 0 ) ; m_ui->pbOpenFolder->setIcon( QIcon( ":/folder.png" ) ) ; m_ui->pushButtonFile->setIcon( QIcon( ":/file.png" ) ) ; connect( m_ui->pbCreate,SIGNAL( clicked() ),this,SLOT( pbCreate() ) ) ; connect( m_ui->pushButtonFile,SIGNAL( clicked() ),this,SLOT( pbOpenFile() ) ) ; connect( m_ui->pbOpenFolder,SIGNAL( clicked() ),this,SLOT( pbOpenFolder() ) ) ; connect( m_ui->comboBox,SIGNAL( activated( int ) ),this,SLOT( cbChanged( int ) ) ) ; connect( m_ui->lineEditSourcePath,SIGNAL( textChanged( QString ) ),this,SLOT( sourceTextChanged( QString ) ) ) ; connect( m_ui->pushButtonKeyFile,SIGNAL( clicked() ),this,SLOT( pbKeyFile() ) ) ; connect( m_ui->pushButtonCancel,SIGNAL( clicked() ),this,SLOT( pbCancel() ) ) ; connect( this,SIGNAL( progressUpdate( int ) ),this,SLOT( progressBarUpdate( int ) ) ) ; this->cbChanged( 0 ) ; m_OperationInProgress = false ; m_ui->lineEditPass_2->setEchoMode( QLineEdit::Password ) ; m_ui->lineEditSourcePath->setFocus() ; m_ui->lineEditDestinationPath->setText( QString() ) ; m_ui->lineEditDestinationPath->setEnabled( false ) ; m_ui->lineEditSourcePath->setEnabled( false ) ; this->installEventFilter( this ) ; }