SILICON
Loading...
Searching...
No Matches
aboutDialog.hpp
Go to the documentation of this file.
1/*
2 Copyright (c) 2025. Giulio Cocconi
3
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#pragma once
19
20#include <QDialog>
21#include <QLabel>
22#include <QPlainTextEdit>
23#include <QVBoxLayout>
24
25#include <ui/shell/icons.hpp>
26
27
28namespace SILICON::ui {
29
30class AboutDialog : public QDialog {
31 Q_OBJECT
32
33public:
34 explicit AboutDialog(const QString& title = "SILICON", QWidget* parent = nullptr);
35
36private:
37 void loadLicenses();
38
39 QLabel* explainatoryText = new QLabel(
40 QString("SILICON (v. %1) was developed by "
41 "Giulio Cocconi and released under the GNU General Public License "
42 "v. 3.0.\n\n It makes use of the following licensed resources:")
43 .arg(SILICON_VERSION),
44 this);
45
46 QVBoxLayout* mainLayout = new QVBoxLayout(this);
47 QHBoxLayout* topLayout = new QHBoxLayout();
48
49 QLabel* titleLabel;
50 QLabel* iconLabel;
51 QPlainTextEdit* licenseTextEdit;
52 QPushButton* closeButton;
53 QString licenseText = "";
54};
55
56} // namespace SILICON::ui
QPlainTextEdit * licenseTextEdit
AboutDialog(const QString &title="SILICON", QWidget *parent=nullptr)