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