Added ability to edit read/write filenames by hand.
This commit is contained in:
parent
97f31bfec4
commit
23b28c2cc7
|
@ -189,7 +189,7 @@ void MainWindow::on_writeToSIMMButton_clicked()
|
|||
void MainWindow::on_chosenWriteFile_textEdited(const QString &newText)
|
||||
{
|
||||
QFileInfo fi(newText);
|
||||
if (fi.exists() && fi.isFile())
|
||||
if (!newText.isEmpty() && fi.exists() && fi.isFile())
|
||||
{
|
||||
ui->writeToSIMMButton->setEnabled(true);
|
||||
writeFileValid = true;
|
||||
|
@ -201,6 +201,21 @@ void MainWindow::on_chosenWriteFile_textEdited(const QString &newText)
|
|||
}
|
||||
}
|
||||
|
||||
void MainWindow::on_chosenReadFile_textEdited(const QString &newText)
|
||||
{
|
||||
QFileInfo fi(newText);
|
||||
if (!newText.isEmpty() && fi.dir().exists())
|
||||
{
|
||||
ui->readFromSIMMButton->setEnabled(true);
|
||||
readFileValid = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->readFromSIMMButton->setEnabled(false);
|
||||
readFileValid = false;
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::programmerWriteStatusChanged(WriteStatus newStatus)
|
||||
{
|
||||
switch (newStatus)
|
||||
|
|
|
@ -46,6 +46,7 @@ private slots:
|
|||
void on_readFromSIMMButton_clicked();
|
||||
|
||||
void on_chosenWriteFile_textEdited(const QString &newText);
|
||||
void on_chosenReadFile_textEdited(const QString &newText);
|
||||
|
||||
void programmerWriteStatusChanged(WriteStatus newStatus);
|
||||
void programmerWriteTotalLengthChanged(uint32_t totalLen);
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
<item>
|
||||
<widget class="QLineEdit" name="chosenWriteFile">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -127,7 +127,7 @@
|
|||
<item>
|
||||
<widget class="QLineEdit" name="chosenReadFile">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
Loading…
Reference in New Issue