#include "aboutwindow.h" #include "ui_aboutwindow.h" #include #include #include #include #include #include "editorsettingsoptions.h" /** * Initializes the window components and configures the AboutWindow */ //包含版本检测和pro版本检测,我们可以通过修改m_isProVersion值来做到免费的功能? //当版本低于5.10.0时,移除窗口的帮助按钮功能 AboutWindow::AboutWindow(QWidget *parent) : QDialog(parent), m_ui(new Ui::AboutWindow), m_isProVersion(false) { m_ui->setupUi(this); #if QT_VERSION < QT_VERSION_CHECK(5, 10, 0) setWindowFlag(Qt::WindowContextHelpButtonHint, false); #endif setWindowTitle(tr("About") + " " + QCoreApplication::applicationName()); setAboutText(); m_ui->aboutText->setTextColor(QColor(26, 26, 26)); #ifdef __APPLE__ QFont fontToUse = QFont(QStringLiteral("SF Pro Text")).exactMatch() ? QStringLiteral("SF Pro Text") : QStringLiteral("Roboto"); m_ui->aboutText->setFont(fontToUse); #elif _WIN32 QFont fontToUse = QFont(QStringLiteral("Segoe UI")).exactMatch() ? QStringLiteral("Segoe UI") : QStringLiteral("Roboto"); m_ui->aboutText->setFont(fontToUse); #else m_ui->aboutText->setFont(QFont(QStringLiteral("Roboto"))); #endif // load stylesheet for aboutText QFile cssFile(":/styles/about-window.css"); cssFile.open(QFile::ReadOnly); m_ui->aboutText->setStyleSheet(cssFile.readAll()); #if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) QFile scollBarStyleFile(QStringLiteral(":/styles/components/custom-scrollbar.css")); scollBarStyleFile.open(QFile::ReadOnly); QString scrollbarStyleSheet = QString::fromLatin1(scollBarStyleFile.readAll()); m_ui->aboutText->verticalScrollBar()->setStyleSheet(scrollbarStyleSheet); #endif } AboutWindow::~AboutWindow() { /* Delete UI controls */ delete m_ui; } void AboutWindow::setAboutText() { QString proVersionText = m_isProVersion ? " (Pro Version)" : ""; m_ui->aboutText->setText( "Version: " + QCoreApplication::applicationVersion() + proVersionText + "

Notes was founded by Ruby " "Mamistvalove, " "to create an elegant yet powerful cross-platform and open-source note-taking " "app.

Notes Website" "
Source code on " "Github
Terms and Privacy " "Policy

Acknowledgments
This project couldn't " "have " "come this far without the help of these amazing " "people:

Programmers:
Alex Spataru
Ali Diouri" "
David Planella
Diep Ngoc
Guilherme " "Silva
Thorbjørn Lindeijer
Tuur Vanhoutte
Waqar " "Ahmed

Designers:
Kevin Doyle

And to the " "many of our beloved users who keep sending us feedback, you are an essential force " "in " "helping us improve, thank you!

Notes makes use of the following " "third-party libraries:

QMarkdownTextEdit
" #if defined(UPDATE_CHECKER) "QSimpleUpdater
" #endif "QAutostart
QXT

Notes makes use of the following open source " "fonts:

Roboto
Source Sans Pro
Trykker
Mate
iA " "Writer Mono
iA Writer Duo
iA Writer " "Quattro
Font Awesome
Material Symbols

Qt version: " + qVersion() + " (built with " + QT_VERSION_STR + ")"); } void AboutWindow::setTheme(Theme::Value theme) { setCSSThemeAndUpdate(m_ui->aboutText, theme); } void AboutWindow::setProVersion(bool isProVersion) { m_isProVersion = isProVersion; setAboutText(); }