From 473b28e10956e022b8c809a09283f3581af917a2 Mon Sep 17 00:00:00 2001 From: Pavel Pisa Date: Tue, 25 Jun 2019 23:12:22 +0200 Subject: Allow to create simulator without loaded executable. This allows to test simple instruction sequences without need to install compiler. Signed-off-by: Pavel Pisa --- qtmips_gui/newdialog.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'qtmips_gui/newdialog.cpp') diff --git a/qtmips_gui/newdialog.cpp b/qtmips_gui/newdialog.cpp index 67d3f1d..0e1c5dc 100644 --- a/qtmips_gui/newdialog.cpp +++ b/qtmips_gui/newdialog.cpp @@ -52,6 +52,7 @@ NewDialog::NewDialog(QWidget *parent, QSettings *settings) : QDialog(parent) { ui_cache_d = new Ui::NewDialogCache(); ui_cache_d->setupUi(ui->tab_cache_data); + connect(ui->pushButton_start_empty, SIGNAL(clicked(bool)), this, SLOT(create_empty())); connect(ui->pushButton_load, SIGNAL(clicked(bool)), this, SLOT(create())); connect(ui->pushButton_cancel, SIGNAL(clicked(bool)), this, SLOT(cancel())); connect(ui->pushButton_browse, SIGNAL(clicked(bool)), this, SLOT(browse_elf())); @@ -136,6 +137,14 @@ void NewDialog::create() { this->close(); } +void NewDialog::create_empty() { + MainWindow *prnt = (MainWindow*)parent(); + prnt->create_core(*config, false); + store_settings(); // Save to settings + this->close(); +} + + void NewDialog::browse_elf() { QFileDialog elf_dialog(this); elf_dialog.setFileMode(QFileDialog::ExistingFile); -- cgit v1.2.3