Clean QT Storage Controllers UI
This commit is contained in:
@@ -84,20 +84,18 @@ SettingsStorageControllers::onCurrentMachineChanged(int machineId)
|
||||
}
|
||||
|
||||
QString name = DeviceConfig::DeviceName(hdc_get_device(c), hdc_get_internal_name(c), 1);
|
||||
if (name.isEmpty()) {
|
||||
if (name.isEmpty())
|
||||
break;
|
||||
}
|
||||
|
||||
if (hdc_available(c)) {
|
||||
const device_t *hdc_dev = hdc_get_device(c);
|
||||
|
||||
if (device_is_valid(hdc_dev, machineId)) {
|
||||
int row = Models::AddEntry(model, name, c);
|
||||
if (c == hdc_current[0]) {
|
||||
if (c == hdc_current[0])
|
||||
selectedRow = row - removeRows;
|
||||
}
|
||||
}
|
||||
}
|
||||
c++;
|
||||
}
|
||||
model->removeRows(0, removeRows);
|
||||
@@ -143,11 +141,11 @@ SettingsStorageControllers::onCurrentMachineChanged(int machineId)
|
||||
|
||||
/*CD interface controller config*/
|
||||
#ifdef USE_CDROM_MITSUMI
|
||||
ui->label_7->setVisible(true);
|
||||
ui->labelCDInterface->setVisible(true);
|
||||
ui->comboBoxCDInterface->setVisible(true);
|
||||
ui->pushButtonCDInterface->setVisible(true);
|
||||
#else
|
||||
ui->label_7->setVisible(false);
|
||||
ui->labelCDInterface->setVisible(false);
|
||||
ui->comboBoxCDInterface->setVisible(false);
|
||||
ui->pushButtonCDInterface->setVisible(false);
|
||||
#endif
|
||||
@@ -242,27 +240,27 @@ SettingsStorageControllers::onCurrentMachineChanged(int machineId)
|
||||
void
|
||||
SettingsStorageControllers::on_comboBoxHD_currentIndexChanged(int index)
|
||||
{
|
||||
if (index < 0) {
|
||||
if (index < 0)
|
||||
return;
|
||||
}
|
||||
|
||||
ui->pushButtonHD->setEnabled(hdc_has_config(ui->comboBoxHD->currentData().toInt()) > 0);
|
||||
}
|
||||
|
||||
void
|
||||
SettingsStorageControllers::on_comboBoxFD_currentIndexChanged(int index)
|
||||
{
|
||||
if (index < 0) {
|
||||
if (index < 0)
|
||||
return;
|
||||
}
|
||||
|
||||
ui->pushButtonFD->setEnabled(hdc_has_config(ui->comboBoxFD->currentData().toInt()) > 0);
|
||||
}
|
||||
|
||||
void
|
||||
SettingsStorageControllers::on_comboBoxCDInterface_currentIndexChanged(int index)
|
||||
{
|
||||
if (index < 0) {
|
||||
if (index < 0)
|
||||
return;
|
||||
}
|
||||
|
||||
ui->pushButtonCDInterface->setEnabled(cdrom_interface_has_config(ui->comboBoxCDInterface->currentData().toInt()) > 0);
|
||||
}
|
||||
|
||||
@@ -311,36 +309,36 @@ SettingsStorageControllers::on_pushButtonQuaternaryIDE_clicked()
|
||||
void
|
||||
SettingsStorageControllers::on_comboBoxSCSI1_currentIndexChanged(int index)
|
||||
{
|
||||
if (index < 0) {
|
||||
if (index < 0)
|
||||
return;
|
||||
}
|
||||
|
||||
ui->pushButtonSCSI1->setEnabled(scsi_card_has_config(ui->comboBoxSCSI1->currentData().toInt()) > 0);
|
||||
}
|
||||
|
||||
void
|
||||
SettingsStorageControllers::on_comboBoxSCSI2_currentIndexChanged(int index)
|
||||
{
|
||||
if (index < 0) {
|
||||
if (index < 0)
|
||||
return;
|
||||
}
|
||||
|
||||
ui->pushButtonSCSI2->setEnabled(scsi_card_has_config(ui->comboBoxSCSI2->currentData().toInt()) > 0);
|
||||
}
|
||||
|
||||
void
|
||||
SettingsStorageControllers::on_comboBoxSCSI3_currentIndexChanged(int index)
|
||||
{
|
||||
if (index < 0) {
|
||||
if (index < 0)
|
||||
return;
|
||||
}
|
||||
|
||||
ui->pushButtonSCSI3->setEnabled(scsi_card_has_config(ui->comboBoxSCSI3->currentData().toInt()) > 0);
|
||||
}
|
||||
|
||||
void
|
||||
SettingsStorageControllers::on_comboBoxSCSI4_currentIndexChanged(int index)
|
||||
{
|
||||
if (index < 0) {
|
||||
if (index < 0)
|
||||
return;
|
||||
}
|
||||
|
||||
ui->pushButtonSCSI4->setEnabled(scsi_card_has_config(ui->comboBoxSCSI4->currentData().toInt()) > 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -20,27 +20,31 @@ public slots:
|
||||
void onCurrentMachineChanged(int machineId);
|
||||
|
||||
private slots:
|
||||
void on_pushButtonSCSI4_clicked();
|
||||
void on_pushButtonSCSI3_clicked();
|
||||
void on_pushButtonSCSI2_clicked();
|
||||
void on_pushButtonSCSI1_clicked();
|
||||
void on_comboBoxSCSI4_currentIndexChanged(int index);
|
||||
void on_comboBoxSCSI3_currentIndexChanged(int index);
|
||||
void on_comboBoxSCSI2_currentIndexChanged(int index);
|
||||
void on_comboBoxSCSI1_currentIndexChanged(int index);
|
||||
void on_pushButtonQuaternaryIDE_clicked();
|
||||
void on_pushButtonTertiaryIDE_clicked();
|
||||
void on_pushButtonFD_clicked();
|
||||
void on_pushButtonHD_clicked();
|
||||
void on_pushButtonCDInterface_clicked();
|
||||
void on_checkBoxQuaternaryIDE_stateChanged(int arg1);
|
||||
void on_checkBoxTertiaryIDE_stateChanged(int arg1);
|
||||
void on_comboBoxFD_currentIndexChanged(int index);
|
||||
void on_comboBoxHD_currentIndexChanged(int index);
|
||||
void on_pushButtonHD_clicked();
|
||||
|
||||
void on_comboBoxFD_currentIndexChanged(int index);
|
||||
void on_pushButtonFD_clicked();
|
||||
|
||||
void on_comboBoxCDInterface_currentIndexChanged(int index);
|
||||
void on_pushButtonCDInterface_clicked();
|
||||
|
||||
void on_checkBoxTertiaryIDE_stateChanged(int arg1);
|
||||
void on_pushButtonTertiaryIDE_clicked();
|
||||
|
||||
void on_checkBoxQuaternaryIDE_stateChanged(int arg1);
|
||||
void on_pushButtonQuaternaryIDE_clicked();
|
||||
|
||||
void on_comboBoxSCSI1_currentIndexChanged(int index);
|
||||
void on_pushButtonSCSI1_clicked();
|
||||
void on_comboBoxSCSI2_currentIndexChanged(int index);
|
||||
void on_pushButtonSCSI2_clicked();
|
||||
void on_comboBoxSCSI3_currentIndexChanged(int index);
|
||||
void on_pushButtonSCSI3_clicked();
|
||||
void on_comboBoxSCSI4_currentIndexChanged(int index);
|
||||
void on_pushButtonSCSI4_clicked();
|
||||
|
||||
void on_checkBoxLbaEnhancer_stateChanged(int arg1);
|
||||
|
||||
void on_pushButtonConfigureLbaEnhancer_clicked();
|
||||
|
||||
private:
|
||||
|
||||
@@ -29,47 +29,12 @@
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<widget class="QLabel" name="labelHD">
|
||||
<property name="text">
|
||||
<string>HD Controller:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="pushButtonFD">
|
||||
<property name="text">
|
||||
<string>Configure</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>FD Controller:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>CD-ROM Controller:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="comboBoxCDInterface">
|
||||
<property name="maxVisibleItems">
|
||||
<number>30</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QPushButton" name="pushButtonCDInterface">
|
||||
<property name="text">
|
||||
<string>Configure</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="comboBoxHD">
|
||||
<property name="sizePolicy">
|
||||
@@ -90,6 +55,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="labelFD">
|
||||
<property name="text">
|
||||
<string>FD Controller:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="comboBoxFD">
|
||||
<property name="maxVisibleItems">
|
||||
@@ -97,6 +69,34 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="pushButtonFD">
|
||||
<property name="text">
|
||||
<string>Configure</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="labelCDInterface">
|
||||
<property name="text">
|
||||
<string>CD-ROM Controller:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="comboBoxCDInterface">
|
||||
<property name="maxVisibleItems">
|
||||
<number>30</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QPushButton" name="pushButtonCDInterface">
|
||||
<property name="text">
|
||||
<string>Configure</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QCheckBox" name="checkBoxTertiaryIDE">
|
||||
<property name="text">
|
||||
@@ -104,13 +104,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QCheckBox" name="checkBoxQuaternaryIDE">
|
||||
<property name="text">
|
||||
<string>Quaternary IDE Controller</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="QPushButton" name="pushButtonTertiaryIDE">
|
||||
<property name="enabled">
|
||||
@@ -121,6 +114,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QCheckBox" name="checkBoxQuaternaryIDE">
|
||||
<property name="text">
|
||||
<string>Quaternary IDE Controller</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<widget class="QPushButton" name="pushButtonQuaternaryIDE">
|
||||
<property name="enabled">
|
||||
@@ -134,29 +134,15 @@
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<widget class="QGroupBox" name="groupBoxSCSI">
|
||||
<property name="title">
|
||||
<string>SCSI</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="1" column="3">
|
||||
<widget class="QPushButton" name="pushButtonSCSI2">
|
||||
<layout class="QGridLayout" name="gridLayoutSCSI">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="labelSCSI1">
|
||||
<property name="text">
|
||||
<string>Configure</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="3">
|
||||
<widget class="QPushButton" name="pushButtonSCSI4">
|
||||
<property name="text">
|
||||
<string>Configure</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Controller 3:</string>
|
||||
<string>Controller 1:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -180,6 +166,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="labelSCSI2">
|
||||
<property name="text">
|
||||
<string>Controller 2:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QComboBox" name="comboBoxSCSI2">
|
||||
<property name="sizePolicy">
|
||||
@@ -193,6 +186,20 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QPushButton" name="pushButtonSCSI2">
|
||||
<property name="text">
|
||||
<string>Configure</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="labelSCSI3">
|
||||
<property name="text">
|
||||
<string>Controller 3:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QComboBox" name="comboBoxSCSI3">
|
||||
<property name="sizePolicy">
|
||||
@@ -206,6 +213,20 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<widget class="QPushButton" name="pushButtonSCSI3">
|
||||
<property name="text">
|
||||
<string>Configure</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="labelSCSI4">
|
||||
<property name="text">
|
||||
<string>Controller 4:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="QComboBox" name="comboBoxSCSI4">
|
||||
<property name="sizePolicy">
|
||||
@@ -219,29 +240,8 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Controller 1:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Controller 2:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Controller 4:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<widget class="QPushButton" name="pushButtonSCSI3">
|
||||
<item row="3" column="3">
|
||||
<widget class="QPushButton" name="pushButtonSCSI4">
|
||||
<property name="text">
|
||||
<string>Configure</string>
|
||||
</property>
|
||||
|
||||
Reference in New Issue
Block a user