diff options
| author | Pavel Pisa <pisa@cmp.felk.cvut.cz> | 2019-02-13 13:18:17 +0100 | 
|---|---|---|
| committer | Pavel Pisa <pisa@cmp.felk.cvut.cz> | 2019-02-13 13:18:17 +0100 | 
| commit | 9f1ddc2b38469d5028aec5ba7b68131d711f2622 (patch) | |
| tree | f0e872c7337e08082ceed731b18d72473ea6ed44 /qtmips_gui/mainwindow.cpp | |
| parent | 04ab3211f8a052e7f0a05b36206403197e526284 (diff) | |
| download | qtmips-9f1ddc2b38469d5028aec5ba7b68131d711f2622.tar.gz qtmips-9f1ddc2b38469d5028aec5ba7b68131d711f2622.tar.bz2 qtmips-9f1ddc2b38469d5028aec5ba7b68131d711f2622.zip  | |
Add simple about dialog and prepare menu entries for serial port and peripherals.
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Diffstat (limited to 'qtmips_gui/mainwindow.cpp')
| -rw-r--r-- | qtmips_gui/mainwindow.cpp | 14 | 
1 files changed, 14 insertions, 0 deletions
diff --git a/qtmips_gui/mainwindow.cpp b/qtmips_gui/mainwindow.cpp index 6c752f0..4e716cb 100644 --- a/qtmips_gui/mainwindow.cpp +++ b/qtmips_gui/mainwindow.cpp @@ -34,6 +34,7 @@   ******************************************************************************/  #include "mainwindow.h" +#include "aboutdialog.h"  MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) {      machine = nullptr; @@ -79,6 +80,8 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) {      connect(ui->actionMemory, SIGNAL(triggered(bool)), this, SLOT(show_memory()));      connect(ui->actionProgram_Cache, SIGNAL(triggered(bool)), this, SLOT(show_cache_program()));      connect(ui->actionData_Cache, SIGNAL(triggered(bool)), this, SLOT(show_cache_data())); +    connect(ui->actionAbout, SIGNAL(triggered(bool)), this, SLOT(about_qtmips())); +    connect(ui->actionAboutQt, SIGNAL(triggered(bool)), this, SLOT(about_qt()));      connect(ui->ips1, SIGNAL(toggled(bool)), this, SLOT(set_speed()));      connect(ui->ips2, SIGNAL(toggled(bool)), this, SLOT(set_speed()));      connect(ui->ips5, SIGNAL(toggled(bool)), this, SLOT(set_speed())); @@ -210,6 +213,17 @@ SHOW_HANDLER(cache_program)  SHOW_HANDLER(cache_data)  #undef SHOW_HANDLER +void MainWindow::about_qtmips() +{ +    AboutDialog *aboutdialog = new AboutDialog(this); +    aboutdialog->exec(); +} + +void MainWindow::about_qt() +{ +    QMessageBox::aboutQt(this); +} +  void MainWindow::set_speed() {      if (machine == nullptr)          return; // just ignore  | 
