diff options
author | Karel Kočí <cynerd@email.cz> | 2018-01-05 16:24:29 +0100 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2018-01-05 16:30:23 +0100 |
commit | 6528cdb58abcbe432dd387d565c9a1157f90795a (patch) | |
tree | b686944f40fca86523435320369d9bbf73cb709f /qtmips_gui/mainwindow.cpp | |
parent | 799dcddc2420ce1450ac2bdd0d69bccf4a2f2e1f (diff) | |
download | qtmips-6528cdb58abcbe432dd387d565c9a1157f90795a.tar.gz qtmips-6528cdb58abcbe432dd387d565c9a1157f90795a.tar.bz2 qtmips-6528cdb58abcbe432dd387d565c9a1157f90795a.zip |
Implement initial dialog for program memory dock
I am missing memory view for now.
Diffstat (limited to 'qtmips_gui/mainwindow.cpp')
-rw-r--r-- | qtmips_gui/mainwindow.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/qtmips_gui/mainwindow.cpp b/qtmips_gui/mainwindow.cpp index d1a9770..92d1a74 100644 --- a/qtmips_gui/mainwindow.cpp +++ b/qtmips_gui/mainwindow.cpp @@ -14,12 +14,14 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) { this->setCentralWidget(coreview); // Create/prepare other widgets ndialog = new NewDialog(this, settings); + registers = new RegistersDock(this); + registers->hide(); + program = new ProgramDock(this); + program->hide(); cache_content = new CacheContentDock(this); cache_content->hide(); cache_statictics = new CacheStatisticsDock(this); cache_statictics->hide(); - registers = new RegistersDock(this); - registers->hide(); // Execution speed actions speed_group = new QActionGroup(this); @@ -32,9 +34,10 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) { // Connect signals from menu connect(ui->actionExit, SIGNAL(triggered(bool)), this, SLOT(close())); connect(ui->actionNew, SIGNAL(triggered(bool)), this, SLOT(new_machine())); + connect(ui->actionRegisters, SIGNAL(triggered(bool)), this, SLOT(show_registers())); + connect(ui->actionProgram_memory, SIGNAL(triggered(bool)), this, SLOT(show_program())); connect(ui->actionCache, SIGNAL(triggered(bool)), this, SLOT(show_cache_content())); connect(ui->actionCache_statistics, SIGNAL(triggered(bool)), this, SLOT(show_cache_statictics())); - connect(ui->actionRegisters, SIGNAL(triggered(bool)), this, SLOT(show_registers())); connect(ui->ips1, SIGNAL(toggled(bool)), this, SLOT(set_speed())); connect(ui->ips5, SIGNAL(toggled(bool)), this, SLOT(set_speed())); connect(ui->ips10, SIGNAL(toggled(bool)), this, SLOT(set_speed())); @@ -88,6 +91,7 @@ void MainWindow::create_core(machine::MachineConfig *config) { // Setup docks registers->setup(machine); + program->setup(machine); // Set status to ready machine_status(machine::QtMipsMachine::ST_READY); } @@ -112,6 +116,10 @@ void MainWindow::show_registers() { show_dockwidget(registers); } +void MainWindow::show_program() { + show_dockwidget(program); +} + void MainWindow::set_speed() { if (machine == nullptr) return; // just ignore |