diff --git a/aboutbox.cpp b/aboutbox.cpp new file mode 100644 index 0000000..cf4fd6c --- /dev/null +++ b/aboutbox.cpp @@ -0,0 +1,111 @@ +#include "aboutbox.h" +#include "ui_aboutbox.h" + +aboutbox::aboutbox(QWidget *parent) : + QWidget(parent), + ui(new Ui::aboutbox) +{ + ui->setupUi(this); + setWindowTitle("About wfview"); + setWindowIcon(QIcon(":resources/wfview.png")); + + ui->logoBtn->setIcon(QIcon(":resources/wfview.png")); + ui->logoBtn->setStyleSheet("Text-align:left"); + + ui->topText->setText("wfview version 1.1a"); + + QString head = QString(""); + QString copyright = QString("Copyright 2017-2021 Elliott H. Liggett, W6EL. All rights reserved."); + QString nacode = QString("

Networking and audio code written by Phil Taylor, M0VSE"); + QString doctest = QString("

Testing, documentation, bug fixes, and development mentorship from
Roeland Jansen, PA3MET, and Jim Nijkamp, PA8E."); + + + QString ssCredit = QString("

Stylesheet qdarkstyle used under MIT license, stored in /usr/share/wfview/stylesheets/."); + + QString website = QString("

Please visit https://wfview.org/ for the latest information."); + QString docs = QString("

Be sure to check the User Manual and the Forum if you have any questions."); + QString support = QString("

For support, please visit the official wfview support forum."); + QString gitcodelink = QString("").arg(GITSHORT); + + QString contact = QString("
email W6EL: kilocharlie8@gmail.com"); + + QString buildInfo = QString("

Build " + gitcodelink + QString(GITSHORT) + "
on " + QString(__DATE__) + " at " + __TIME__ + " by " + UNAME + "@" + HOST); + QString end = QString(""); + + // Short credit strings: + QString rsCredit = QString("

Speex Resample library Copyright 2003-2008 Jean-Marc Valin"); +#if defined(RTAUDIO) + QString rtaudiocredit = QString("

RT Audio, from Gary P. Scavone"); +#endif + +#if defined(PORTAUDIO) + QString portaudiocredit = QString("

Port Audio, from The Port Audio Community"); +#endif + + QString qcpcredit = QString("

The waterfall and spectrum plot graphics use QCustomPlot, from Emanuel Eichhammer"); + QString qtcredit = QString("

This copy of wfview was built against Qt version %1").arg(QT_VERSION_STR); + + // Acknowledgement: + QString wfviewcommunityack = QString("

The developers of wfview wish to thank the many contributions from the wfview community at-large, including ideas, bug reports, and fixes."); + QString kappanhangack = QString("

Special thanks to Norbert Varga, and the nonoo/kappanhang team for their initial work on the OEM protocol."); + + QString sxcreditcopyright = QString("Speex copyright notice:\ +Copyright (C) 2003 Jean-Marc Valin\n\ +Redistribution and use in source and binary forms, with or without\ +modification, are permitted provided that the following conditions\ +are met:\n\ +- Redistributions of source code must retain the above copyright\ +notice, this list of conditions and the following disclaimer.\n\ +- 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.\n\ +- Neither the name of the Xiph.org Foundation nor the names of its\ +contributors may be used to endorse or promote products derived from\ +this software without specific prior written permission.\n\ +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE FOUNDATION OR\ +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\ +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\ +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\ +PROFITS; OR BUSINESS INTERRUPTION) 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."); + + + // String it all together: + + QString aboutText = head + copyright + "\n" + nacode + "\n" + doctest + wfviewcommunityack; + aboutText.append(website + "\n"+ docs + support + contact +"\n"); + aboutText.append("\n" + ssCredit + "\n" + rsCredit + "\n"); + +#if defined(RTAUDIO) + aboutText.append(rtaudiocredit); +#endif + +#if defined(PORTAUDIO) + aboutText.append(portaudiocredit); +#endif + + aboutText.append(kappanhangack + qcpcredit + qtcredit); + aboutText.append("

"); + aboutText.append("
" + sxcreditcopyright + "
"); + aboutText.append("

"); + + aboutText.append(end); + ui->midTextBox->setText(aboutText); + ui->bottomText->setText(buildInfo); + ui->midTextBox->setFocus(); +} + +aboutbox::~aboutbox() +{ + delete ui; +} + +void aboutbox::on_logoBtn_clicked() +{ + QDesktopServices::openUrl(QUrl("https://www.wfview.org/")); +} diff --git a/aboutbox.h b/aboutbox.h new file mode 100644 index 0000000..eac5de0 --- /dev/null +++ b/aboutbox.h @@ -0,0 +1,26 @@ +#ifndef ABOUTBOX_H +#define ABOUTBOX_H + +#include +#include + +namespace Ui { +class aboutbox; +} + +class aboutbox : public QWidget +{ + Q_OBJECT + +public: + explicit aboutbox(QWidget *parent = 0); + ~aboutbox(); + +private slots: + void on_logoBtn_clicked(); + +private: + Ui::aboutbox *ui; +}; + +#endif // ABOUTBOX_H diff --git a/aboutbox.ui b/aboutbox.ui new file mode 100644 index 0000000..1594e10 --- /dev/null +++ b/aboutbox.ui @@ -0,0 +1,74 @@ + + + aboutbox + + + + 0 + 0 + 700 + 567 + + + + Form + + + + + + + 0 + 128 + + + + + 0 + 0 + + + + + + + + 128 + 128 + + + + true + + + + + + + wfview version + + + + + + + <!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:'Noto Sans'; font-size:9pt; 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;">Detailed text here</p></body></html> + + + + + + + Build String + + + + + + + + diff --git a/wfmain.cpp b/wfmain.cpp index a551770..b39934a 100644 --- a/wfmain.cpp +++ b/wfmain.cpp @@ -28,6 +28,7 @@ wfmain::wfmain(const QString serialPortCL, const QString hostCL, const QString s sat = new satelliteSetup(); trxadj = new transceiverAdjustments(); srv = new udpServerSetup(); + abtBox = new aboutbox(); connect(this, SIGNAL(sendServerConfig(SERVERCONFIG)), srv, SLOT(receiveServerConfig(SERVERCONFIG))); connect(srv, SIGNAL(serverConfig(SERVERCONFIG, bool)), this, SLOT(serverConfigRequested(SERVERCONFIG, bool))); @@ -3754,58 +3755,9 @@ void wfmain::on_bandGenbtn_clicked() void wfmain::on_aboutBtn_clicked() { - QMessageBox msgBox(this); - msgBox.setWindowTitle("Abou wfview"); - msgBox.setTextFormat(Qt::RichText); - msgBox.setWindowIcon(QIcon(":resources/wfview.png")); - // TODO: change style of link color based on current CSS sheet. + abtBox->show(); - QString head = QString(""); - QString copyright = QString("Copyright 2017-2021 Elliott H. Liggett, W6EL. All rights reserved."); - QString nacode = QString("

Networking and audio code written by Phil Taylor, M0VSE"); - QString doctest = QString("

Testing, documentation, bug fixes, and development mentorship from
Roeland Jansen, PA3MET, and Jim Nijkamp, PA8E."); - QString ssCredit = QString("

Stylesheet qdarkstyle used under MIT license, stored in /usr/share/wfview/stylesheets/."); - QString rsCredit = QString("

Speex Resample library Copyright 2003-2008 Jean-Marc Valin"); - QString website = QString("

Please visit https://wfview.org/ for the latest information."); - QString docs = QString("

Be sure to check the User Manual and the Forum if you have any questions."); - QString gitcodelink = QString("").arg(GITSHORT); - - QString contact = QString("
email the author: kilocharlie8@gmail.com or W6EL on the air!"); - - QString buildInfo = QString("

Build " + gitcodelink + QString(GITSHORT) + "
on " + QString(__DATE__) + " at " + __TIME__ + " by " + UNAME + "@" + HOST); - QString end = QString(""); - - QString aboutText = head + copyright + "\n" + nacode + "\n" + doctest + "\n" + ssCredit + "\n" + rsCredit + "\n"; - aboutText.append(website + "\n"+ docs + contact +"\n" + buildInfo + end); - - msgBox.setText(aboutText); - msgBox.exec(); - - volatile QString sxcreditcopyright = QString("Speex copyright notice:\ -Copyright (C) 2003 Jean-Marc Valin\n\ -Redistribution and use in source and binary forms, with or without\ -modification, are permitted provided that the following conditions\ -are met:\n\ -- Redistributions of source code must retain the above copyright\ -notice, this list of conditions and the following disclaimer.\n\ -- 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.\n\ -- Neither the name of the Xiph.org Foundation nor the names of its\ -contributors may be used to endorse or promote products derived from\ -this software without specific prior written permission.\n\ -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE FOUNDATION OR\ -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\ -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\ -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\ -PROFITS; OR BUSINESS INTERRUPTION) 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/wfmain.h b/wfmain.h index 1e3441e..d442265 100644 --- a/wfmain.h +++ b/wfmain.h @@ -26,6 +26,7 @@ #include "udpserver.h" #include "qledlabel.h" #include "rigctld.h" +#include "aboutbox.h" #include #include @@ -744,6 +745,7 @@ private: satelliteSetup *sat; transceiverAdjustments *trxadj; udpServerSetup *srv; + aboutbox *abtBox; udpServer* udp = Q_NULLPTR; diff --git a/wfview.pro b/wfview.pro index c2e8013..86d16a4 100644 --- a/wfview.pro +++ b/wfview.pro @@ -129,7 +129,8 @@ SOURCES += main.cpp\ repeatersetup.cpp \ rigctld.cpp \ ring/ring.cpp \ - transceiveradjustments.cpp + transceiveradjustments.cpp \ + aboutbox.cpp HEADERS += wfmain.h \ commhandler.h \ @@ -156,7 +157,8 @@ HEADERS += wfmain.h \ ulaw.h \ ring/ring.h \ transceiveradjustments.h \ - audiotaper.h + audiotaper.h \ + aboutbox.h FORMS += wfmain.ui \ @@ -164,7 +166,8 @@ FORMS += wfmain.ui \ satellitesetup.ui \ udpserversetup.ui \ repeatersetup.ui \ - transceiveradjustments.ui + transceiveradjustments.ui \ + aboutbox.ui