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 ) ; }
tcrypt::tcrypt( QWidget * parent,bool e, std::function< void( const QString&,const QStringList& ) > p, std::function< void() > q ) : QDialog( parent ),m_ui( new Ui::tcrypt ),m_success( std::move( p ) ),m_cancelled( std::move( q ) ) { m_ui->setupUi( this ) ; this->setFixedSize( this->size() ) ; connect( m_ui->pbSend,SIGNAL( clicked() ),this,SLOT( pbSend() ) ) ; connect( m_ui->pbCancel,SIGNAL( clicked() ),this,SLOT( pbCancel() ) ) ; connect( m_ui->pbAddKeyFile,SIGNAL( clicked() ),this,SLOT( pbAddKeyFIle() ) ) ; 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 ) ; m_ui->tableWidget->setColumnWidth( 0,426 ) ; if( e ){ m_ui->pbSend->setText( tr( "&Set" ) ) ; } this->show() ; }
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() ; }
MainWindow::MainWindow( QWidget * parent ) : QWidget( parent ),m_ui( new Ui::MainWindow ),m_handle( nullptr ) { m_ui->setupUi( this ) ; this->setFixedSize( this->size() ) ; m_ui->lineEditKey->setEchoMode( QLineEdit::Password ) ; this->setWindowIcon( QIcon( ":/default.png" ) ) ; //m_ui->pbKeyFile->setIcon( QIcon( QString( ":/default.png" ) ) ); connect( m_ui->pbCancel,SIGNAL( clicked() ),this,SLOT( pbCancel() ) ) ; connect( m_ui->pbOpen,SIGNAL( clicked() ),this,SLOT( pbOpen() ) ) ; connect( m_ui->pbKeyFile,SIGNAL( clicked() ),this,SLOT( pbKeyFile() ) ) ; m_ui->lineEditKey->setFocus() ; m_working = false ; m_requireKey = false ; m_requireKeyFile = true ; QAction * ac = new QAction( this ) ; QList<QKeySequence> keys ; keys.append( Qt::Key_Enter ) ; keys.append( Qt::Key_Return ) ; ac->setShortcuts( keys ) ; connect( ac,SIGNAL( triggered() ),this,SLOT( defaultButton() ) ) ; this->addAction( ac ) ; m_findExecutable = []( QVector<QString>& exe ){ if( exe.isEmpty() ){ return QString() ; } QString e ; for( auto& it : exe ){ auto _not_found = [&]( const char * path ){ e = path + it ; bool r = QFile::exists( e ) ; if( r ){ it = e ; } return r == false ; } ; if( _not_found( "/usr/local/bin/" ) ){ if( _not_found( "/usr/bin/" ) ){ if( _not_found( "/usr/sbin/" ) ){ return it ; } } } } return QString() ; } ; }
LXQt::Wallet::password_dialog::password_dialog(QWidget *parent, const QString &walletName, const QString &appName, std::function< void(const QString &) > && p, std::function< void() > && q, std::function< void(bool) > * z) : QDialog(parent), m_ui(new Ui::password_dialog), m_password(std::move(p)), m_cancel(std::move(q)) { m_ui->setupUi(this); this->setFixedSize(this->size()); this->setWindowFlags(this->windowFlags()|Qt::WindowStaysOnTopHint); if (parent) { this->setWindowIcon(parent->windowIcon()); } connect(m_ui->pushButtonSend, SIGNAL(clicked()), this, SLOT(pbSend())); connect(m_ui->pushButtonCancel, SIGNAL(clicked()), this, SLOT(pbCancel())); connect(m_ui->pushButtonOK_2, SIGNAL(clicked()), this, SLOT(pbOK_2())); m_ui->pushButtonOK_2->setVisible(false); m_ui->textEdit_2->setVisible(false); m_ui->textEdit->setVisible(false); m_ui->pushButtonOK->setVisible(false); m_banner = m_ui->textEdit->toHtml().arg(appName, walletName); m_ui->labelWalletDoesNotExist->setVisible(false); m_ui->labelHeader->setText(m_banner); *z = [this](bool correctPassword) { if (correctPassword) { this->HideUI(); } else { m_ui->labelHeader->setText(tr("Wallet could not be opened with the presented key")); m_ui->textEdit->setVisible(false); m_ui->labelWalletDoesNotExist->setVisible(false); m_ui->labelHeader->setVisible(true); m_ui->lineEditKey->setVisible(true); m_ui->lineEditKey->setEnabled(false); m_ui->pushButtonSend->setVisible(false); m_ui->pushButtonCancel->setVisible(false); m_ui->pushButtonOK->setVisible(false); m_ui->pushButtonOK_2->setVisible(true); m_ui->pushButtonOK_2->setFocus(); } }; this->installEventFilter(this); this->show(); }
mountOptions::mountOptions( QString * options,QWidget * parent ) : QDialog( parent ),m_ui( new Ui::mountOptions ),m_options( options ) { m_ui->setupUi( this ) ; this->setFixedSize( this->size() ) ; this->setWindowFlags( Qt::Window | Qt::Dialog ) ; this->setFont( parent->font() ) ; connect( m_ui->pbOk,SIGNAL( clicked() ),this,SLOT( pbOK() ) ) ; connect( m_ui->pbCancel,SIGNAL( clicked() ),this,SLOT( pbCancel() ) ) ; }
keyDialog::keyDialog( QWidget * parent,QTableWidget * table,const QString& path, const QString& type,const QString& folderOpener,bool autoOpenFolderOnMount ) : QDialog( parent ),m_ui(new Ui::keyDialog) { m_ui->setupUi( this ) ; m_ui->checkBoxShareMountPoint->setToolTip( utility::shareMountPointToolTip() ) ; m_table = table ; m_path = path ; m_working = false ; m_folderOpener = folderOpener ; m_autoOpenFolderOnMount = autoOpenFolderOnMount ; QString msg ; if( type == QString( "crypto_LUKS" ) ){ msg = tr( "unlock and mount a luks volume in \"%1\"").arg( m_path ) ; }else{ msg = tr( "unlock and mount an encrypted volume in \"%1\"").arg( m_path ) ; } this->setWindowTitle( msg ) ; m_ui->lineEditMountPoint->setText( path ) ; m_ui->pbkeyFile->setVisible( false ) ; m_ui->pbOpenMountPoint->setIcon( QIcon( QString( ":/folder.png" ) ) ) ; m_menu = new QMenu( this ) ; this->setFixedSize( this->size() ) ; this->setWindowFlags( Qt::Window | Qt::Dialog ) ; this->setFont( parent->font() ) ; m_ui->lineEditKey->setFocus() ; m_ui->checkBoxOpenReadOnly->setChecked( utility::getOpenVolumeReadOnlyOption( QString( "zuluMount-gui" ) ) ) ; connect( m_ui->pbCancel,SIGNAL( clicked() ),this,SLOT( pbCancel() ) ) ; connect( m_ui->pbOpen,SIGNAL( clicked() ),this,SLOT( pbOpen() ) ) ; connect( m_ui->pbkeyOption,SIGNAL( clicked() ),this,SLOT( pbkeyOption() ) ) ; connect( m_ui->rbKey,SIGNAL( toggled( bool ) ),this,SLOT( rbKey( bool ) ) ) ; connect( m_ui->rbKeyFile,SIGNAL( toggled( bool ) ),this,SLOT( rbKeyFile( bool ) ) ) ; connect( m_ui->rbPlugIn,SIGNAL( toggled( bool ) ),this,SLOT( rbPlugIn( bool ) ) ) ; connect( m_ui->lineEditKey,SIGNAL( textChanged( QString ) ),this,SLOT( keyTextChanged( QString ) ) ) ; connect( m_ui->pbOpenMountPoint,SIGNAL( clicked() ),this,SLOT( pbMountPointPath() ) ) ; connect( m_ui->checkBoxOpenReadOnly,SIGNAL( stateChanged( int ) ),this,SLOT( cbMountReadOnlyStateChanged( int ) ) ) ; m_ui->rbKey->setChecked( true ) ; m_ui->pbOpenMountPoint->setVisible( false ) ; m_point = m_path.split( "/" ).last() ; m_ui->lineEditMountPoint->setText( m_point ) ; }
openvolume::openvolume( QWidget * parent ) : QDialog( parent ),m_ui( new Ui::openvolume() ) { m_ui->setupUi( this ) ; this->setFixedSize( this->size() ) ; this->setFont( parent->font() ) ; connect( m_ui->tableWidget,SIGNAL( itemDoubleClicked( QTableWidgetItem * ) ), this,SLOT( tableEntryDoubleClicked( QTableWidgetItem * ) ) ) ; connect( m_ui->tableWidget,SIGNAL( currentItemChanged( QTableWidgetItem *,QTableWidgetItem * ) ), this,SLOT( currentItemChanged( QTableWidgetItem *,QTableWidgetItem * ) ) ) ; connect( m_ui->pbHelp,SIGNAL( clicked() ),this,SLOT( pbHelp() ) ) ; connect( m_ui->pbUUID,SIGNAL( clicked() ),this,SLOT( pbUUID() ) ) ; connect( m_ui->pbCancel,SIGNAL( clicked() ),this,SLOT( pbCancel() ) ) ; connect( m_ui->pbOpen,SIGNAL( clicked() ),this,SLOT( pbOpen() ) ) ; this->addAction( [ this ](){ auto ac = new QAction( this ) ; ac->setShortcuts( { Qt::Key_Enter,Qt::Key_Return } ) ; connect( ac,SIGNAL( triggered() ),this,SLOT( EnterKeyPressed() ) ) ; return ac ; }() ) ; auto tw = m_ui->tableWidget ; tw->setColumnWidth( 0,183 ) ; tw->setColumnWidth( 1,90 ) ; //tw->setColumnWidth( 2,110 ) ; tw->hideColumn( 2 ) ; tw->setColumnWidth( 3,90 ) ; tw->setColumnWidth( 4,309 ) ; for( int i = 0 ; i < 5 ; i++ ){ tw->horizontalHeaderItem( i )->setFont( this->font() ) ; } tw->horizontalHeader()->setVisible( true ) ; m_ui->checkBoxUUID->setVisible( false ) ; m_ui->pbHelp->setVisible( false ) ; this->installEventFilter( this ) ; this->disableAll() ; }
openvolume::openvolume( QWidget * parent ) : QDialog( parent ) { m_ui = new Ui::openvolume() ; m_ui->setupUi( this ) ; this->setFixedSize( this->size() ) ; this->setFont( parent->font() ) ; connect( m_ui->tableWidget,SIGNAL( itemDoubleClicked( QTableWidgetItem * ) ),this,SLOT( tableEntryDoubleClicked( QTableWidgetItem * ) ) ) ; connect( m_ui->tableWidget,SIGNAL( currentItemChanged( QTableWidgetItem *,QTableWidgetItem * ) ),this, SLOT( currentItemChanged( QTableWidgetItem *,QTableWidgetItem * ) ) ) ; connect( m_ui->pbHelp,SIGNAL( clicked() ),this,SLOT( pbHelp() ) ) ; connect( m_ui->pbUUID,SIGNAL( clicked() ),this,SLOT( pbUUID() ) ) ; connect( m_ui->pbCancel,SIGNAL( clicked() ),this,SLOT( pbCancel() ) ) ; m_action = new QAction( this ) ; QList<QKeySequence> keys ; keys.append( Qt::Key_Enter ) ; keys.append( Qt::Key_Return ) ; m_action->setShortcuts( keys ) ; connect( m_action,SIGNAL( triggered() ),this,SLOT( EnterKeyPressed() ) ) ; this->addAction( m_action ) ; QTableWidget * tw = m_ui->tableWidget ; tw->setColumnWidth( 0,183 ) ; tw->setColumnWidth( 1,90 ) ; //tw->setColumnWidth( 2,110 ) ; tw->hideColumn( 2 ) ; tw->setColumnWidth( 3,90 ) ; tw->setColumnWidth( 4,309 ) ; for( int i = 0 ; i < 5 ; i++ ){ tw->horizontalHeaderItem( i )->setFont( this->font() ) ; } tw->horizontalHeader()->setVisible( true ) ; m_ui->checkBoxUUID->setVisible( false ) ; m_diableNonLUKS = false ; //m_ui->pbUUID->setVisible( false ) ; m_showEncryptedOnly = false ; m_showLuksOnly = false ; this->installEventFilter( this ) ; }
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 ) ; }
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 ) ; }
int DialogNew::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QDialog::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: diterima((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2])),(*reinterpret_cast< QString(*)>(_a[3]))); break; case 1: diterima((*reinterpret_cast< QString(*)>(_a[1]))); break; case 2: getFromClipboard(); break; case 3: pbOk(); break; case 4: pbCancel(); break; case 5: getAuth(); break; default: ; } _id -= 6; } return _id; }
mountPartition::mountPartition( QWidget * parent,QTableWidget * table ) : QWidget( parent ),m_ui( new Ui::mountPartition ) { m_ui->setupUi( this ) ; m_ui->checkBoxShareMountPoint->setToolTip( utility::shareMountPointToolTip() ) ; m_table = table ; this->setFixedSize( this->size() ) ; this->setWindowFlags( Qt::Window | Qt::Dialog ) ; this->setFont( parent->font() ) ; m_ui->pbMount->setFocus() ; m_ui->checkBoxMountReadOnly->setChecked( utility::getOpenVolumeReadOnlyOption( "zuluMount-gui" ) ) ; connect( m_ui->pbOptions,SIGNAL( clicked() ),this,SLOT( pbOptions() ) ) ; connect( m_ui->pbMount,SIGNAL( clicked() ),this,SLOT( pbMount() ) ) ; connect( m_ui->pbMountFolder,SIGNAL( clicked() ),this,SLOT( pbOpenMountPath() ) ) ; connect( m_ui->pbCancel,SIGNAL( clicked() ),this,SLOT( pbCancel() ) ) ; connect( m_ui->checkBox,SIGNAL( stateChanged( int ) ),this,SLOT( stateChanged( int ) ) ) ; connect( m_ui->checkBoxMountReadOnly,SIGNAL( stateChanged(int) ),this,SLOT( checkBoxReadOnlyStateChanged( int ) ) ) ; m_ui->pbMountFolder->setIcon( QIcon( ":/folder.png" ) ) ; userfont F( this ) ; this->setFont( F.getFont() ) ; m_ui->pbMountFolder->setVisible( false ) ; QAction * ac = new QAction( this ) ; QKeySequence s( Qt::CTRL + Qt::Key_F ) ; ac->setShortcut( s ) ; connect( ac,SIGNAL( triggered() ),this,SLOT( showOffSetWindowOption() ) ) ; this->addAction( ac ) ; m_menu = new QMenu( this ) ; m_menu->addAction( tr( "Set File System Options" ) ) ; m_menu->addAction( tr( "Set Volume Offset" ) ) ; connect( m_menu,SIGNAL( triggered( QAction * ) ),this,SLOT( doAction( QAction * ) ) ) ; 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 ) ; }
managevolumeheader::managevolumeheader( QWidget * parent ) : QDialog( parent ), m_ui( new Ui::managevolumeheader ) { m_ui->setupUi( this ) ; this->setFont( parent->font() ) ; this->setFixedSize( this->size() ) ; //m_ui->pbOpenFolder->setIcon( QIcon( QString( ":/folder.png" ) ) ) ; m_ui->pushButtonPartition->setIcon( QIcon( ":/partition.png" ) ) ; m_ui->pushButtonFile->setIcon( QIcon( ":/file.png" ) ) ; m_ui->lineEditDevicePath->setFocus() ; connect( m_ui->pbCreate,SIGNAL( clicked() ),this,SLOT( pbCreate() ) ) ; connect( m_ui->pbOpenFolder,SIGNAL( clicked() ),this,SLOT( pbOpenLuksHeaderBackUp() ) ) ; connect( m_ui->pbCancel,SIGNAL( clicked() ),this,SLOT( pbCancel() ) ) ; connect( m_ui->pushButtonFile,SIGNAL( clicked() ),this,SLOT( pbOpenFile() ) ) ; connect( m_ui->pushButtonPartition,SIGNAL( clicked() ),this,SLOT( pbOpenPartition() ) ) ; connect( m_ui->lineEditDevicePath,SIGNAL( textChanged( QString ) ),this,SLOT( backUpHeaderNameChange( QString ) ) ) ; connect( m_ui->rbKey,SIGNAL( toggled( bool ) ),this,SLOT( rbKeyToggled( bool ) ) ) ; connect( m_ui->pBKeyFile,SIGNAL( clicked() ),this,SLOT( pbKeyFile() ) ) ; connect( m_ui->rbTrueCryptHeader,SIGNAL( toggled( bool ) ),this,SLOT( rbTrueCryptVolume( bool ) ) ) ; m_OperationInProgress = false ; m_trueCryptWarning = false ; this->enableTrueCrypt( false ) ; this->installEventFilter( this ) ; m_ui->groupBox_2->setEnabled( false ) ; m_ui->rbFDETrueCrypt->setEnabled( false ) ; m_ui->rbNormalTrueCrypt->setEnabled( false ) ; m_ui->rbSystemTrueCrypt->setEnabled( false ) ; #if TCPLAY_NEW_API m_ui->rbTrueCryptHeader->setEnabled( true ) ; #else m_ui->rbTrueCryptHeader->setEnabled( false ) ; #endif }
MainWindow::MainWindow( QWidget * parent ) : QWidget( parent ),m_ui( new Ui::MainWindow ) { m_ui->setupUi( this ) ; this->setFixedSize( this->size() ) ; m_ui->lineEditKey->setEchoMode( QLineEdit::Password ) ; this->setWindowIcon( QIcon( ":/key.png" ) ) ; QAction * ac = new QAction( this ) ; QList<QKeySequence> keys ; keys.append( Qt::Key_Enter ) ; keys.append( Qt::Key_Return ) ; ac->setShortcuts( keys ) ; connect( ac,SIGNAL( triggered() ),this,SLOT( defaultButton() ) ) ; this->addAction( ac ) ; connect( m_ui->pbCancel,SIGNAL( clicked() ),this,SLOT( pbCancel() ) ) ; connect( m_ui->pbOpen,SIGNAL( clicked() ),this,SLOT( pbOpen() ) ) ; this->SetFocus() ; }
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 ) ; }
manageluksheader::manageluksheader( QWidget * parent ) : QDialog( parent ), m_ui( new Ui::manageluksheader ) { m_ui->setupUi( this ); this->setFont( parent->font() ); this->setFixedSize( this->size() ); m_ui->pbOpenFolder->setIcon( QIcon( QString( ":/folder.png" ) ) ); m_ui->pushButtonPartition->setIcon( QIcon( QString( ":/partition.png" ) ) ); m_ui->pushButtonFile->setIcon( QIcon( QString( ":/file.png" ) ) ); m_ui->lineEditDevicePath->setFocus(); connect( m_ui->pbCreate,SIGNAL( clicked() ),this,SLOT( pbCreate() ) ) ; connect( m_ui->pbOpenFolder,SIGNAL( clicked() ),this,SLOT( pbOpenLuksHeaderBackUp() ) ) ; connect( m_ui->pbCancel,SIGNAL( clicked() ),this,SLOT( pbCancel() ) ) ; connect( m_ui->pushButtonFile,SIGNAL( clicked() ),this,SLOT( pbOpenFile() ) ); connect( m_ui->pushButtonPartition,SIGNAL( clicked() ),this,SLOT( pbOpenPartition() ) ); connect( m_ui->lineEditDevicePath,SIGNAL( textChanged( QString ) ),this,SLOT( backUpHeaderNameChange( QString ) ) ); m_OperationInProgress = false ; }
keyDialog::keyDialog( QWidget * parent,QTableWidget * table,const volumeEntryProperties& e,std::function< void() > p,std::function< void( const QString& ) > q ) : QDialog( parent ),m_ui( new Ui::keyDialog ),m_cancel( std::move( p ) ),m_success( std::move( q ) ) { m_ui->setupUi( this ) ; m_ui->checkBoxShareMountPoint->setToolTip( utility::shareMountPointToolTip() ) ; m_table = table ; m_path = e.volumeName() ; m_working = false ; m_volumeIsEncFs = e.fileSystem() == "encfs" ; QString msg ; if( e.fileSystem() == "crypto_LUKS" ){ msg = tr( "Mount A LUKS volume in \"%1\"").arg( m_path ) ; }else{ msg = tr( "Mount An Encrypted Volume In \"%1\"").arg( m_path ) ; } this->setWindowTitle( msg ) ; m_ui->lineEditMountPoint->setText( m_path ) ; m_ui->pbOpenMountPoint->setIcon( QIcon( ":/folder.png" ) ) ; m_menu = new QMenu( this ) ; connect( m_menu,SIGNAL( triggered( QAction * ) ),this,SLOT( pbPluginEntryClicked( QAction * ) ) ) ; this->setFixedSize( this->size() ) ; this->setWindowFlags( Qt::Window | Qt::Dialog ) ; this->setFont( parent->font() ) ; m_ui->lineEditKey->setFocus() ; m_ui->checkBoxOpenReadOnly->setChecked( utility::getOpenVolumeReadOnlyOption( "zuluMount-gui" ) ) ; m_ui->pbkeyOption->setEnabled( false ) ; m_ui->lineEditKey->setEchoMode( QLineEdit::Password ) ; connect( m_ui->pbOptions,SIGNAL( clicked() ),this,SLOT( pbOptions() ) ) ; connect( m_ui->pbCancel,SIGNAL( clicked() ),this,SLOT( pbCancel() ) ) ; connect( m_ui->pbOpen,SIGNAL( clicked() ),this,SLOT( pbOpen() ) ) ; connect( m_ui->pbkeyOption,SIGNAL( clicked() ),this,SLOT( pbkeyOption() ) ) ; connect( m_ui->pbOpenMountPoint,SIGNAL( clicked() ),this,SLOT( pbMountPointPath() ) ) ; connect( m_ui->checkBoxOpenReadOnly,SIGNAL( stateChanged( int ) ),this,SLOT( cbMountReadOnlyStateChanged( int ) ) ) ; connect( m_ui->cbKeyType,SIGNAL( currentIndexChanged( int ) ),this,SLOT( cbActicated( int ) ) ) ; m_ui->pbOpenMountPoint->setVisible( false ) ; m_point = utility::mountPathPostFix( m_path.split( "/" ).last() ) ; m_ui->lineEditMountPoint->setText( m_point ) ; QAction * ac = new QAction( this ) ; QKeySequence s( Qt::CTRL + Qt::Key_F ) ; ac->setShortcut( s ) ; connect( ac,SIGNAL( triggered() ),this,SLOT( showOffSetWindowOption() ) ) ; this->addAction( ac ) ; m_menu_1 = new QMenu( this ) ; auto _add_action = [ & ]( const QString& e ){ ac = m_menu_1->addAction( e ) ; ac ->setEnabled( !m_volumeIsEncFs ) ; } ; _add_action( tr( "Set File System Options" ) ) ; _add_action( tr( "Set Volume Offset" ) ) ; _add_action( tr( "Set Volume As VeraCrypt Volume" ) ) ; _add_action( tr( "Set VeraCrypt PIM value" ) ) ; m_ui->cbKeyType->addItem( tr( "Key" ) ) ; m_ui->cbKeyType->addItem( tr( "KeyFile" ) ) ; m_ui->cbKeyType->addItem( tr( "Plugin" ) ) ; if( m_volumeIsEncFs ){ m_ui->checkBoxShareMountPoint->setEnabled( false ) ; }else{ #if VERACRYPT_SUPPORT m_ui->cbKeyType->addItem( tr( "TrueCrypt/VeraCrypt Keys" ) ) ; #else m_ui->cbKeyType->addItem( tr( "TrueCrypt keys" ) ) ; #endif } connect( m_menu_1,SIGNAL( triggered( QAction * ) ),this,SLOT( doAction( QAction * ) ) ) ; m_veraCryptWarning.setWarningLabel( m_ui->veraCryptWarning ) ; this->installEventFilter( this ) ; }