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 ) ; }