walletconfiginput::walletconfiginput( QWidget * parent, std::function< void( const QString&,const QString&,const QString& ) > p, std::function< void() > q ) : QDialog( parent ),m_ui( new Ui::walletconfiginput ),m_add( std::move( p ) ),m_cancel( std::move( q ) ) { m_ui->setupUi( this ) ; this->setFixedSize( this->size() ) ; if( parent ){ this->setFont( parent->font() ) ; } m_ui->lineEditVolumeID->setEnabled( true ) ; m_ui->lineEditKey->setEchoMode( QLineEdit::Password ) ; m_ui->lineEditRepeatKey->setEchoMode( QLineEdit::Password ) ; connect( m_ui->pushButtonAdd,SIGNAL( clicked() ),this,SLOT( pbAdd() ) ) ; connect( m_ui->pushButtonCancel,SIGNAL( clicked() ),this,SLOT( slotCancel() ) ) ; connect( m_ui->pushButtonImageFile,SIGNAL( clicked() ),this,SLOT( pbImageFilePath() ) ) ; connect( m_ui->pushButtonVolume,SIGNAL( clicked() ),this,SLOT( pbVolumePath() ) ) ; m_ui->pushButtonImageFile->setIcon( QIcon( ":/file.png" ) ) ; m_ui->pushButtonVolume->setIcon( QIcon( ":/partition.png" ) ) ; this->installEventFilter( this ) ; this->show() ; }
luksaddkey::luksaddkey( QWidget * parent ) : QDialog( parent ) { m_ui = new Ui::luksaddkey() ; m_ui->setupUi( this ) ; m_isWindowClosable = true ; m_ui->textEditPathToVolume->setText( QString() ) ; m_ui->textEditExistingPassphrase->setEchoMode( QLineEdit::Password ) ; m_ui->textEditPassphraseToAdd->setEchoMode( QLineEdit::Password ) ; this->setFixedSize( this->size() ) ; this->setFont( parent->font() ) ; connect( m_ui->pushButtonOpenFile,SIGNAL( clicked() ),this,SLOT( pbOpenFile() ) ) ; connect( m_ui->pushButtonOpenExistingKeyFile,SIGNAL( clicked() ),this,SLOT( pbOpenExisitingKeyFile() ) ) ; connect( m_ui->pushButtonOpenNewKeyFile,SIGNAL( clicked() ),this,SLOT( pbOpenNewKeyFile() ) ) ; connect( m_ui->pushButtonOpenPartition,SIGNAL( clicked() ),this,SLOT( pbOpenPartition( void ) ) ) ; connect( m_ui->pushButtonAdd,SIGNAL( clicked() ),this,SLOT( pbAdd() ) ) ; connect( m_ui->pushButtonCancel,SIGNAL( clicked() ),this,SLOT( pbCancel() ) ) ; if( m_ui->cbNewKey->currentIndex() == 0 && m_keystrength.canCheckQuality() ){ connect( m_ui->textEditPassphraseToAdd,SIGNAL( textChanged( QString ) ),this,SLOT( keyChanged_0( QString ) ) ) ; }else{ connect( m_ui->textEditPassphraseToAdd,SIGNAL( textChanged( QString ) ),this,SLOT( keyChanged_1( QString ) ) ) ; } connect( m_ui->cbExistingKey,SIGNAL( activated( int ) ),this,SLOT( cbExistingKey( int ) ) ) ; connect( m_ui->cbNewKey,SIGNAL( activated( int ) ),this,SLOT( cbNewKey( int ) ) ) ; m_ui->lineEditReEnterPassphrase->setEchoMode( QLineEdit::Password ) ; m_ui->pushButtonOpenExistingKeyFile->setEnabled( false ) ; m_ui->pushButtonOpenNewKeyFile->setEnabled( false ) ; m_ui->pushButtonOpenPartition->setIcon( QIcon( ":/partition.png" ) ) ; m_ui->pushButtonOpenFile->setIcon( QIcon( ":/file.png" ) ) ; this->cbExistingKey( 0 ) ; this->cbNewKey( 0 ) ; this->installEventFilter( this ) ; }
luksaddkey::luksaddkey( QWidget * parent ) : QDialog( parent ) { m_ui = new Ui::luksaddkey() ; m_ui->setupUi( this ) ; m_isWindowClosable = true ; m_ui->textEditPathToVolume->setText( QString( "" ) ) ; m_ui->textEditExistingPassphrase->setEchoMode( QLineEdit::Password ) ; m_ui->textEditPassphraseToAdd->setEchoMode( QLineEdit::Password ) ; this->setFixedSize( this->size() ) ; this->setFont( parent->font() ) ; connect( m_ui->pushButtonOpenFile,SIGNAL( clicked() ),this,SLOT( pbOpenFile() ) ) ; connect( m_ui->pushButtonOpenExistingKeyFile,SIGNAL( clicked() ),this,SLOT( pbOpenExisitingKeyFile() ) ) ; connect( m_ui->pushButtonOpenNewKeyFile,SIGNAL( clicked() ),this,SLOT( pbOpenNewKeyFile() ) ) ; connect( m_ui->pushButtonOpenPartition,SIGNAL( clicked() ),this,SLOT( pbOpenPartition( void ) ) ) ; connect( m_ui->pushButtonAdd,SIGNAL( clicked() ),this,SLOT( pbAdd() ) ) ; connect( m_ui->pushButtonCancel,SIGNAL( clicked() ),this,SLOT( pbCancel() ) ) ; connect( m_ui->radioButtonNewPassphrase,SIGNAL( toggled( bool ) ),this,SLOT( rbNewPassphrase() ) ) ; connect( m_ui->radioButtonNewPassphraseFromFile,SIGNAL( toggled( bool ) ),this,SLOT( rbNewPassphraseFromFile() ) ) ; connect( m_ui->radioButtonPassphraseinVolume,SIGNAL( toggled( bool ) ),this,SLOT( rbExistingPassphrase() ) ) ; connect( m_ui->radioButtonPassphraseInVolumeFromFile,SIGNAL( toggled( bool ) ),this,SLOT( rbExistingPassphraseFromFile() ) ) ; connect( m_ui->textEditPassphraseToAdd,SIGNAL( textChanged( QString ) ),this,SLOT( keyChanged( QString ) ) ) ; m_ui->lineEditReEnterPassphrase->setEchoMode( QLineEdit::Password ) ; m_ui->radioButtonNewPassphrase->setChecked( true ) ; m_ui->radioButtonPassphraseinVolume->setChecked( true ) ; m_ui->pushButtonOpenExistingKeyFile->setEnabled( false ) ; m_ui->pushButtonOpenNewKeyFile->setEnabled( false ) ; m_ui->pushButtonOpenPartition->setIcon( QIcon( QString( ":/partition.png" ) ) ) ; m_ui->pushButtonOpenFile->setIcon( QIcon( QString( ":/file.png" ) ) ) ; m_keystrength = new keystrength() ; this->installEventFilter( this ) ; }
walletconfig::walletconfig( QWidget * parent ) : QDialog( parent ),m_ui( new Ui::walletconfig ) { m_ui->setupUi( this ) ; this->setFixedSize( this->size() ) ; this->setFont( parent->font() ) ; m_ui->tableWidget->setColumnWidth( 0,386 ) ; m_ui->tableWidget->setColumnWidth( 1,237 ) ; m_ui->tableWidget->hideColumn( 2 ) ; connect( m_ui->pbAdd,SIGNAL( clicked() ),this,SLOT( pbAdd() ) ) ; connect( m_ui->pbClose,SIGNAL( clicked() ),this,SLOT( pbClose() ) ) ; connect( m_ui->pbDelete,SIGNAL( clicked() ),this,SLOT( pbDelete() ) ) ; 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->installEventFilter( this ) ; }