diff --git a/src/dialogs/OptionsDialog.cpp b/src/dialogs/OptionsDialog.cpp index f5123e3f..dbe64481 100644 --- a/src/dialogs/OptionsDialog.cpp +++ b/src/dialogs/OptionsDialog.cpp @@ -90,6 +90,13 @@ void OptionsDialog::updateCPUComboBox() ui->cpuComboBox->lineEdit()->setText(currentText); } +void OptionsDialog::setInteractionEnabled(bool enabled) +{ + ui->optionsWidget->setEnabled(enabled); + ui->okButton->setEnabled(enabled); + ui->cancelButton->setEnabled(enabled); +} + QString OptionsDialog::getSelectedArch() { QVariant archValue = ui->archComboBox->currentData(); @@ -125,14 +132,12 @@ void OptionsDialog::setupAndStartAnalysis(int level, QList advanced) { ui->analSlider->setValue(level); - this->setEnabled(0); + setInteractionEnabled(false); // Show Progress Bar - ui->progressBar->setEnabled(1); - ui->statusLabel->setEnabled(1); - ui->progressBar->setVisible(1); - ui->statusLabel->setVisible(1); - ui->elapsedLabel->setVisible(1); + ui->progressBar->setVisible(true); + ui->statusLabel->setVisible(true); + ui->elapsedLabel->setVisible(true); ui->statusLabel->setText(tr("Starting analysis")); //ui->progressBar->setValue(5); diff --git a/src/dialogs/OptionsDialog.h b/src/dialogs/OptionsDialog.h index 119d10e7..d5708be1 100644 --- a/src/dialogs/OptionsDialog.h +++ b/src/dialogs/OptionsDialog.h @@ -49,6 +49,9 @@ private: QString analysisDescription(int level); void updateCPUComboBox(); + + void setInteractionEnabled(bool enabled); + public: std::unique_ptr ui; QString getSelectedArch(); diff --git a/src/dialogs/OptionsDialog.ui b/src/dialogs/OptionsDialog.ui index e52866db..2c8addbe 100644 --- a/src/dialogs/OptionsDialog.ui +++ b/src/dialogs/OptionsDialog.ui @@ -34,10 +34,7 @@ margin-bottom: 5px; } - - - QLayout::SetMinAndMaxSize - + @@ -95,6 +92,9 @@ 12 + + Qt::ClickFocus + @@ -119,711 +119,306 @@ - - - 5 - - - QLayout::SetDefaultConstraint - - - - - Qt::Vertical - - - - - - - - 0 - 0 - - - - Qt::LeftToRight - - - - - - Analysis: Enabled - - - true - - - - - - - - 0 - 0 - - - - Level: - - - - - - - - - - 0 - 0 - - - - 0 - - - 3 - - - 1 - - - 0 - - - Qt::Horizontal - - - false - - - QSlider::NoTicks - - - - - - - true - - - - - 0 - 0 - 572 - 716 - + + + + 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - + + 0 + + + 0 + + + 0 + + + + + 5 + + + QLayout::SetDefaultConstraint + + + + + Qt::Vertical + + + + + + + + 0 + 0 + + + + Qt::LeftToRight + + + + + + Analysis: Enabled + + + true + + + + + + + + 0 + 0 + + + + Level: + + + + + + + + + + 0 + 0 + + + + 0 + + + 3 + + + 1 + + + 0 + + + Qt::Horizontal + + + false + + + QSlider::NoTicks + + + + + + + true + + + + + 0 + 0 + 564 + 805 + - - QFrame::NoFrame - - - QFrame::Plain - - + - 2 - - - QLayout::SetDefaultConstraint - - - 5 + 0 0 - - 5 - 0 - - - 5 + + + + 0 + 0 + - - - - true - - - - 0 - 0 - - - + + QFrame::NoFrame + + + QFrame::Plain + + + + 2 + + + QLayout::SetDefaultConstraint + + + 5 + + + 0 + + + 5 + + + 0 + + + - 6 - - - 5 - - - 5 - - - 5 - - 5 - - - Analyze all symbols (aa) - - - true - - - - - - - Analyze for references (aar) - - - true - - - - - - - Analyze function calls (aac) - - - true - - - - - - - Analyze all basic blocks (aab) - - - - - - - Autorename functions based on context (aan) - - - true - - - - - - - Experimental: - - - - - - - Emulate code to find computed references (aae) - - - - - - - Analyze for consecutive function (aat) - - - - - - - Type and Argument matching analysis (afta) - - - - - - - Analyze code after trap-sleds (aaT) - - - - - - - Analyze function preludes (aap) - - - - - - - Analyze jump tables in switch statements (e! anal.jmptbl) - - - - - - - Analyze push+ret as jmp (e! anal.pushret) - - - - - - - Continue analysis after each function (e! anal.hasnext) - - - - - - - Qt::Horizontal - - - - - - - - - - - - 0 - - - QLayout::SetMinimumSize - - - - - Load bin information - - - true - - - - - - - - - - Use virtual addressing - - - true - - - - - - - Import demangled symbols - - - true - - - - - - - - - 0 - - - - - ... - - - - 8 - 8 - - - - true - - - Qt::RightArrow - - - - - - - - 0 - 0 - - - - - 75 - true - - - - Advanced options - - - - - - - - - - - - - 0 - 0 - - - - - 75 - true - - - - - - - - - - CPU options - - - - - - - - - - 0 - 0 - - - - Architecture: - - - - - - - Auto - - - - Auto - - - - - - - - - 0 - 0 - - - - CPU: - - - - - - - - 70 - 0 - - - - true - - - - - - - - - - - - - 0 - 0 - - - - Bits: - - - - - - - - Auto - - - - - 8 - - - - - 16 - - - - - 32 - - - - - 64 - - - - - - - - - - 0 - - - - - - 0 - 0 - - - - Kernel: - - - - - - - false - - - Auto - - - - Auto - - - - - - - - - 0 - 0 - - - - Format: - - - - - - - Auto - - - - Auto - - - - - - - - - - Qt::Horizontal - - - - - - - QLayout::SetDefaultConstraint - - - QFormLayout::ExpandingFieldsGrow - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - 10 - - - 0 - - - - - - 0 - 0 - - - - Load offset: - - - - - - - - 12 - - - - - - - 0 - - - false - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 0 - 0 - - - - - 0 - 0 - - - - Map offset: - - - - - - - - 12 - - - - 0 - - - false - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Load PDB - - - - - + true - + + + 0 + 0 + + + + + 6 + - 0 + 5 - 0 + 5 - 0 + 5 - 0 + 5 - - - pdb file + + + Analyze all symbols (aa) + + + true - + - Select + Analyze for references (aar) + + + true + + + + + + + Analyze function calls (aac) + + + true + + + + + + + Analyze all basic blocks (aab) + + + + + + + Autorename functions based on context (aan) + + + true + + + + + + + Experimental: + + + + + + + Emulate code to find computed references (aae) + + + + + + + Analyze for consecutive function (aat) + + + + + + + Type and Argument matching analysis (afta) + + + + + + + Analyze code after trap-sleds (aaT) + + + + + + + Analyze function preludes (aap) + + + + + + + Analyze jump tables in switch statements (e! anal.jmptbl) + + + + + + + Analyze push+ret as jmp (e! anal.pushret) + + + + + + + Continue analysis after each function (e! anal.hasnext) + + + + + + + Qt::Horizontal @@ -832,27 +427,450 @@ + + + + 0 + + + QLayout::SetMinimumSize + + + + + Load bin information + + + true + + + + + + + + + + Use virtual addressing + + + true + + + + + + + Import demangled symbols + + + true + + + + + + + + + 0 + + + + + ... + + + + 8 + 8 + + + + true + + + Qt::RightArrow + + + + + + + + 0 + 0 + + + + + 75 + true + + + + Advanced options + + + + + + + + + + + + + 0 + 0 + + + + + 75 + true + + + + + + + + + + CPU options + + + + + + + + + + 0 + 0 + + + + Architecture: + + + + + + + Auto + + + + Auto + + + + + + + + + 0 + 0 + + + + CPU: + + + + + + + + 70 + 0 + + + + true + + + + + + + + + + + + + 0 + 0 + + + + Bits: + + + + + + + + Auto + + + + + 8 + + + + + 16 + + + + + 32 + + + + + 64 + + + + + + + + + + 0 + + + + + + 0 + 0 + + + + Kernel: + + + + + + + false + + + Auto + + + + Auto + + + + + + + + + 0 + 0 + + + + Format: + + + + + + + Auto + + + + Auto + + + + + + + + + + Qt::Horizontal + + + + + + + QLayout::SetDefaultConstraint + + + QFormLayout::ExpandingFieldsGrow + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + 10 + + + 0 + + + + + + 0 + 0 + + + + Load offset: + + + + + + + + 12 + + + + + + + 0 + + + false + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + Map offset: + + + + + + + + 12 + + + + 0 + + + false + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Load PDB + + + + + + + true + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + pdb file + + + + + + + Select + + + + + + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - + + +