started modifying ui

This commit is contained in:
2019-08-17 12:33:27 -04:00
parent ac48fd350d
commit ca96a8ecb6
5 changed files with 266 additions and 71 deletions

View File

@@ -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;