diff --git a/qt5_src/Bootloader/Bootloader.pro b/qt5_src/Bootloader/Bootloader.pro index 4cc8c72..04c78e2 100644 --- a/qt5_src/Bootloader/Bootloader.pro +++ b/qt5_src/Bootloader/Bootloader.pro @@ -1,4 +1,4 @@ -TARGET = "HIDBootloader" +TARGET = "pic_fw_flash_tool" TEMPLATE = app QT += sql QT += widgets diff --git a/qt5_src/Bootloader/MainWindow.cpp b/qt5_src/Bootloader/MainWindow.cpp index d44d4c6..569cffa 100644 --- a/qt5_src/Bootloader/MainWindow.cpp +++ b/qt5_src/Bootloader/MainWindow.cpp @@ -99,18 +99,11 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi ui->setupUi(this); setWindowTitle(APPLICATION + QString(" v") + VERSION); + ui->menuBar->setVisible(false); + ui->mainToolBar->setToolButtonStyle( Qt::ToolButtonTextBesideIcon ); + QSettings settings; settings.beginGroup("MainWindow"); - fileName = settings.value("fileName").toString(); - - for(i = 0; i < MAX_RECENT_FILES; i++) - { - recentFiles[i] = new QAction(this); - connect(recentFiles[i], SIGNAL(triggered()), this, SLOT(openRecentFile())); - recentFiles[i]->setVisible(false); - ui->menuFile->insertAction(ui->actionExit, recentFiles[i]); - } - ui->menuFile->insertSeparator(ui->actionExit); settings.endGroup(); @@ -377,7 +370,7 @@ void MainWindow::setBootloadEnabled(bool enable) ui->actionWrite_Device->setEnabled(enable && hexOpen); ui->actionExit->setEnabled(enable); ui->action_Verify_Device->setEnabled(enable && hexOpen); - ui->actionOpen->setEnabled(enable); + //ui->actionOpen->setEnabled(enable); ui->actionBlank_Check->setEnabled(enable && !writeConfig); ui->actionReset_Device->setEnabled(enable); } @@ -400,17 +393,12 @@ void MainWindow::setBootloadBusy(bool busy) ui->actionWrite_Device->setEnabled(!busy && hexOpen); ui->actionExit->setEnabled(!busy); ui->action_Verify_Device->setEnabled(!busy && hexOpen); - ui->actionOpen->setEnabled(!busy); + ui->btnFwBrowse->setEnabled(!busy); ui->action_Settings->setEnabled(!busy); ui->actionBlank_Check->setEnabled(!busy && !writeConfig); ui->actionReset_Device->setEnabled(!busy); } -void MainWindow::on_actionExit_triggered() -{ - QApplication::exit(); -} - void MainWindow::IoWithDeviceStart(QString msg) { ui->plainTextEdit->appendPlainText(msg); @@ -1044,7 +1032,7 @@ void MainWindow::EraseDevice(void) } //Executes when the user clicks the open hex file button on the main form. -void MainWindow::on_actionOpen_triggered() +void MainWindow::on_btnFwBrowse_clicked() { QString msg, newFileName; QTextStream stream(&msg); @@ -1354,6 +1342,7 @@ void MainWindow::GetQuery() case Device::PIC16: device->bytesPerWordFLASH = 2; device->bytesPerAddressFLASH = 2; + break; default: device->bytesPerWordFLASH = 2; device->bytesPerAddressFLASH = 1; diff --git a/qt5_src/Bootloader/MainWindow.h b/qt5_src/Bootloader/MainWindow.h index fbca241..e871f96 100644 --- a/qt5_src/Bootloader/MainWindow.h +++ b/qt5_src/Bootloader/MainWindow.h @@ -122,9 +122,8 @@ private slots: void on_action_Verify_Device_triggered(); void on_action_About_triggered(); void on_actionWrite_Device_triggered(); - void on_actionOpen_triggered(); + void on_btnFwBrowse_clicked(); void on_actionErase_Device_triggered(); - void on_actionExit_triggered(); }; #endif // MAINWINDOW_H diff --git a/qt5_src/Bootloader/MainWindow.ui b/qt5_src/Bootloader/MainWindow.ui index 6ef8836..a734fbb 100644 --- a/qt5_src/Bootloader/MainWindow.ui +++ b/qt5_src/Bootloader/MainWindow.ui @@ -7,7 +7,7 @@ 0 0 439 - 403 + 653 @@ -24,25 +24,181 @@ :/MainWindow/img/Microchip_logo.Ico:/MainWindow/img/Microchip_logo.Ico - - - - - 0 + + + + + + 10 + - - false + + Select Firmware File - + + + + + + background-color: rgb(200,200,200); +color: rgb(100,100,100); + + + more bingbus XD + + + true + + + + + + + Browse + + + + + + + + + Qt::Horizontal + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 20 + + + + + + + + + 10 + 50 + false + false + + + + Tool Status + + + + + + + Qt::Horizontal + + + + + + + 40 + + + + + Firmware + + + + + + + background-color: rgb(255, 0, 0); + + + NO FW FILE LOADED + + + Qt::AlignCenter + + + 2 + + + + + + + Device + + + + + + + background-color: rgb(255, 0, 0); + + + NOT DETECTED + + + Qt::AlignCenter + + + 2 + + + -1 + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 20 + + + + + + + + + 10 + + + + Tool Operation + + + + Qt::Horizontal - + @@ -55,6 +211,90 @@ + + + + 0 + + + false + + + + + + + false + + + + 0 + 0 + + + + + 0 + 60 + + + + + 14 + 75 + true + + + + FLASH FIRMWARE + + + + + + + Qt::Horizontal + + + + + + + false + + + + 0 + 0 + + + + + 0 + 20 + + + + Reset Device Normally + + + + + + + false + + + + 0 + 20 + + + + Reset Device into FW Update Mode + + + @@ -63,18 +303,13 @@ 0 0 439 - 19 + 26 - - - &File - - - - - + + true + &Program @@ -93,7 +328,6 @@ - @@ -114,7 +348,6 @@ false - @@ -122,32 +355,6 @@ - - - false - - - - :/MainWindow/img/open.png:/MainWindow/img/open.png - - - &Import Firmware Image - - - Import Firmware Image - - - Ctrl+O - - - - - E&xit - - - Ctrl+Q - - false diff --git a/qt5_src/Bootloader/main.cpp b/qt5_src/Bootloader/main.cpp index d018980..ffae237 100644 --- a/qt5_src/Bootloader/main.cpp +++ b/qt5_src/Bootloader/main.cpp @@ -34,9 +34,9 @@ int main(int argc, char *argv[]) { QApplication a(argc, argv); - QCoreApplication::setOrganizationName("Microchip"); - QCoreApplication::setOrganizationDomain("microchip.com"); - QCoreApplication::setApplicationName("USB HID Bootloader"); + QCoreApplication::setOrganizationName("JOJCorp"); + QCoreApplication::setOrganizationDomain("source.jojcorp.com"); + QCoreApplication::setApplicationName("Dancepad Interface FW Flash Tool"); MainWindow w; w.show();