]> git.sur5r.net Git - bacula/bacula/commitdiff
Did not read the "|" in the docs correct as or. Radio buttons better then check...
authorDirk H Bartley <dbartley@schupan.com>
Mon, 28 May 2007 12:42:34 +0000 (12:42 +0000)
committerDirk H Bartley <dbartley@schupan.com>
Mon, 28 May 2007 12:42:34 +0000 (12:42 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4924 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/qt-console/run/prune.cpp
bacula/src/qt-console/run/prune.ui
bacula/src/qt-console/run/run.h

index b64bd581b293b662f64b39954f01ae1ed5d90cc3..58e7ece85bc7a0db4df5b97b2e60ae96e64115d9 100644 (file)
@@ -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")) {
index 6a1f29f5765272b6898285677123a6021c1a1d40..15d151bf88e54967c1115536527d8ca0a1da9763 100644 (file)
@@ -5,8 +5,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>501</width>
-    <height>326</height>
+    <width>514</width>
+    <height>363</height>
    </rect>
   </property>
   <property name="windowTitle" >
    <property name="spacing" >
     <number>6</number>
    </property>
-   <item row="1" column="0" >
-    <spacer>
-     <property name="orientation" >
-      <enum>Qt::Horizontal</enum>
-     </property>
-     <property name="sizeHint" >
-      <size>
-       <width>40</width>
-       <height>20</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
-   <item row="1" column="2" >
-    <spacer>
-     <property name="orientation" >
-      <enum>Qt::Horizontal</enum>
-     </property>
-     <property name="sizeHint" >
-      <size>
-       <width>40</width>
-       <height>20</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
-   <item row="0" column="1" >
-    <spacer>
-     <property name="orientation" >
-      <enum>Qt::Vertical</enum>
-     </property>
-     <property name="sizeType" >
-      <enum>QSizePolicy::Expanding</enum>
-     </property>
-     <property name="sizeHint" >
-      <size>
-       <width>351</width>
-       <height>16</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
    <item row="1" column="1" >
     <layout class="QGridLayout" >
      <property name="margin" >
      <property name="spacing" >
       <number>6</number>
      </property>
-     <item row="1" column="1" >
-      <widget class="QComboBox" name="clientCombo" />
-     </item>
-     <item row="5" column="0" colspan="2" >
+     <item row="3" column="0" colspan="2" >
       <layout class="QHBoxLayout" >
        <property name="margin" >
         <number>0</number>
         <number>6</number>
        </property>
        <item>
-        <widget class="QCheckBox" name="volumeCheckBox" >
-         <property name="layoutDirection" >
-          <enum>Qt::RightToLeft</enum>
-         </property>
+        <widget class="QRadioButton" name="filesRadioButton" >
          <property name="text" >
-          <string>Prune Volumes</string>
+          <string>Prune Files</string>
          </property>
         </widget>
        </item>
        </item>
       </layout>
      </item>
+     <item row="2" column="0" >
+      <widget class="QLabel" name="label_8" >
+       <property name="text" >
+        <string>Volume:</string>
+       </property>
+       <property name="buddy" >
+        <cstring>volumeCombo</cstring>
+       </property>
+      </widget>
+     </item>
+     <item row="2" column="1" >
+      <widget class="QComboBox" name="volumeCombo" />
+     </item>
      <item row="0" column="0" colspan="2" >
       <layout class="QHBoxLayout" >
        <property name="margin" >
        </item>
       </layout>
      </item>
-     <item row="6" column="0" colspan="2" >
+     <item row="4" column="0" colspan="2" >
       <layout class="QHBoxLayout" >
        <property name="margin" >
         <number>0</number>
        <property name="spacing" >
         <number>6</number>
        </property>
+       <item>
+        <widget class="QRadioButton" name="jobsRadioButton" >
+         <property name="text" >
+          <string>Prune Jobs</string>
+         </property>
+        </widget>
+       </item>
        <item>
         <spacer>
          <property name="orientation" >
          </property>
         </spacer>
        </item>
-       <item>
-        <widget class="QPushButton" name="okButton" >
-         <property name="text" >
-          <string>OK</string>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <widget class="QPushButton" name="cancelButton" >
-         <property name="text" >
-          <string>Cancel</string>
-         </property>
-        </widget>
-       </item>
       </layout>
      </item>
-     <item row="4" column="0" colspan="2" >
+     <item row="6" column="0" colspan="2" >
       <layout class="QHBoxLayout" >
        <property name="margin" >
         <number>0</number>
        <property name="spacing" >
         <number>6</number>
        </property>
-       <item>
-        <widget class="QCheckBox" name="jobsCheckBox" >
-         <property name="layoutDirection" >
-          <enum>Qt::RightToLeft</enum>
-         </property>
-         <property name="text" >
-          <string>Prune Jobs</string>
-         </property>
-        </widget>
-       </item>
        <item>
         <spacer>
          <property name="orientation" >
          </property>
         </spacer>
        </item>
+       <item>
+        <widget class="QPushButton" name="okButton" >
+         <property name="text" >
+          <string>OK</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QPushButton" name="cancelButton" >
+         <property name="text" >
+          <string>Cancel</string>
+         </property>
+        </widget>
+       </item>
       </layout>
      </item>
-     <item row="2" column="1" >
-      <widget class="QComboBox" name="volumeCombo" />
+     <item row="1" column="1" >
+      <widget class="QComboBox" name="clientCombo" />
      </item>
      <item row="1" column="0" >
       <widget class="QLabel" name="label_6" >
        </property>
       </widget>
      </item>
-     <item row="3" column="0" colspan="2" >
+     <item row="5" column="0" colspan="2" >
       <layout class="QHBoxLayout" >
        <property name="margin" >
         <number>0</number>
         <number>6</number>
        </property>
        <item>
-        <widget class="QCheckBox" name="filesCheckBox" >
-         <property name="layoutDirection" >
-          <enum>Qt::RightToLeft</enum>
-         </property>
+        <widget class="QRadioButton" name="volumesRadioButton" >
          <property name="text" >
-          <string>Prune Files</string>
+          <string>Prune Volumes</string>
          </property>
         </widget>
        </item>
        </item>
       </layout>
      </item>
-     <item row="2" column="0" >
-      <widget class="QLabel" name="label_8" >
-       <property name="text" >
-        <string>Volume:</string>
-       </property>
-       <property name="buddy" >
-        <cstring>volumeCombo</cstring>
-       </property>
-      </widget>
-     </item>
     </layout>
    </item>
    <item row="2" column="1" >
      </property>
     </spacer>
    </item>
+   <item row="0" column="1" >
+    <spacer>
+     <property name="orientation" >
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeType" >
+      <enum>QSizePolicy::Expanding</enum>
+     </property>
+     <property name="sizeHint" >
+      <size>
+       <width>351</width>
+       <height>16</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="1" column="2" >
+    <spacer>
+     <property name="orientation" >
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="sizeHint" >
+      <size>
+       <width>40</width>
+       <height>20</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="1" column="0" >
+    <spacer>
+     <property name="orientation" >
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="sizeHint" >
+      <size>
+       <width>40</width>
+       <height>20</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
   </layout>
  </widget>
  <resources/>
index 41232daac70b7e815012b60f13b66728b5099079..91273cca250536606f19d22339e375898c3c4fef 100644 (file)
@@ -64,7 +64,6 @@ public:
 public slots:
    void okButtonPushed();
    void cancelButtonPushed();
-   void checkStateChanged();
    void volumeChanged();
    void clientChanged();