Skip to content

Commit

Permalink
Added dynamic polling of the programmer status (connected / not conne…
Browse files Browse the repository at this point in the history
…cted).
  • Loading branch information
bigbigmdm committed Feb 26, 2024
1 parent ecb34aa commit 68c8dfc
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 0 deletions.
6 changes: 6 additions & 0 deletions IMSProg_programmer/dialogsfdp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -387,3 +387,9 @@ void DialogSFDP::r1Enable()
ui->lineEdit_sr17->setDisabled(false);
ui->label_11->setDisabled(false);
}

void DialogSFDP::closeEvent(QCloseEvent* event)
{
emit closeRequestHasArrived();
QWidget::closeEvent(event);
}
4 changes: 4 additions & 0 deletions IMSProg_programmer/dialogsfdp.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class DialogSFDP : public QDialog
public:
explicit DialogSFDP(QWidget *parent = nullptr);
~DialogSFDP();
void closeEvent(QCloseEvent* event);

private slots:
void on_pushButton_clicked();
Expand All @@ -40,6 +41,9 @@ private slots:
void r1Disable();
void r1Enable();

signals:
void closeRequestHasArrived();

private:
Ui::DialogSFDP *ui;
QString bP(unsigned char z);
Expand Down
11 changes: 11 additions & 0 deletions IMSProg_programmer/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1247,6 +1247,7 @@ void MainWindow::doNotDisturb()
ui->actionSave_Part->setDisabled(true);
ui->actionExport_to_Intel_HEX->setDisabled(true);
ui->actionImport_from_Intel_HEX->setDisabled(true);
ui->actionExtract_from_ASUS_CAP->setDisabled(true);
ui->actionEdit_chips_Database->setDisabled(true);
ui->actionExit->setDisabled(true);
ui->actionRead->setDisabled(true);
Expand Down Expand Up @@ -1284,6 +1285,7 @@ void MainWindow::doNotDisturbCancel()
ui->actionSave_Part->setDisabled(false);
ui->actionExport_to_Intel_HEX->setDisabled(false);
ui->actionImport_from_Intel_HEX->setDisabled(false);
ui->actionExtract_from_ASUS_CAP->setDisabled(false);
ui->actionEdit_chips_Database->setDisabled(false);
ui->actionExit->setDisabled(false);
ui->actionRead->setDisabled(false);
Expand Down Expand Up @@ -1340,8 +1342,12 @@ void MainWindow::on_pushButton_4_clicked()

void MainWindow::on_actionChip_info_triggered()
{
timer->stop();
DialogSFDP* sfdpDialog = new DialogSFDP();
connect(sfdpDialog, SIGNAL(closeRequestHasArrived()), this, SLOT(closeSFDP()));
sfdpDialog->show();


}

void MainWindow::progInit()
Expand Down Expand Up @@ -1483,6 +1489,11 @@ void MainWindow::resizeEvent(QResizeEvent* event)
QMainWindow::resizeEvent(event);
hexEdit->setGeometry(0,0,ui->frame->width(),ui->frame->height());
}

void MainWindow::closeSFDP()
{
timer->start();
}
//*****************************************************
// HEX ULTLITY by Mikhail Medvedev
//*****************************************************
Expand Down
1 change: 1 addition & 0 deletions IMSProg_programmer/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public slots:

void receiveAddr(QString);
void receiveAddr2(QString);
void closeSFDP();

private slots:
void progInit();
Expand Down

0 comments on commit 68c8dfc

Please sign in to comment.