add Timings tab to Preferences dialog
This commit is contained in:
parent
5f6f32e2c5
commit
4b9372929b
@ -6,7 +6,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>463</width>
|
||||
<width>330</width>
|
||||
<height>348</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -17,7 +17,7 @@
|
||||
<item>
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tabBusSpeed">
|
||||
<attribute name="title">
|
||||
@ -97,6 +97,74 @@
|
||||
<attribute name="title">
|
||||
<string>Timings</string>
|
||||
</attribute>
|
||||
<layout class="QFormLayout" name="formLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<layout class="QFormLayout" name="formLayout_3">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_1">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_1"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_2"/>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_3"/>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_4"/>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_5"/>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_6"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -64,6 +64,35 @@ PrefDialog::PrefDialog(QWidget *parent, const QString title) :
|
||||
ui->cbxBusSpeedPIC->setCurrentIndex(E2Profile::GetPICSpeed());
|
||||
ui->cbxBusSpeedSDE->setCurrentIndex(E2Profile::GetSDESpeed());
|
||||
ui->cbxBusSpeedMicroWire->setCurrentIndex(E2Profile::GetMicroWireSpeed());
|
||||
|
||||
ui->label_1->setText("Power Up Delay");
|
||||
ui->label_2->setText("SPI Reset pulse");
|
||||
ui->label_3->setText("SPI Delay After Reset");
|
||||
ui->label_4->setText("AT89 Delay After Reset");
|
||||
ui->label_5->setText("AVR Delay After Reset");
|
||||
ui->label_6->setText("JDM Delay Cmd-to-Cmd");
|
||||
|
||||
ui->lineEdit_1->setToolTip("A Delay to let the board Power Up completely (milli sec)");
|
||||
ui->lineEdit_2->setToolTip("Duration of SPI Reset pulse in milli sec");
|
||||
ui->lineEdit_3->setToolTip("Delay for the first command after the reset pulse for SPI devices (milli sec)");
|
||||
ui->lineEdit_4->setToolTip("Delay after reset for AT89xx devices, it increments the SPI delay (milli sec)");
|
||||
ui->lineEdit_5->setToolTip("Delay after reset for AVR devices, it increments the SPI delay (milli sec)");
|
||||
ui->lineEdit_6->setToolTip("Delay between two consecutive commands for JDM interface (micro sec)");
|
||||
|
||||
QValidator *validator = new QIntValidator(1, 999, this);
|
||||
ui->lineEdit_1->setValidator(validator);
|
||||
ui->lineEdit_2->setValidator(validator);
|
||||
ui->lineEdit_3->setValidator(validator);
|
||||
ui->lineEdit_4->setValidator(validator);
|
||||
ui->lineEdit_5->setValidator(validator);
|
||||
ui->lineEdit_6->setValidator(new QIntValidator(100, 10000, this));
|
||||
|
||||
ui->lineEdit_1->setText(QString::number(E2Profile::GetPowerUpDelay()));
|
||||
ui->lineEdit_2->setText(QString::number(E2Profile::GetSPIResetPulse()));
|
||||
ui->lineEdit_3->setText(QString::number(E2Profile::GetSPIDelayAfterReset()));
|
||||
ui->lineEdit_4->setText(QString::number(E2Profile::GetAT89DelayAfterReset()));
|
||||
ui->lineEdit_5->setText(QString::number(E2Profile::GetAVRDelayAfterReset()));
|
||||
ui->lineEdit_6->setText(QString::number(E2Profile::GetJDMCmd2CmdDelay()));
|
||||
}
|
||||
|
||||
PrefDialog::~PrefDialog()
|
||||
@ -79,4 +108,11 @@ void PrefDialog::on_buttonBox_accepted()
|
||||
E2Profile::SetPICSpeed(ui->cbxBusSpeedPIC->currentIndex());
|
||||
E2Profile::SetSDESpeed(ui->cbxBusSpeedSDE->currentIndex());
|
||||
E2Profile::SetMicroWireSpeed(ui->cbxBusSpeedMicroWire->currentIndex());
|
||||
|
||||
E2Profile::SetPowerUpDelay(ui->lineEdit_1->text().toInt());
|
||||
E2Profile::SetSPIResetPulse(ui->lineEdit_2->text().toInt());
|
||||
E2Profile::SetSPIDelayAfterReset(ui->lineEdit_3->text().toInt());
|
||||
E2Profile::SetAT89DelayAfterReset(ui->lineEdit_4->text().toInt());
|
||||
E2Profile::SetAVRDelayAfterReset(ui->lineEdit_5->text().toInt());
|
||||
E2Profile::SetJDMCmd2CmdDelay(ui->lineEdit_6->text().toUInt());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user