From edda03bc30b8f86ff4441437ffc304b2572d1ec4 Mon Sep 17 00:00:00 2001 From: Dirk H Bartley Date: Mon, 28 May 2007 12:42:34 +0000 Subject: [PATCH] Did not read the "|" in the docs correct as or. Radio buttons better then check boxes. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4924 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/qt-console/run/prune.cpp | 22 +--- bacula/src/qt-console/run/prune.ui | 185 +++++++++++++--------------- bacula/src/qt-console/run/run.h | 1 - 3 files changed, 92 insertions(+), 116 deletions(-) diff --git a/bacula/src/qt-console/run/prune.cpp b/bacula/src/qt-console/run/prune.cpp index b64bd581b2..58e7ece85b 100644 --- a/bacula/src/qt-console/run/prune.cpp +++ b/bacula/src/qt-console/run/prune.cpp @@ -70,12 +70,7 @@ prunePage::prunePage(const QString &volume, const QString &client) clientCombo->addItems(m_console->client_list); connect(okButton, SIGNAL(pressed()), this, SLOT(okButtonPushed())); connect(cancelButton, SIGNAL(pressed()), this, SLOT(cancelButtonPushed())); - filesCheckBox->setCheckState(Qt::Checked); - jobsCheckBox->setCheckState(Qt::Checked); - volumeCheckBox->setCheckState(Qt::Checked); - connect(filesCheckBox, SIGNAL(stateChanged(int)), this, SLOT(checkStateChanged())); - connect(jobsCheckBox, SIGNAL(stateChanged(int)), this, SLOT(checkStateChanged())); - connect(volumeCheckBox, SIGNAL(stateChanged(int)), this, SLOT(checkStateChanged())); + filesRadioButton->setChecked(true); if (clientCombo->findText(client, Qt::MatchExactly) != -1) clientCombo->setCurrentIndex(clientCombo->findText(client, Qt::MatchExactly)); else @@ -96,13 +91,13 @@ void prunePage::okButtonPushed() { this->hide(); QString cmd("prune"); - if (filesCheckBox->checkState() == Qt::Checked) { + if (filesRadioButton->isChecked()) { cmd += " files"; } - if (jobsCheckBox->checkState() == Qt::Checked) { + if (jobsRadioButton->isChecked()) { cmd += " jobs"; } - if (filesCheckBox->checkState() == Qt::Checked) { + if (filesRadioButton->isChecked()) { cmd += " volume"; } if (volumeCombo->currentText() != "Any") { @@ -133,15 +128,6 @@ void prunePage::cancelButtonPushed() mainWin->resetFocus(); } -void prunePage::checkStateChanged() -{ - if ((filesCheckBox->checkState() == Qt::Unchecked) && - (jobsCheckBox->checkState() == Qt::Unchecked) && - (volumeCheckBox->checkState() == Qt::Unchecked)) { - filesCheckBox->setCheckState(Qt::Checked); - } -} - void prunePage::volumeChanged() { if ((volumeCombo->currentText() == "Any") && (clientCombo->currentText() == "Any")) { diff --git a/bacula/src/qt-console/run/prune.ui b/bacula/src/qt-console/run/prune.ui index 6a1f29f576..15d151bf88 100644 --- a/bacula/src/qt-console/run/prune.ui +++ b/bacula/src/qt-console/run/prune.ui @@ -5,8 +5,8 @@ 0 0 - 501 - 326 + 514 + 363 @@ -19,48 +19,6 @@ 6 - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Qt::Vertical - - - QSizePolicy::Expanding - - - - 351 - 16 - - - - @@ -69,10 +27,7 @@ 6 - - - - + 0 @@ -81,12 +36,9 @@ 6 - - - Qt::RightToLeft - + - Prune Volumes + Prune Files @@ -105,6 +57,19 @@ + + + + Volume: + + + volumeCombo + + + + + + @@ -154,7 +119,7 @@ - + 0 @@ -162,6 +127,13 @@ 6 + + + + Prune Jobs + + + @@ -175,23 +147,9 @@ - - - - OK - - - - - - - Cancel - - - - + 0 @@ -199,16 +157,6 @@ 6 - - - - Qt::RightToLeft - - - Prune Jobs - - - @@ -222,10 +170,24 @@ + + + + OK + + + + + + + Cancel + + + - - + + @@ -243,7 +205,7 @@ - + 0 @@ -252,12 +214,9 @@ 6 - - - Qt::RightToLeft - + - Prune Files + Prune Volumes @@ -276,16 +235,6 @@ - - - - Volume: - - - volumeCombo - - - @@ -304,6 +253,48 @@ + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 351 + 16 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + diff --git a/bacula/src/qt-console/run/run.h b/bacula/src/qt-console/run/run.h index 41232daac7..91273cca25 100644 --- a/bacula/src/qt-console/run/run.h +++ b/bacula/src/qt-console/run/run.h @@ -64,7 +64,6 @@ public: public slots: void okButtonPushed(); void cancelButtonPushed(); - void checkStateChanged(); void volumeChanged(); void clientChanged(); -- 2.39.5