2012-06-10 16:50:54 +00:00
|
|
|
/*
|
|
|
|
|
* synergy -- mouse and keyboard sharing utility
|
2024-07-23 19:17:40 +00:00
|
|
|
* Copyright (C) 2012 Symless Ltd.
|
2012-06-10 16:50:54 +00:00
|
|
|
* Copyright (C) 2008 Volker Lanz (vl@fidra.de)
|
2024-07-02 19:07:06 +00:00
|
|
|
*
|
2012-06-10 16:50:54 +00:00
|
|
|
* This package is free software; you can redistribute it and/or
|
|
|
|
|
* modify it under the terms of the GNU General Public License
|
2015-05-03 02:33:52 +00:00
|
|
|
* found in the file LICENSE that should have accompanied this file.
|
2024-07-02 19:07:06 +00:00
|
|
|
*
|
2012-06-10 16:50:54 +00:00
|
|
|
* This package 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/>.
|
|
|
|
|
*/
|
|
|
|
|
|
2022-09-13 15:31:45 +00:00
|
|
|
#include "AboutDialog.h"
|
2024-08-10 00:48:27 +00:00
|
|
|
|
2024-08-09 13:03:48 +00:00
|
|
|
#include "common/copyright.h"
|
2024-08-10 00:48:27 +00:00
|
|
|
#include "common/version.h"
|
|
|
|
|
#include "gui/style_utils.h"
|
2024-07-23 19:17:40 +00:00
|
|
|
|
2024-07-26 22:53:52 +00:00
|
|
|
#include <QDateTime>
|
2024-08-10 00:48:27 +00:00
|
|
|
#include <qguiapplication.h>
|
2024-07-26 22:53:52 +00:00
|
|
|
|
2024-08-10 00:48:27 +00:00
|
|
|
using namespace synergy::gui;
|
2024-07-26 22:53:52 +00:00
|
|
|
|
2024-08-03 00:17:29 +00:00
|
|
|
AboutDialog::AboutDialog(MainWindow *parent)
|
2024-07-02 19:07:06 +00:00
|
|
|
: QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint),
|
|
|
|
|
Ui::AboutDialogBase() {
|
2024-08-07 14:05:18 +00:00
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
setupUi(this);
|
2020-08-18 12:55:25 +00:00
|
|
|
|
2024-08-07 14:05:18 +00:00
|
|
|
this->setFixedSize(this->size());
|
|
|
|
|
|
2024-08-09 13:03:48 +00:00
|
|
|
QString version = QString::fromStdString(synergy::version());
|
|
|
|
|
m_pLabelSynergyVersion->setText(version);
|
2012-07-29 01:01:33 +00:00
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
QString buildDateString = QString::fromLocal8Bit(__DATE__).simplified();
|
|
|
|
|
QDate buildDate = QLocale("en_US").toDate(buildDateString, "MMM d yyyy");
|
2024-07-08 14:37:51 +00:00
|
|
|
m_pLabelBuildDate->setText(
|
|
|
|
|
buildDate.toString(QLocale::system().dateFormat(QLocale::LongFormat)));
|
2022-09-13 15:31:45 +00:00
|
|
|
}
|
2020-08-18 12:55:25 +00:00
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
int AboutDialog::exec() {
|
2024-08-09 13:03:48 +00:00
|
|
|
m_pDevelopersLabel->setText(importantDevelopers());
|
|
|
|
|
m_pCopyrightLabel->setText(QString::fromStdString(synergy::copyright()));
|
2024-07-02 19:07:06 +00:00
|
|
|
updateLogo();
|
2022-09-13 15:31:45 +00:00
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
return QDialog::exec();
|
2022-09-13 15:31:45 +00:00
|
|
|
}
|
2020-12-21 11:09:52 +00:00
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
void AboutDialog::updateLogo() const {
|
2024-08-10 00:48:27 +00:00
|
|
|
if (isDarkMode()) {
|
|
|
|
|
qDebug("dark mode detected, showing dark logo");
|
2024-09-09 10:18:17 +00:00
|
|
|
QPixmap logo(":/image/about-dark.png");
|
2024-07-02 19:07:06 +00:00
|
|
|
if (!logo.isNull()) {
|
2024-07-08 14:37:51 +00:00
|
|
|
m_pLabel_Logo->setPixmap(logo);
|
2020-12-21 11:09:52 +00:00
|
|
|
}
|
2024-08-10 00:48:27 +00:00
|
|
|
} else {
|
|
|
|
|
qDebug("light mode detected, keeping light logo");
|
2024-07-02 19:07:06 +00:00
|
|
|
}
|
2012-06-10 16:50:54 +00:00
|
|
|
}
|
2022-06-30 11:48:26 +00:00
|
|
|
|
2024-08-09 13:03:48 +00:00
|
|
|
QString AboutDialog::importantDevelopers() const {
|
2024-08-07 14:05:18 +00:00
|
|
|
QStringList awesomePeople;
|
2024-08-30 14:53:25 +00:00
|
|
|
awesomePeople
|
|
|
|
|
|
|
|
|
|
// Chris is the ultimate creator, and the one who started it all in 2001.
|
|
|
|
|
<< "Chris Schoeneman"
|
|
|
|
|
|
|
|
|
|
// Richard and Adam developed CosmoSynergy, the 90's predecessor project.
|
|
|
|
|
<< "Richard Lee"
|
|
|
|
|
<< "Adam Feder"
|
|
|
|
|
|
|
|
|
|
// Nick continued the legacy in 2009 started by Chris.
|
|
|
|
|
<< "Nick Bolton"
|
|
|
|
|
|
|
|
|
|
// Volker wrote the first version of the GUI (QSynergy) in 2008.
|
|
|
|
|
<< "Volker Lanz"
|
|
|
|
|
|
|
|
|
|
// Re-ignited the project in 2008 and rebuilt the community.
|
|
|
|
|
<< "Sorin Sbârnea"
|
|
|
|
|
|
|
|
|
|
// Contributors of bug fixes in the early days.
|
|
|
|
|
<< "Ryan Breen"
|
|
|
|
|
<< "Guido Poschta"
|
|
|
|
|
<< "Bertrand Landry Hetu"
|
|
|
|
|
<< "Tom Chadwick"
|
|
|
|
|
<< "Brent Priddy"
|
|
|
|
|
<< "Jason Axelson"
|
|
|
|
|
<< "Jake Petroules"
|
|
|
|
|
|
|
|
|
|
// Implemented Wayland support (libei and libportal).
|
|
|
|
|
<< "Peter Hutterer"
|
|
|
|
|
<< "Olivier Fourdan"
|
|
|
|
|
|
|
|
|
|
// Symless employees (in order of joining).
|
|
|
|
|
<< "Kyle Bloom"
|
|
|
|
|
<< "Daun Chung"
|
|
|
|
|
<< "Serhii Hadzhylov"
|
|
|
|
|
<< "Oleksandr Lysytsia"
|
|
|
|
|
<< "Olena Kutytska"
|
|
|
|
|
<< "Owen Phillips"
|
|
|
|
|
<< "Daniel Evenson";
|
2024-08-07 14:05:18 +00:00
|
|
|
|
|
|
|
|
for (auto &person : awesomePeople) {
|
|
|
|
|
// prevent names from breaking on the space when wrapped
|
|
|
|
|
person = person.replace(" ", QString::fromUtf8(" "));
|
|
|
|
|
}
|
2024-07-08 14:37:51 +00:00
|
|
|
|
2024-08-07 14:05:18 +00:00
|
|
|
return awesomePeople.join(", ") + ".";
|
2022-06-30 11:48:26 +00:00
|
|
|
}
|