kopia lustrzana https://gitlab.com/eliggett/wfview
New about box!
rodzic
cfa1331b8f
commit
8bd786f235
|
@ -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("<html><head></head><body>");
|
||||||
|
QString copyright = QString("Copyright 2017-2021 Elliott H. Liggett, W6EL. All rights reserved.");
|
||||||
|
QString nacode = QString("<br/><br/>Networking and audio code written by Phil Taylor, M0VSE");
|
||||||
|
QString doctest = QString("<br/><br/>Testing, documentation, bug fixes, and development mentorship from<br/>Roeland Jansen, PA3MET, and Jim Nijkamp, PA8E.");
|
||||||
|
|
||||||
|
|
||||||
|
QString ssCredit = QString("<br/><br/>Stylesheet <a href=\"https://github.com/ColinDuquesnoy/QDarkStyleSheet/tree/master/qdarkstyle\" style=\"color: cyan;\">qdarkstyle</a> used under MIT license, stored in /usr/share/wfview/stylesheets/.");
|
||||||
|
|
||||||
|
QString website = QString("<br/><br/>Please visit <a href=\"https://wfview.org/\" style=\"color: cyan;\">https://wfview.org/</a> for the latest information.");
|
||||||
|
QString docs = QString("<br/><br/>Be sure to check the <a href=\"https://wfview.org/wfview-user-manual/\" style=\"color: cyan;\">User Manual</a> and <a href=\"https://forum.wfview.org/\" style=\"color: cyan;\">the Forum</a> if you have any questions.");
|
||||||
|
QString support = QString("<br/><br/>For support, please visit <a href=\"https://forum.wfview.org/\">the official wfview support forum</a>.");
|
||||||
|
QString gitcodelink = QString("<a href=\"https://gitlab.com/eliggett/wfview/-/tree/%1\" style=\"color: cyan;\">").arg(GITSHORT);
|
||||||
|
|
||||||
|
QString contact = QString("<br/>email W6EL: kilocharlie8@gmail.com");
|
||||||
|
|
||||||
|
QString buildInfo = QString("<br/><br/>Build " + gitcodelink + QString(GITSHORT) + "</a> on " + QString(__DATE__) + " at " + __TIME__ + " by " + UNAME + "@" + HOST);
|
||||||
|
QString end = QString("</body></html>");
|
||||||
|
|
||||||
|
// Short credit strings:
|
||||||
|
QString rsCredit = QString("<br/><br/><a href=\"https://www.speex.org/\" style=\"color: cyan;\">Speex</a> Resample library Copyright 2003-2008 Jean-Marc Valin");
|
||||||
|
#if defined(RTAUDIO)
|
||||||
|
QString rtaudiocredit = QString("<br/><br/>RT Audio, from <a href=\"https://www.music.mcgill.ca/~gary/rtaudio/index.html\">Gary P. Scavone</a>");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(PORTAUDIO)
|
||||||
|
QString portaudiocredit = QString("<br/><br/>Port Audio, from <a href=\"http://portaudio.com\">The Port Audio Community</a>");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
QString qcpcredit = QString("<br/><br/>The waterfall and spectrum plot graphics use QCustomPlot, from <a href=\"https://www.qcustomplot.com/\">Emanuel Eichhammer</a>");
|
||||||
|
QString qtcredit = QString("<br/><br/>This copy of wfview was built against Qt version %1").arg(QT_VERSION_STR);
|
||||||
|
|
||||||
|
// Acknowledgement:
|
||||||
|
QString wfviewcommunityack = QString("<br/><br/>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("<br/><br/>Special thanks to Norbert Varga, and the <a href=\"https://github.com/nonoo/kappanhang\">nonoo/kappanhang team</a> 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("<br/><br/>");
|
||||||
|
aboutText.append("<pre>" + sxcreditcopyright + "</pre>");
|
||||||
|
aboutText.append("<br/><br/>");
|
||||||
|
|
||||||
|
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/"));
|
||||||
|
}
|
|
@ -0,0 +1,26 @@
|
||||||
|
#ifndef ABOUTBOX_H
|
||||||
|
#define ABOUTBOX_H
|
||||||
|
|
||||||
|
#include <QWidget>
|
||||||
|
#include <QDesktopServices>
|
||||||
|
|
||||||
|
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
|
|
@ -0,0 +1,74 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>aboutbox</class>
|
||||||
|
<widget class="QWidget" name="aboutbox">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>700</width>
|
||||||
|
<height>567</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Form</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="logoBtn">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>128</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="sizeIncrement">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>128</width>
|
||||||
|
<height>128</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="flat">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="topText">
|
||||||
|
<property name="text">
|
||||||
|
<string>wfview version</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QTextBrowser" name="midTextBox">
|
||||||
|
<property name="html">
|
||||||
|
<string><!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></string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="bottomText">
|
||||||
|
<property name="text">
|
||||||
|
<string>Build String</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
52
wfmain.cpp
52
wfmain.cpp
|
@ -28,6 +28,7 @@ wfmain::wfmain(const QString serialPortCL, const QString hostCL, const QString s
|
||||||
sat = new satelliteSetup();
|
sat = new satelliteSetup();
|
||||||
trxadj = new transceiverAdjustments();
|
trxadj = new transceiverAdjustments();
|
||||||
srv = new udpServerSetup();
|
srv = new udpServerSetup();
|
||||||
|
abtBox = new aboutbox();
|
||||||
|
|
||||||
connect(this, SIGNAL(sendServerConfig(SERVERCONFIG)), srv, SLOT(receiveServerConfig(SERVERCONFIG)));
|
connect(this, SIGNAL(sendServerConfig(SERVERCONFIG)), srv, SLOT(receiveServerConfig(SERVERCONFIG)));
|
||||||
connect(srv, SIGNAL(serverConfig(SERVERCONFIG, bool)), this, SLOT(serverConfigRequested(SERVERCONFIG, bool)));
|
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()
|
void wfmain::on_aboutBtn_clicked()
|
||||||
{
|
{
|
||||||
QMessageBox msgBox(this);
|
abtBox->show();
|
||||||
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.
|
|
||||||
|
|
||||||
QString head = QString("<html><head></head><body>");
|
|
||||||
QString copyright = QString("Copyright 2017-2021 Elliott H. Liggett, W6EL. All rights reserved.");
|
|
||||||
QString nacode = QString("<br/><br/>Networking and audio code written by Phil Taylor, M0VSE");
|
|
||||||
QString doctest = QString("<br/><br/>Testing, documentation, bug fixes, and development mentorship from<br/>Roeland Jansen, PA3MET, and Jim Nijkamp, PA8E.");
|
|
||||||
QString ssCredit = QString("<br/><br/>Stylesheet <a href=\"https://github.com/ColinDuquesnoy/QDarkStyleSheet/tree/master/qdarkstyle\" style=\"color: cyan;\">qdarkstyle</a> used under MIT license, stored in /usr/share/wfview/stylesheets/.");
|
|
||||||
QString rsCredit = QString("<br/><br/><a href=\"https://www.speex.org/\" style=\"color: cyan;\">Speex</a> Resample library Copyright 2003-2008 Jean-Marc Valin");
|
|
||||||
QString website = QString("<br/><br/>Please visit <a href=\"https://wfview.org/\" style=\"color: cyan;\">https://wfview.org/</a> for the latest information.");
|
|
||||||
QString docs = QString("<br/><br/>Be sure to check the <a href=\"https://wfview.org/wfview-user-manual/\" style=\"color: cyan;\">User Manual</a> and <a href=\"https://forum.wfview.org/\" style=\"color: cyan;\">the Forum</a> if you have any questions.");
|
|
||||||
|
|
||||||
QString gitcodelink = QString("<a href=\"https://gitlab.com/eliggett/wfview/-/tree/%1\" style=\"color: cyan;\">").arg(GITSHORT);
|
|
||||||
|
|
||||||
QString contact = QString("<br/>email the author: kilocharlie8@gmail.com or W6EL on the air!");
|
|
||||||
|
|
||||||
QString buildInfo = QString("<br/><br/>Build " + gitcodelink + QString(GITSHORT) + "</a> on " + QString(__DATE__) + " at " + __TIME__ + " by " + UNAME + "@" + HOST);
|
|
||||||
QString end = QString("</body></html>");
|
|
||||||
|
|
||||||
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.");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
2
wfmain.h
2
wfmain.h
|
@ -26,6 +26,7 @@
|
||||||
#include "udpserver.h"
|
#include "udpserver.h"
|
||||||
#include "qledlabel.h"
|
#include "qledlabel.h"
|
||||||
#include "rigctld.h"
|
#include "rigctld.h"
|
||||||
|
#include "aboutbox.h"
|
||||||
|
|
||||||
#include <qcustomplot.h>
|
#include <qcustomplot.h>
|
||||||
#include <qserialportinfo.h>
|
#include <qserialportinfo.h>
|
||||||
|
@ -744,6 +745,7 @@ private:
|
||||||
satelliteSetup *sat;
|
satelliteSetup *sat;
|
||||||
transceiverAdjustments *trxadj;
|
transceiverAdjustments *trxadj;
|
||||||
udpServerSetup *srv;
|
udpServerSetup *srv;
|
||||||
|
aboutbox *abtBox;
|
||||||
|
|
||||||
|
|
||||||
udpServer* udp = Q_NULLPTR;
|
udpServer* udp = Q_NULLPTR;
|
||||||
|
|
|
@ -129,7 +129,8 @@ SOURCES += main.cpp\
|
||||||
repeatersetup.cpp \
|
repeatersetup.cpp \
|
||||||
rigctld.cpp \
|
rigctld.cpp \
|
||||||
ring/ring.cpp \
|
ring/ring.cpp \
|
||||||
transceiveradjustments.cpp
|
transceiveradjustments.cpp \
|
||||||
|
aboutbox.cpp
|
||||||
|
|
||||||
HEADERS += wfmain.h \
|
HEADERS += wfmain.h \
|
||||||
commhandler.h \
|
commhandler.h \
|
||||||
|
@ -156,7 +157,8 @@ HEADERS += wfmain.h \
|
||||||
ulaw.h \
|
ulaw.h \
|
||||||
ring/ring.h \
|
ring/ring.h \
|
||||||
transceiveradjustments.h \
|
transceiveradjustments.h \
|
||||||
audiotaper.h
|
audiotaper.h \
|
||||||
|
aboutbox.h
|
||||||
|
|
||||||
|
|
||||||
FORMS += wfmain.ui \
|
FORMS += wfmain.ui \
|
||||||
|
@ -164,7 +166,8 @@ FORMS += wfmain.ui \
|
||||||
satellitesetup.ui \
|
satellitesetup.ui \
|
||||||
udpserversetup.ui \
|
udpserversetup.ui \
|
||||||
repeatersetup.ui \
|
repeatersetup.ui \
|
||||||
transceiveradjustments.ui
|
transceiveradjustments.ui \
|
||||||
|
aboutbox.ui
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue