initial port for Cevo game in C++ (libs)

This commit is contained in:
Geoffray Levasseur committed 2026-10-22 17:20:45 +02:00
commit 8436242032
375 files changed
+46282

No files matched your search

+44
View File
@@ -0,0 +1,44 @@
#include "Cevo/FormAbout.h"
#include "ui_FormAbout.h"
#include <QDesktopServices>
#include <QUrl>
namespace Cevo {
FormAbout::FormAbout(QWidget *parent) : FormBase(parent), ui(new Ui::FormAbout)
{
ui->setupUi(this);
connect(ui->buttonHomePage, &QPushButton::clicked, this, &FormAbout::onHomePageClicked);
}
FormAbout::~FormAbout()
{
delete ui;
}
void FormAbout::showEvent(QShowEvent *event)
{
FormBase::showEvent(event);
if (m_applicationInfo) {
ui->labelAppName->setText(m_applicationInfo->appName);
ui->labelContent->setText(tr("Version") + ": " + m_applicationInfo->version() + '\n' + tr("Release date") +
": " + m_applicationInfo->releaseDate.toString() + '\n' + tr("License") + ": " +
m_applicationInfo->license);
ui->labelDescription->setText(m_applicationInfo->description);
ui->imageLogo->setPixmap(m_applicationInfo->icon);
}
updateInterface();
}
void FormAbout::updateInterface()
{
ui->buttonHomePage->setEnabled(m_applicationInfo != nullptr);
}
void FormAbout::onHomePageClicked()
{
QDesktopServices::openUrl(QUrl(m_applicationInfo->homePage));
}
} // namespace Cevo