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
{
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") {
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")) {
<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/>