diff options
author | Pavel Pisa <pisa@cmp.felk.cvut.cz> | 2019-02-13 11:50:28 +0100 |
---|---|---|
committer | Pavel Pisa <pisa@cmp.felk.cvut.cz> | 2019-02-13 11:50:28 +0100 |
commit | 04ab3211f8a052e7f0a05b36206403197e526284 (patch) | |
tree | 53de0b401f289823a196649e14364987353abda4 /qtmips_gui | |
parent | 86a70c781c7b9a62782b785cec14fb483bdaa761 (diff) | |
download | qtmips-04ab3211f8a052e7f0a05b36206403197e526284.tar.gz qtmips-04ab3211f8a052e7f0a05b36206403197e526284.tar.bz2 qtmips-04ab3211f8a052e7f0a05b36206403197e526284.zip |
Add speed option to run core for time chunks without visualization.
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Diffstat (limited to 'qtmips_gui')
-rw-r--r-- | qtmips_gui/MainWindow.ui | 15 | ||||
-rw-r--r-- | qtmips_gui/mainwindow.cpp | 4 |
2 files changed, 19 insertions, 0 deletions
diff --git a/qtmips_gui/MainWindow.ui b/qtmips_gui/MainWindow.ui index b42b3c5..bdaba23 100644 --- a/qtmips_gui/MainWindow.ui +++ b/qtmips_gui/MainWindow.ui @@ -117,6 +117,7 @@ <addaction name="ips2"/> <addaction name="ips5"/> <addaction name="ips10"/> + <addaction name="ipsMax"/> </widget> <action name="actionNew"> <property name="icon"> @@ -326,6 +327,20 @@ <string>Ctrl+2</string> </property> </action> + <action name="ipsMax"> + <property name="checkable"> + <bool>true</bool> + </property> + <property name="text"> + <string>&Max</string> + </property> + <property name="toolTip"> + <string>Run at maximal speed, skip visualization for 100 msec</string> + </property> + <property name="shortcut"> + <string>Ctrl+M</string> + </property> + </action> </widget> <layoutdefault spacing="6" margin="11"/> <resources> diff --git a/qtmips_gui/mainwindow.cpp b/qtmips_gui/mainwindow.cpp index c4f57f5..6c752f0 100644 --- a/qtmips_gui/mainwindow.cpp +++ b/qtmips_gui/mainwindow.cpp @@ -67,6 +67,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) { speed_group->addAction(ui->ips5); speed_group->addAction(ui->ips10); speed_group->addAction(ui->ipsUnlimited); + speed_group->addAction(ui->ipsMax); ui->ips1->setChecked(true); // Connect signals from menu @@ -83,6 +84,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) { connect(ui->ips5, SIGNAL(toggled(bool)), this, SLOT(set_speed())); connect(ui->ips10, SIGNAL(toggled(bool)), this, SLOT(set_speed())); connect(ui->ipsUnlimited, SIGNAL(toggled(bool)), this, SLOT(set_speed())); + connect(ui->ipsMax, SIGNAL(toggled(bool)), this, SLOT(set_speed())); // Restore application state from settings restoreState(settings->value("windowState").toByteArray()); @@ -220,6 +222,8 @@ void MainWindow::set_speed() { machine->set_speed(200); else if (ui->ips10->isChecked()) machine->set_speed(100); + else if (ui->ipsMax->isChecked()) + machine->set_speed(0, 100); else machine->set_speed(0); } |