aboutsummaryrefslogtreecommitdiff
path: root/qtmips_gui/aboutdialog.cpp
diff options
context:
space:
mode:
authorPavel Pisa <pisa@cmp.felk.cvut.cz>2019-02-13 13:18:17 +0100
committerPavel Pisa <pisa@cmp.felk.cvut.cz>2019-02-13 13:18:17 +0100
commit9f1ddc2b38469d5028aec5ba7b68131d711f2622 (patch)
treef0e872c7337e08082ceed731b18d72473ea6ed44 /qtmips_gui/aboutdialog.cpp
parent04ab3211f8a052e7f0a05b36206403197e526284 (diff)
downloadqtmips-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/aboutdialog.cpp')
-rw-r--r--qtmips_gui/aboutdialog.cpp133
1 files changed, 133 insertions, 0 deletions
diff --git a/qtmips_gui/aboutdialog.cpp b/qtmips_gui/aboutdialog.cpp
new file mode 100644
index 0000000..83ab1b7
--- /dev/null
+++ b/qtmips_gui/aboutdialog.cpp
@@ -0,0 +1,133 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*******************************************************************************
+ * QtMips - MIPS 32-bit Architecture Subset Simulator
+ *
+ * Implemented to support following courses:
+ *
+ * B35APO - Computer Architectures
+ * https://cw.fel.cvut.cz/wiki/courses/b35apo
+ *
+ * B4M35PAP - Advanced Computer Architectures
+ * https://cw.fel.cvut.cz/wiki/courses/b4m35pap/start
+ *
+ * Copyright (c) 2017-2019 Karel Koci<cynerd@email.cz>
+ * Copyright (c) 2019 Pavel Pisa <pisa@cmp.felk.cvut.cz>
+ *
+ * Faculty of Electrical Engineering (http://www.fel.cvut.cz)
+ * Czech Technical University (http://www.cvut.cz/)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ ******************************************************************************/
+
+#include "aboutdialog.h"
+
+#include <QObject>
+#include <QTabWidget>
+#include <QVBoxLayout>
+#include <QPlainTextEdit>
+#include <QTextBrowser>
+#include <QLabel>
+#include <QPushButton>
+#include <QApplication>
+#include <QDebug>
+
+
+AboutDialog::AboutDialog(QWidget *parent)
+ : QDialog(parent)
+{
+ QLabel *lbl;
+
+ setWindowTitle(tr("About Qt Mips"));
+
+ all = new QVBoxLayout(this);
+
+ QWidget *hbox = new QWidget();
+ QHBoxLayout *hl = new QHBoxLayout(hbox);
+ hl->setContentsMargins(0,0,0,0);
+
+ all->addWidget(hbox);
+
+ QWidget *vbox = new QWidget();
+ QVBoxLayout *vl = new QVBoxLayout(vbox);
+ //vl->setContentsMargins(0,0,0,0);
+ hl->addWidget(vbox);
+
+ QString versionText;
+ versionText = "Version 0.5 \n";
+
+ vl->addWidget(new QLabel("<span style='font-size:x-large; font-weight:bold;'>Qt Mips - MIPS Architecture Simulator</span>"));
+ lbl = new QLabel(versionText);
+ lbl->setAlignment(Qt::AlignHCenter);
+ lbl->setOpenExternalLinks(true);
+ vl->addWidget(lbl);
+ vl->addWidget(new QLabel("Copyright (C) 2017-2019 Karel Kočí "
+ "<a href=\"mailto://cynerd@email.cz\">cynerd@email.cz</a><br/>"
+ "Copyright (C) 2019 Pavel Píša "
+ "<a href=\"mailto://pisa@cmp.felk.cvut.cz\">pisa@cmp.felk.cvut.cz</a>"));
+
+ QString supportText;
+ supportText = "Home Page : <a href=\"https://github.com/ppisa/QtMips\">https://github.com/ppisa/QtMips</a><br/>"
+ "Home Page : <a href=\"https://github.com/Cynerd/QtMips\">https://github.com/Cynerd/QtMips</a><br/>"
+ "Implemented for<br/>"
+ "<a href=\"https://cw.fel.cvut.cz/wiki/courses/b35apo/start\">Computer Architectures</a><br/>"
+ "and<br/>"
+ "<a href=\"https://cw.fel.cvut.cz/wiki/courses/b4m35pap/start\">Advanced Computer Achitectures</a><br/>"
+ "courses at<br/>"
+ "<a href=\"https://www.cvut.cz/\">Czech Technical University in Prague</a><br/>"
+ "<a href=\"https://www.fel.cvut.cz/\">Faculty of Electrical Engineering</a><br/>";
+
+ QTextBrowser *supportBrowser = new QTextBrowser;
+ supportBrowser->setOpenExternalLinks(true);
+ supportBrowser->setHtml(supportText);
+ vl->addWidget(supportBrowser);
+
+ QString licenseText;
+ licenseText = "This program is free software; you can redistribute it and/or\n"
+ "modify it under the terms of the GNU General Public License\n"
+ "as published by the Free Software Foundation; either version 2\n"
+ "of the License, or (at your option) any later version.\n"
+ "<br/>\n"
+ "<br/>\n"
+ "This program is distributed in the hope that it will be useful,\n"
+ "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
+ "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
+ "GNU General Public License for more details.\n"
+ "<br/>\n"
+ "<br/>\n"
+ "You should have received a copy of the GNU General Public License\n"
+ "along with this program; if not, write to the Free Software\n"
+ "Foundation, Inc., 51 Franklin Street, Fifth Floor,\n"
+ "Boston, MA 02110-1301, USA.\n";
+
+ QTextBrowser *licenseBrowser = new QTextBrowser;
+ licenseBrowser->setOpenExternalLinks(true);
+ licenseBrowser->setHtml(licenseText);
+ vl->addWidget(licenseBrowser);
+
+ QWidget *hbBtn = new QWidget();
+ QHBoxLayout *hlBtn = new QHBoxLayout(hbBtn);
+ hlBtn->setContentsMargins(0,0,0,0);
+ vl->addWidget(hbBtn);
+
+ QPushButton *okButton = new QPushButton(tr("&OK"), parent);
+ okButton->setFocus();
+ connect(okButton, SIGNAL(clicked()), this, SLOT(close()));
+ hlBtn->addStretch();
+ hlBtn->addWidget(okButton);
+
+ prevTab = 0; // first Tab is selected by default
+}