From 12c6385f776ba446a4f5f40efb90ecc4da723046 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Du=C5=A1an=20Poizl?= Date: Thu, 21 Apr 2022 17:43:24 +0200 Subject: [PATCH] Add About Dialog and PCL LICENSE --- 3rdparty/PCL_LICENSE | 43 +++++++++++++++++++++++++++++++++++++++++++ CMakeLists.txt | 1 + about.cpp | 31 +++++++++++++++++++++++++++++++ about.h | 12 ++++++++++++ about/pcl | 43 +++++++++++++++++++++++++++++++++++++++++++ about/tenmon | 20 ++++++++++++++++++++ mainwindow.cpp | 5 +++++ resources.qrc | 3 +++ 8 files changed, 158 insertions(+) create mode 100644 3rdparty/PCL_LICENSE create mode 100644 about.cpp create mode 100644 about.h create mode 100644 about/pcl create mode 100644 about/tenmon diff --git a/3rdparty/PCL_LICENSE b/3rdparty/PCL_LICENSE new file mode 100644 index 0000000..fc8acb9 --- /dev/null +++ b/3rdparty/PCL_LICENSE @@ -0,0 +1,43 @@ +******************************************************************************* +PixInsight Class Library License Version 1.0 +******************************************************************************* + +Copyright (c) 2003-2021, Pleiades Astrophoto S.L. All Rights Reserved. + +Redistribution and use in both source and binary forms, with or without +modification, is permitted provided that the following conditions are met: + +1. All redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + +2. All redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +3. Neither the names "PixInsight" and "Pleiades Astrophoto", nor the names of + their contributors, may be used to endorse or promote products derived from + this software without specific prior written permission. For written + permission, please contact info@pixinsight.com. + +4. All products derived from this software, in any form whatsoever, must + reproduce the following acknowledgment in the end-user documentation and/or + other materials provided with the product: + + "This product is based on software from the PixInsight project, developed by + Pleiades Astrophoto and its contributors (https://pixinsight.com/)." + + Alternatively, if that is where third-party acknowledgments normally appear, + this acknowledgment must be reproduced in the product itself. + +THIS SOFTWARE IS PROVIDED BY PLEIADES ASTROPHOTO AND ITS CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL PLEIADES ASTROPHOTO OR ITS CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, BUSINESS INTERRUPTION; PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; AND LOSS OF USE, DATA OR PROFITS) HOWEVER CAUSED +AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +******************************************************************************* diff --git a/CMakeLists.txt b/CMakeLists.txt index ad0db9b..868613f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,6 +21,7 @@ find_library(FITS_LIB cfitsio REQUIRED) find_library(RAW_LIB NAMES raw_r REQUIRED) set(TENMON_SRC + about.cpp database.cpp databaseview.cpp filesystemwidget.cpp diff --git a/about.cpp b/about.cpp new file mode 100644 index 0000000..953b44a --- /dev/null +++ b/about.cpp @@ -0,0 +1,31 @@ +#include "about.h" +#include +#include +#include +#include +#include + +About::About(QWidget *parent) : QDialog(parent) +{ + setWindowTitle(tr("About Tenmon")); + + QVBoxLayout *layout = new QVBoxLayout(this); + QLabel *label = new QLabel(this); + + QFile tenmonText(":/about/tenmon"); + tenmonText.open(QIODevice::ReadOnly); + label->setText(tenmonText.readAll()); + + QTextEdit *pcl = new QTextEdit(this); + QFile pclText(":/about/pcl"); + pclText.open(QIODevice::ReadOnly); + pcl->setText(pclText.readAll()); + pcl->setReadOnly(true); + + QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok); + connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept); + + layout->addWidget(label); + layout->addWidget(pcl); + layout->addWidget(buttonBox); +} diff --git a/about.h b/about.h new file mode 100644 index 0000000..f483c2d --- /dev/null +++ b/about.h @@ -0,0 +1,12 @@ +#ifndef ABOUT_H +#define ABOUT_H + +#include + +class About : public QDialog +{ +public: + About(QWidget *parent = nullptr); +}; + +#endif // ABOUT_H diff --git a/about/pcl b/about/pcl new file mode 100644 index 0000000..fc8acb9 --- /dev/null +++ b/about/pcl @@ -0,0 +1,43 @@ +******************************************************************************* +PixInsight Class Library License Version 1.0 +******************************************************************************* + +Copyright (c) 2003-2021, Pleiades Astrophoto S.L. All Rights Reserved. + +Redistribution and use in both source and binary forms, with or without +modification, is permitted provided that the following conditions are met: + +1. All redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + +2. All redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +3. Neither the names "PixInsight" and "Pleiades Astrophoto", nor the names of + their contributors, may be used to endorse or promote products derived from + this software without specific prior written permission. For written + permission, please contact info@pixinsight.com. + +4. All products derived from this software, in any form whatsoever, must + reproduce the following acknowledgment in the end-user documentation and/or + other materials provided with the product: + + "This product is based on software from the PixInsight project, developed by + Pleiades Astrophoto and its contributors (https://pixinsight.com/)." + + Alternatively, if that is where third-party acknowledgments normally appear, + this acknowledgment must be reproduced in the product itself. + +THIS SOFTWARE IS PROVIDED BY PLEIADES ASTROPHOTO AND ITS CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL PLEIADES ASTROPHOTO OR ITS CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, BUSINESS INTERRUPTION; PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; AND LOSS OF USE, DATA OR PROFITS) HOWEVER CAUSED +AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +******************************************************************************* diff --git a/about/tenmon b/about/tenmon new file mode 100644 index 0000000..e768d5f --- /dev/null +++ b/about/tenmon @@ -0,0 +1,20 @@ + + + +

Tenmon

+Tenmon is FITS/XISF image viewer and converter. It also index FITS keywords.
+Copyright © 2022 Dušan Poizl

+ +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 3 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, see http://www.gnu.org/licenses/. +
diff --git a/mainwindow.cpp b/mainwindow.cpp index a935456..f11797e 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -17,6 +17,7 @@ #include #include "loadrunable.h" #include "markedfiles.h" +#include "about.h" #ifdef __linux__ #include @@ -152,6 +153,10 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) dockMenu->addAction(databaseViewDock->toggleViewAction()); menuBar()->addMenu(dockMenu); + QMenu *helpMenu = menuBar()->addMenu(tr("Help")); + helpMenu->addAction(tr("About Tenmon"), [this]{ About about(this); about.exec(); }); + helpMenu->addAction(tr("About Qt"), [this](){ QMessageBox::aboutQt(this); }); + setupSigterm(); QSettings settings; restoreGeometry(settings.value("mainwindow/geometry").toByteArray()); diff --git a/resources.qrc b/resources.qrc index 407a325..948c66f 100644 --- a/resources.qrc +++ b/resources.qrc @@ -11,5 +11,8 @@ bayer.png org.nou.tenmon.png nuke_a.png + about/tenmon + about/pcl +