blob: ab04d112fa8c61279e916126e16611c622dea7a9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
# Soundboard Engine - customizable soundboard
# Copyright (C) 2026 Vidhu Kant Sharma <vidhukant@vidhukant.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program 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 <https://www.gnu.org/licenses/>.
from PySide6.QtCore import QUrl
from PySide6.QtGui import QDesktopServices
from PySide6.QtWidgets import QLabel, QPushButton, QVBoxLayout, QWidget
from Soundboard import Soundboard
class AboutWindow(QWidget):
def __init__(self, soundboard: Soundboard, app_version):
super().__init__()
self.app_version = app_version
self.soundboard = soundboard
self.setWindowTitle(f"About - Soundboard Engine {self.app_version}")
self.setMinimumSize(450, 300)
self.resize(450, 300)
layout = QVBoxLayout()
layout.setSpacing(10)
soundboard_info = QLabel(
f"Soundboard Name: {self.soundboard.soundboard_name}\n"
+ f"Soundboard Author: {self.soundboard.soundboard_author}\n"
+ f"Soundboard ID: {self.soundboard.soundboard_id}\n"
+ f"Soundboard Version: {self.soundboard.soundboard_version}"
)
layout.addWidget(soundboard_info)
app_info = QLabel(
"Soundboard Engine - Customizable soundboard.\n"
+ f"Version - {self.app_version}\n"
+ "Copyright (c) 2026 Vidhu Kant Sharma <vidhukant@vidhukant.com>\n"
+ "This program comes with absolutely no warranty.\n"
+ "See GNU GPL Version 3 or later for more details."
)
layout.addWidget(app_info)
view_source_btn = QPushButton("View Source Code")
view_source_btn.clicked.connect(
lambda: QDesktopServices.openUrl(
QUrl("https://git.vidhukant.com/soundboard-engine/about")
)
)
layout.addWidget(view_source_btn)
view_license_btn = QPushButton("View License")
view_license_btn.clicked.connect(
lambda: QDesktopServices.openUrl(
QUrl("https://git.vidhukant.com/soundboard-engine/tree/LICENSE")
)
)
layout.addWidget(view_license_btn)
self.setLayout(layout)
|