From 777770706242caac56f66a206e9394ee2bd2feab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=A4rkl?= Date: Sun, 27 May 2018 22:06:57 +0200 Subject: [PATCH] Remove Progress UI from OptionsDialog --- src/dialogs/OptionsDialog.cpp | 47 --------------------------- src/dialogs/OptionsDialog.h | 7 ---- src/dialogs/OptionsDialog.ui | 61 +---------------------------------- 3 files changed, 1 insertion(+), 114 deletions(-) diff --git a/src/dialogs/OptionsDialog.cpp b/src/dialogs/OptionsDialog.cpp index c1864b3d..240daaf1 100644 --- a/src/dialogs/OptionsDialog.cpp +++ b/src/dialogs/OptionsDialog.cpp @@ -18,9 +18,6 @@ OptionsDialog::OptionsDialog(MainWindow *main): { ui->setupUi(this); setWindowFlags(windowFlags() & (~Qt::WindowContextHelpButtonHint)); - ui->progressBar->setVisible(0); - ui->statusLabel->setVisible(0); - ui->elapsedLabel->setVisible(0); ui->logoSvgWidget->load(Config()->getLogoFile()); ui->analSlider->setValue(defaultAnalLevel); @@ -58,10 +55,6 @@ OptionsDialog::OptionsDialog(MainWindow *main): connect(ui->scriptCheckBox, SIGNAL(stateChanged(int)), this, SLOT(updateScriptLayout())); - // Add this so the dialog resizes when widgets are shown/hidden - //this->layout()->setSizeConstraint(QLayout::SetFixedSize); - - //connect(&analTask, SIGNAL(finished()), this, SLOT(analysisFinished())); connect(ui->cancelButton, SIGNAL(clicked()), this, SLOT(reject())); ui->programLineEdit->setText(main->getFilename()); @@ -86,13 +79,6 @@ 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(); @@ -196,15 +182,6 @@ void OptionsDialog::setupAndStartAnalysis(int level, QList advanced) { ui->analSlider->setValue(level); - setInteractionEnabled(false); - - // Show Progress Bar - ui->progressBar->setVisible(true); - ui->statusLabel->setVisible(true); - ui->elapsedLabel->setVisible(true); - - ui->statusLabel->setText(tr("Starting analysis")); - main->initUI(); InitialOptions options; @@ -269,37 +246,13 @@ void OptionsDialog::setupAndStartAnalysis(int level, QList advanced) done(0); } - -void OptionsDialog::updateProgress(const QString &status) -{ - ui->statusLabel->setText(status); -} - void OptionsDialog::on_okButton_clicked() { setupAndStartAnalysis(ui->analSlider->value(), getSelectedAdvancedAnalCmds()); } -void OptionsDialog::analysisFinished() -{ - //if (analTask.isInterrupted()) { - // updateProgress(tr("Analysis aborted.")); - // done(1); - // return; - //} - - updateProgress(tr("Loading interface...")); - main->addOutput(tr(" > Analysis finished")); - - main->finalizeOpen(); - done(0); -} - void OptionsDialog::closeEvent(QCloseEvent *event) { - //if (analTask.isRunning()) { - // analTask.interruptAndWait(); - //} event->accept(); } diff --git a/src/dialogs/OptionsDialog.h b/src/dialogs/OptionsDialog.h index c24781ad..22bc94be 100644 --- a/src/dialogs/OptionsDialog.h +++ b/src/dialogs/OptionsDialog.h @@ -24,9 +24,6 @@ public: void setupAndStartAnalysis(int level, QList advanced); -public slots: - void updateProgress(const QString &str); - private slots: void on_okButton_clicked(); void on_analSlider_valueChanged(int value); @@ -38,8 +35,6 @@ private slots: void updatePDBLayout(); void updateScriptLayout(); - - void analysisFinished(); protected: void closeEvent(QCloseEvent *event) override; @@ -53,8 +48,6 @@ private: void updateCPUComboBox(); - void setInteractionEnabled(bool enabled); - public: std::unique_ptr ui; diff --git a/src/dialogs/OptionsDialog.ui b/src/dialogs/OptionsDialog.ui index 01959d90..cf044e47 100644 --- a/src/dialogs/OptionsDialog.ui +++ b/src/dialogs/OptionsDialog.ui @@ -220,7 +220,7 @@ 0 - -672 + 0 564 867 @@ -993,70 +993,11 @@ - - - - - 0 - 0 - - - - Select analysis options - - - Qt::AlignCenter - - - - - - - true - - - - true - - - - - - - 0 - - - 0 - - - false - - - 0 - - - - - 0 - 0 - - - - - 150 - 0 - - - - Timer label - - -