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