Disable only necessary Widgets in OptionsDialog

This commit is contained in:
Florian Märkl 2017-12-21 12:29:58 +01:00
parent 1462f29251
commit f8182a9e2e
3 changed files with 724 additions and 698 deletions

View File

@ -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<QString> 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);

View File

@ -49,6 +49,9 @@ private:
QString analysisDescription(int level);
void updateCPUComboBox();
void setInteractionEnabled(bool enabled);
public:
std::unique_ptr<Ui::OptionsDialog> ui;
QString getSelectedArch();

File diff suppressed because it is too large Load Diff