Files
gstreamerViewer/aboutwidget.cpp
2025-12-19 09:50:35 +01:00

95 lines
3.0 KiB
C++

/*
* GStreamer Camera Viewer
* Copyright (c) 2025 Maik Jurischka
* Licensed under CC BY-NC-SA 4.0
* https://creativecommons.org/licenses/by-nc-sa/4.0/
*/
#include "aboutwidget.h"
#include <QVBoxLayout>
#include <QGroupBox>
#include <QLabel>
#include <gst/gst.h>
AboutWidget::AboutWidget(QWidget *parent)
: QWidget(parent)
{
setupUI();
}
void AboutWidget::setupUI()
{
auto* mainLayout = new QVBoxLayout(this);
auto* aboutGroup = new QGroupBox("About GStreamer Camera Viewer", this);
auto* aboutLayout = new QVBoxLayout();
auto* titleLabel = new QLabel("<h2>GStreamer Camera Viewer</h2>", this);
aboutLayout->addWidget(titleLabel);
auto* versionLabel = new QLabel("<b>Version:</b> 0.5.0", this);
aboutLayout->addWidget(versionLabel);
auto* authorLabel = new QLabel("<b>Author:</b> Maik Jurischka", this);
aboutLayout->addWidget(authorLabel);
auto* descLabel = new QLabel(
"<p>A Qt6-based camera viewer application with GStreamer pipeline control.</p>"
"<p>Features:</p>"
"<ul>"
"<li>Real-time video streaming with embedded display</li>"
"<li>Configurable GStreamer pipelines</li>"
"<li>Camera parameter controls (exposure, white balance, etc.)</li>"
"<li>Image transformation (rotation, flip)</li>"
"<li>Zoom support (50-200%)</li>"
"</ul>", this);
descLabel->setWordWrap(true);
aboutLayout->addWidget(descLabel);
auto* licenseGroup = new QGroupBox("License", this);
auto* licenseLayout = new QVBoxLayout();
auto* licenseLabel = new QLabel(
"<b>CC BY-NC-SA 4.0</b>"
"<p>Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International</p>"
"<p style='font-size: small;'>"
"This software is free to use, share, and modify for non-commercial purposes. "
"Any derivative works must be shared under the same license."
"</p>"
"<p style='font-size: small;'>"
"<a href='https://creativecommons.org/licenses/by-nc-sa/4.0/'>License Details</a>"
"</p>", this);
licenseLabel->setWordWrap(true);
licenseLabel->setOpenExternalLinks(true);
licenseLayout->addWidget(licenseLabel);
licenseGroup->setLayout(licenseLayout);
aboutLayout->addWidget(licenseGroup);
auto* techGroup = new QGroupBox("Technologies", this);
auto* techLayout = new QVBoxLayout();
guint major, minor, micro, nano;
gst_version(&major, &minor, &micro, &nano);
QString gstVersion = QString("GStreamer %1.%2.%3").arg(major).arg(minor).arg(micro);
auto* qtLabel = new QLabel(QString("<b>Qt Version:</b> %1").arg(QT_VERSION_STR), this);
techLayout->addWidget(qtLabel);
auto* gstLabel = new QLabel(QString("<b>%1</b>").arg(gstVersion), this);
techLayout->addWidget(gstLabel);
techGroup->setLayout(techLayout);
aboutLayout->addWidget(techGroup);
aboutLayout->addStretch();
aboutGroup->setLayout(aboutLayout);
aboutGroup->setMaximumWidth(500);
mainLayout->addWidget(aboutGroup);
mainLayout->addStretch();
setLayout(mainLayout);
}