37 #include <QtCore/QDate>
38 #include <QtCore/QFile>
39 #include <QtCore/QSysInfo>
41 #include <QDialogButtonBox>
42 #include <QGridLayout>
44 #include <QPushButton>
45 #include <QTextBrowser>
48 using namespace Core::Internal;
49 using namespace Core::Constants;
56 setWindowIcon(QIcon(
":/core/gcs_nontrans_128"));
58 setWindowTitle(tr(
"About GCS Authors"));
59 setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
60 auto layout =
new QGridLayout(
this);
61 layout->setSizeConstraint(QLayout::SetFixedSize);
64 version += QDate(2007, 25, 10).toString(Qt::SystemLocaleDate);
66 QLabel *mainLabel =
new QLabel(
67 tr(
"%0 proudly brought to you by this fine team:").arg(GCS_PROJECT_BRANDING_PRETTY));
69 QLabel *relCreditsLabel =
new QLabel(tr(
"Current release:"));
70 relCreditsLabel->setWordWrap(
true);
71 QTextBrowser *relCreditsArea =
new QTextBrowser(
this);
72 relCreditsArea->setSource(
75 QLabel *creditsLabel =
76 new QLabel(tr(
"All time (including previous contributions under OpenPilot and Tau Labs):"));
77 creditsLabel->setWordWrap(
true);
78 QTextBrowser *creditsArea =
new QTextBrowser(
this);
79 creditsArea->setSource(
82 QDialogButtonBox *buttonBox =
new QDialogButtonBox(QDialogButtonBox::Close);
83 QPushButton *closeButton = buttonBox->button(QDialogButtonBox::Close);
84 QTC_ASSERT(closeButton, );
85 buttonBox->addButton(closeButton, QDialogButtonBox::ButtonRole(QDialogButtonBox::RejectRole
86 | QDialogButtonBox::AcceptRole));
87 connect(buttonBox, SIGNAL(rejected()),
this, SLOT(reject()));
89 QLabel *logoLabel =
new QLabel;
90 logoLabel->setPixmap(QPixmap(QLatin1String(
":/core/gcs_logo_128")));
92 layout->addWidget(logoLabel, 0, 0, 1, 2, Qt::AlignHCenter);
93 layout->addWidget(mainLabel, 1, 0, 1, 2, Qt::AlignHCenter);
94 layout->addWidget(relCreditsLabel, 2, 0, 1, 1, Qt::AlignBottom);
95 layout->addWidget(relCreditsArea, 3, 0, 1, 1, Qt::AlignTop);
96 layout->addWidget(creditsLabel, 2, 1, 1, 1, Qt::AlignBottom);
97 layout->addWidget(creditsArea, 3, 1, 1, 1, Qt::AlignTop);
98 layout->addWidget(buttonBox, 4, 0, 1, 2);
const char *const GCS_VERSION_LONG
AuthorsDialog(QWidget *parent)
static QString InsertDataPath(QString path)