-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2ba7675
commit a2eb3c3
Showing
12 changed files
with
276 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -157,6 +157,9 @@ The GUI (\fB-G\fR) may be completely disabled at build time, in which case \fB-- | |
.SH REPORTING BUGS | ||
@QRFL_BUGREPORT@ | ||
|
||
.SH FUNDING | ||
@QRFL_FUNDING@ | ||
|
||
.SH COPYRIGHT | ||
Copyright \(co 2018 Thomas Lepoix <[email protected]> | ||
.PP | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
///***************************************************************************** | ||
/// @date Oct 2018 | ||
/// @copyright GPL-3.0-or-later | ||
/// @author Thomas Lepoix <[email protected]> | ||
///***************************************************************************** | ||
|
||
#include <QRegularExpression> | ||
|
||
#include "changelog.hpp" | ||
#include "version.hpp" | ||
|
||
#include "aboutdialog.hpp" | ||
using namespace std; | ||
|
||
//****************************************************************************** | ||
AboutDialog::AboutDialog(QWidget* parent) | ||
: QDialog(parent, Qt::Dialog) | ||
, ui(make_unique<Ui::AboutDialog>()) { | ||
ui->setupUi(this); | ||
ui->l_version->setText(ui->l_version->text() + VERSION); | ||
// Font size x-large does not work in UI file stylesheet. Rather setting it | ||
// here than using a fixed size in px, that actually works there. | ||
ui->l_title->setText(QString("<span style='font-size:x-large; font-weight:bold;'>") + ui->l_title->text() + "</span>"); | ||
|
||
static QString const changelog_md(QString(changelog.data()) | ||
.replace(QRegularExpression(" \\*"), "-") // Bullet points | ||
.replace(QRegularExpression(" \\*"), " -") // Bullet points | ||
.replace(QRegularExpression("#([0-9]+)"), "[#\\1](" QRFL_BUGREPORT "/\\1)") // Issues | ||
.replace(QRegularExpression(" -- ([^<]+)<.*> +(.*)"), "*\\1 - \\2*\n\n---") // Signature/Date line | ||
.replace(QRegularExpression("(qucsrflayout \\([0-9.]+\\))"), "### \\1") // Release title line | ||
.replace(QRegularExpression(" \\[ (.*) \\]"), "#### \\1")); // Category line | ||
|
||
ui->tb_changelog->setMarkdown(changelog_md); | ||
//ui->tb_changelog->setPlainText(changelog_md); // For converter debug. | ||
|
||
ui->tb_contact->setMarkdown( | ||
"Homepage: " QRFL_HOMEPAGE "\n\n" | ||
"Bug report: " QRFL_BUGREPORT "\n\n" | ||
"Main developer: <[email protected]>\n\n" | ||
"Funding: " QRFL_FUNDING); | ||
} | ||
|
||
//****************************************************************************** | ||
void AboutDialog::on_pb_ok_clicked() { | ||
accept(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
///***************************************************************************** | ||
/// @date Oct 2018 | ||
/// @copyright GPL-3.0-or-later | ||
/// @author Thomas Lepoix <[email protected]> | ||
///***************************************************************************** | ||
|
||
#pragma once | ||
|
||
#ifndef QRFL_MINIMAL | ||
|
||
#include <QDialog> | ||
#include <QObject> | ||
|
||
#include <memory> | ||
|
||
#include "ui_aboutdialog.h" | ||
|
||
//****************************************************************************** | ||
class AboutDialog : public QDialog { | ||
Q_OBJECT | ||
private: | ||
std::unique_ptr<Ui::AboutDialog> ui; | ||
|
||
private slots: | ||
void on_pb_ok_clicked(); | ||
|
||
public: | ||
explicit AboutDialog(QWidget* parent=0); | ||
~AboutDialog()=default; | ||
}; | ||
|
||
#endif // QRFL_MINIMAL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,154 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ui version="4.0"> | ||
<class>AboutDialog</class> | ||
<widget class="QDialog" name="Dialog"> | ||
<property name="windowTitle"> | ||
<string>About Qucs-RFlayout</string> | ||
</property> | ||
<layout class="QVBoxLayout" name="vb_main"> | ||
<property name="sizeConstraint"> | ||
<enum>QLayout::SetFixedSize</enum> | ||
</property> | ||
|
||
<item> | ||
<layout class="QHBoxLayout" name="hb_about"> | ||
<property name="leftMargin"> | ||
<number>20</number> | ||
</property> | ||
<property name="topMargin"> | ||
<number>20</number> | ||
</property> | ||
<property name="rightMargin"> | ||
<number>20</number> | ||
</property> | ||
<property name="bottomMargin"> | ||
<number>10</number> | ||
</property> | ||
<item> | ||
<widget class="QLabel" name="l_icon"> | ||
<property name="pixmap"> | ||
<pixmap>:/qucsrflayout.128.png</pixmap> | ||
</property> | ||
<property name="alignment"> | ||
<set>Qt::AlignCenter</set> | ||
</property> | ||
</widget> | ||
</item> | ||
|
||
<item> | ||
<layout class="QVBoxLayout" name="vb_about_text"> | ||
<property name="leftMargin"> | ||
<number>40</number> | ||
</property> | ||
<property name="rightMargin"> | ||
<number>40</number> | ||
</property> | ||
<item> | ||
<widget class="QLabel" name="l_title"> | ||
<property name="text"> | ||
<string>Radio Frequency Layout</string> | ||
</property> | ||
<property name="alignment"> | ||
<set>Qt::AlignCenter</set> | ||
</property> | ||
<property name="styleSheet"> | ||
<string notr="true">font-weight:bold;</string> | ||
<!--string notr="true">font-size:20px; font-weight:bold;</string--> | ||
<!--string notr="true">font-size:x-large; font-weight:bold;</string--> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QLabel" name="l_version"> | ||
<property name="text"> | ||
<string>Version </string> | ||
</property> | ||
<property name="alignment"> | ||
<set>Qt::AlignCenter</set> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<spacer name="verticalSpacer"> | ||
<property name="orientation"> | ||
<enum>Qt::Vertical</enum> | ||
</property> | ||
</spacer> | ||
</item> | ||
<item> | ||
<widget class="QLabel" name="l_copyright"> | ||
<property name="text"> | ||
<string>Copyright © 2018 Thomas Lepoix</string> | ||
</property> | ||
</widget> | ||
</item> | ||
</layout> | ||
</item> | ||
</layout> | ||
</item> | ||
|
||
<item> | ||
<widget class="QLabel" name="l_disclaimer"> | ||
<property name="text"> | ||
<string>This software is distributed under the terms of | ||
the GPL license version 3 or later.</string> | ||
</property> | ||
<property name="alignment"> | ||
<set>Qt::AlignCenter</set> | ||
</property> | ||
<property name="wordWrap"> | ||
<bool>true</bool> | ||
</property> | ||
<property name="margin"> | ||
<number>20</number> | ||
</property> | ||
</widget> | ||
</item> | ||
|
||
<item> | ||
<widget class="QTabWidget" name="tw_more"> | ||
<widget class="QTextBrowser" name="tb_changelog"> | ||
<attribute name="title"> | ||
<string>Changelog</string> | ||
</attribute> | ||
<property name="openExternalLinks"> | ||
<bool>true</bool> | ||
</property> | ||
</widget> | ||
<widget class="QTextBrowser" name="tb_contact"> | ||
<attribute name="title"> | ||
<string>Contact</string> | ||
</attribute> | ||
<property name="openExternalLinks"> | ||
<bool>true</bool> | ||
</property> | ||
</widget> | ||
</widget> | ||
</item> | ||
|
||
<item> | ||
<layout class="QHBoxLayout" name="hb_ok"> | ||
<item> | ||
<spacer name="horizontalSpacer"> | ||
<property name="orientation"> | ||
<enum>Qt::Horizontal</enum> | ||
</property> | ||
</spacer> | ||
</item> | ||
<item> | ||
<widget class="QPushButton" name="pb_ok"> | ||
<property name="text"> | ||
<string>OK</string> | ||
</property> | ||
</widget> | ||
</item> | ||
</layout> | ||
</item> | ||
|
||
</layout> | ||
</widget> | ||
<resources> | ||
<include location="resources.qrc"/> | ||
</resources> | ||
<connections/> | ||
</ui> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
///***************************************************************************** | ||
/// @date Oct 2018 | ||
/// @copyright GPL-3.0-or-later | ||
/// @author Thomas Lepoix <[email protected]> | ||
///***************************************************************************** | ||
|
||
#include <string> | ||
|
||
// Workaround CPP not providing C23 #embed : use CMake configure step instead. | ||
inline std::string_view constexpr changelog = R"(@QRFL_CHANGELOG@)"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters