From 04711c38519b5526b0c74fe6a31cd84cab925bd5 Mon Sep 17 00:00:00 2001 From: Doug Brown Date: Fri, 25 May 2012 22:38:14 -0700 Subject: [PATCH] Added about box with version info/licensing/credits. Inserted GPL license header into source code. --- ROMSIMMFlasher.pro | 12 ++-- aboutbox.cpp | 52 ++++++++++++++ aboutbox.h | 44 ++++++++++++ aboutbox.ui | 170 +++++++++++++++++++++++++++++++++++++++++++++ main.cpp | 19 +++++ mainwindow.cpp | 25 +++++++ mainwindow.h | 21 ++++++ mainwindow.ui | 24 ++++--- programmer.cpp | 19 +++++ programmer.h | 19 +++++ version.h | 31 +++++++++ 11 files changed, 423 insertions(+), 13 deletions(-) create mode 100644 aboutbox.cpp create mode 100644 aboutbox.h create mode 100644 aboutbox.ui create mode 100644 version.h diff --git a/ROMSIMMFlasher.pro b/ROMSIMMFlasher.pro index 6283dbc..6152002 100644 --- a/ROMSIMMFlasher.pro +++ b/ROMSIMMFlasher.pro @@ -6,18 +6,22 @@ QT += core gui -TARGET = ROMSIMMFlasher +TARGET = SIMMProgrammer TEMPLATE = app SOURCES += main.cpp\ mainwindow.cpp \ - programmer.cpp + programmer.cpp \ + aboutbox.cpp HEADERS += mainwindow.h \ - programmer.h + programmer.h \ + aboutbox.h \ + version.h -FORMS += mainwindow.ui +FORMS += mainwindow.ui \ + aboutbox.ui include(../doug-qextserialport-linuxnotifications/src/qextserialport.pri) diff --git a/aboutbox.cpp b/aboutbox.cpp new file mode 100644 index 0000000..c3f2fdb --- /dev/null +++ b/aboutbox.cpp @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2011-2012 Doug Brown + * + * 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 "aboutbox.h" +#include "ui_aboutbox.h" +#include "version.h" + +AboutBox *AboutBox::instance() +{ + // Singleton about box + static AboutBox *_instance = NULL; + if (!_instance) + { + _instance = new AboutBox(); + } + return _instance; +} + +AboutBox::AboutBox(QWidget *parent) : + QDialog(parent), + ui(new Ui::AboutBox) +{ + ui->setupUi(this); + + ui->versionLabel->setText("Version " VERSION_STRING); +} + +AboutBox::~AboutBox() +{ + delete ui; +} + +void AboutBox::on_buttonBox_accepted() +{ + this->close(); +} diff --git a/aboutbox.h b/aboutbox.h new file mode 100644 index 0000000..fec1ae9 --- /dev/null +++ b/aboutbox.h @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2011-2012 Doug Brown + * + * 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. + * + */ + +#ifndef ABOUTBOX_H +#define ABOUTBOX_H + +#include + +namespace Ui { +class AboutBox; +} + +class AboutBox : public QDialog +{ + Q_OBJECT + +public: + static AboutBox *instance(); +private slots: + void on_buttonBox_accepted(); + +private: + Ui::AboutBox *ui; + explicit AboutBox(QWidget *parent = 0); + ~AboutBox(); +}; + +#endif // ABOUTBOX_H diff --git a/aboutbox.ui b/aboutbox.ui new file mode 100644 index 0000000..360ac5e --- /dev/null +++ b/aboutbox.ui @@ -0,0 +1,170 @@ + + + AboutBox + + + + 0 + 0 + 400 + 300 + + + + About SIMM Programmer + + + + + + + 75 + true + + + + Mac ROM SIMM Programmer + + + true + + + + + + + Version 0.0.0 + + + true + + + + + + + By <a href="http://www.downtowndougbrown.com/">Doug Brown</a> (<a href="mailto:macg3@mac.com">macg3@mac.com</a>) + + + true + + + true + + + + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">See <a href="http://68kmla.org/forums/viewtopic.php?f=29&amp;t=16544"><span style=" text-decoration: underline; color:#0000ff;">http://68kmla.org/forums/viewtopic.php?f=29&amp;t=16544</span></a> for more information about this project and its history.</p></body></html> + + + true + + + true + + + + + + + Qt::Horizontal + + + + + + + Credits and licensing: + + + + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">This program is licensed under the terms of the </span><a href="http://www.gnu.org/licenses/gpl-2.0.html"><span style=" font-size:8pt; text-decoration: underline; color:#0000ff;">GNU General Public License version 2</span></a><span style=" font-size:8pt;">. Code is available </span><a href="http://code.google.com/p/mac-rom-simm-programmer/"><span style=" font-size:8pt; text-decoration: underline; color:#0000ff;">here</span></a><span style=" font-size:8pt;">.</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">It also uses the following libraries:</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">• </span><a href="http://qt.nokia.com/"><span style=" font-size:8pt; text-decoration: underline; color:#0000ff;">Qt</span></a><span style=" font-size:8pt;"> -- for excellent cross-platform user interface compatibility</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:15px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">The Qt GUI Toolkit is Copyright © 2012 Nokia Corporation and/or its subsidiary(-ies).</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:15px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Contact: Nokia Corporation (</span><a href="qt-info@nokia.com"><span style=" font-size:8pt; text-decoration: underline; color:#0000ff;">qt-info@nokia.com</span></a><span style=" font-size:8pt;">)</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:15px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:15px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Qt is licensed under the </span><a href="http://www.gnu.org/licenses/lgpl-2.1.html"><span style=" font-size:8pt; text-decoration: underline; color:#0000ff;">GNU Lesser General Public License version 2.1</span></a><span style=" font-size:8pt;">.</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">• </span><a href="http://code.google.com/p/qextserialport/"><span style=" font-size:8pt; text-decoration: underline; color:#0000ff;">QextSerialPort</span></a><span style=" font-size:8pt;"> -- for communication with the SIMM programmer board (note: I use a custom version of it available at </span><a href="http://code.google.com/r/doug-qextserialport-linuxnotifications/"><span style=" font-size:8pt; text-decoration: underline; color:#0000ff;">this location</span></a><span style=" font-size:8pt;">):</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:15px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Copyright © 2000-2003 Wayne Roth</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:15px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Copyright © 2004-2007 Stefan Sander</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:15px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Copyright © 2007 Michal Policht</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:15px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Copyright © 2008 Brandon Fosdick</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:15px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Copyright © 2009-2010 Liam Staskawicz</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:15px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Copyright © 2011 Debao Zhang</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">• The programmer board firmware uses </span><a href="http://www.fourwalledcubicle.com/LUFA.php"><span style=" font-size:8pt; text-decoration: underline; color:#0000ff;">LUFA</span></a><span style=" font-size:8pt;"> for its USB communication:</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:15px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Copyright © Dean Camera, 2012</span></p></body></html> + + + true + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Ok + + + + + + + + + buttonBox + accepted() + AboutBox + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + AboutBox + reject() + + + 316 + 260 + + + 286 + 274 + + + + + diff --git a/main.cpp b/main.cpp index d951345..c58e6fa 100644 --- a/main.cpp +++ b/main.cpp @@ -1,3 +1,22 @@ +/* + * Copyright (C) 2011-2012 Doug Brown + * + * 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 #include "mainwindow.h" diff --git a/mainwindow.cpp b/mainwindow.cpp index 05516c2..544e6d7 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1,6 +1,26 @@ +/* + * Copyright (C) 2011-2012 Doug Brown + * + * 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 "mainwindow.h" #include "ui_mainwindow.h" #include "programmer.h" +#include "aboutbox.h" #include #include #include @@ -655,3 +675,8 @@ void MainWindow::on_simmCapacityBox_currentIndexChanged(int index) uint32_t newCapacity = (uint32_t)ui->simmCapacityBox->itemData(index).toUInt(); p->setSIMMCapacity(newCapacity); } + +void MainWindow::on_actionAbout_SIMM_Programmer_triggered() +{ + AboutBox::instance()->show(); +} diff --git a/mainwindow.h b/mainwindow.h index a6f534b..cd04ba8 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -1,3 +1,22 @@ +/* + * Copyright (C) 2011-2012 Doug Brown + * + * 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. + * + */ + #ifndef MAINWINDOW_H #define MAINWINDOW_H @@ -58,6 +77,8 @@ private slots: void on_simmCapacityBox_currentIndexChanged(int index); + void on_actionAbout_SIMM_Programmer_triggered(); + private: Ui::MainWindow *ui; bool writeFileValid; diff --git a/mainwindow.ui b/mainwindow.ui index 4d5ec20..39139cf 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -305,18 +305,16 @@ + + + Help + + + + - - - TopToolBarArea - - - false - - - Quit @@ -330,6 +328,14 @@ Update firmware... + + + About SIMM Programmer... + + + QAction::AboutRole + + diff --git a/programmer.cpp b/programmer.cpp index 9f07589..309338d 100644 --- a/programmer.cpp +++ b/programmer.cpp @@ -1,3 +1,22 @@ +/* + * Copyright (C) 2011-2012 Doug Brown + * + * 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 "programmer.h" #include #include diff --git a/programmer.h b/programmer.h index f4c6c1d..ed99f86 100644 --- a/programmer.h +++ b/programmer.h @@ -1,3 +1,22 @@ +/* + * Copyright (C) 2011-2012 Doug Brown + * + * 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. + * + */ + #ifndef PROGRAMMER_H #define PROGRAMMER_H diff --git a/version.h b/version.h new file mode 100644 index 0000000..0867176 --- /dev/null +++ b/version.h @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2011-2012 Doug Brown + * + * 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. + * + */ + +#ifndef VERSION_H +#define VERSION_H + +#define VERSION_MAJOR 1 +#define VERSION_MINOR 0 +#define VERSION_REVISION 0 + +#define STRINGIFY_GUTS(x) #x +#define STRINGIFY(x) STRINGIFY_GUTS(x) +#define VERSION_STRING STRINGIFY(VERSION_MAJOR) "." STRINGIFY(VERSION_MINOR) "." STRINGIFY(VERSION_REVISION) + +#endif // VERSION_H