aboutsummaryrefslogtreecommitdiff
path: root/qtmips_gui/mainwindow.cpp
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2018-01-05 16:24:29 +0100
committerKarel Kočí <cynerd@email.cz>2018-01-05 16:30:23 +0100
commit6528cdb58abcbe432dd387d565c9a1157f90795a (patch)
treeb686944f40fca86523435320369d9bbf73cb709f /qtmips_gui/mainwindow.cpp
parent799dcddc2420ce1450ac2bdd0d69bccf4a2f2e1f (diff)
downloadqtmips-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.cpp14
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