Added About NUSGet and About Qt dialogs

This commit is contained in:
2025-05-04 19:20:48 -04:00
parent 4f993a3a62
commit 5a42cc5bd7
18 changed files with 1301 additions and 387 deletions

13
qt/py/ui_AboutDialog.py Normal file
View File

@@ -0,0 +1,13 @@
# "qt/py/ui_AboutDialog.py", licensed under the MIT license
# Copyright 2024-2025 NinjaCheetah and Contributors
from PySide6.QtWidgets import QDialog
from qt.py.ui_AboutNUSGet import Ui_AboutNUSGet
class AboutNUSGet(QDialog):
def __init__(self, version_str):
super().__init__()
self.ui = Ui_AboutNUSGet()
self.ui.setupUi(self)
self.ui.version_lbl.setText(version_str)

131
qt/py/ui_AboutNUSGet.py Normal file
View File

@@ -0,0 +1,131 @@
# -*- coding: utf-8 -*-
################################################################################
## Form generated from reading UI file 'AboutNUSGet.ui'
##
## Created by: Qt User Interface Compiler version 6.9.0
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################
from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
QMetaObject, QObject, QPoint, QRect,
QSize, QTime, QUrl, Qt)
from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
QFont, QFontDatabase, QGradient, QIcon,
QImage, QKeySequence, QLinearGradient, QPainter,
QPalette, QPixmap, QRadialGradient, QTransform)
from PySide6.QtWidgets import (QAbstractButton, QApplication, QDialog, QDialogButtonBox,
QHBoxLayout, QLabel, QLayout, QSizePolicy,
QSpacerItem, QTextBrowser, QVBoxLayout, QWidget)
class Ui_AboutNUSGet(object):
def setupUi(self, AboutNUSGet):
if not AboutNUSGet.objectName():
AboutNUSGet.setObjectName(u"AboutNUSGet")
AboutNUSGet.resize(400, 300)
self.verticalLayout = QVBoxLayout(AboutNUSGet)
self.verticalLayout.setObjectName(u"verticalLayout")
self.outer_layout = QHBoxLayout()
self.outer_layout.setObjectName(u"outer_layout")
self.icon_layout = QVBoxLayout()
self.icon_layout.setObjectName(u"icon_layout")
self.icon_layout.setSizeConstraint(QLayout.SizeConstraint.SetDefaultConstraint)
self.icon_lbl = QLabel(AboutNUSGet)
icon = QIcon("resources/icon.png")
pixmap = icon.pixmap(QSize(75, 75))
self.icon_lbl.setPixmap(pixmap)
self.icon_lbl.setObjectName(u"icon_lbl")
self.icon_lbl.setMaximumSize(QSize(75, 75))
self.icon_layout.addWidget(self.icon_lbl)
self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
self.icon_layout.addItem(self.verticalSpacer)
self.outer_layout.addLayout(self.icon_layout)
self.details_layout = QVBoxLayout()
self.details_layout.setObjectName(u"details_layout")
self.about_title_lbl = QLabel(AboutNUSGet)
self.about_title_lbl.setObjectName(u"about_title_lbl")
font = QFont()
font.setPointSize(15)
font.setBold(True)
self.about_title_lbl.setFont(font)
self.details_layout.addWidget(self.about_title_lbl)
self.version_lbl = QLabel(AboutNUSGet)
self.version_lbl.setObjectName(u"version_lbl")
font1 = QFont()
font1.setBold(True)
self.version_lbl.setFont(font1)
self.details_layout.addWidget(self.version_lbl)
self.detail_text_lbl = QLabel(AboutNUSGet)
self.detail_text_lbl.setObjectName(u"detail_text_lbl")
self.detail_text_lbl.setWordWrap(True)
self.details_layout.addWidget(self.detail_text_lbl)
self.textBrowser = QTextBrowser(AboutNUSGet)
self.textBrowser.setObjectName(u"textBrowser")
self.details_layout.addWidget(self.textBrowser)
self.verticalSpacer_2 = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
self.details_layout.addItem(self.verticalSpacer_2)
self.horizontalSpacer = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
self.details_layout.addItem(self.horizontalSpacer)
self.outer_layout.addLayout(self.details_layout)
self.verticalLayout.addLayout(self.outer_layout)
self.buttonBox = QDialogButtonBox(AboutNUSGet)
self.buttonBox.setObjectName(u"buttonBox")
self.buttonBox.setOrientation(Qt.Orientation.Horizontal)
self.buttonBox.setStandardButtons(QDialogButtonBox.StandardButton.Close)
self.verticalLayout.addWidget(self.buttonBox)
self.retranslateUi(AboutNUSGet)
self.buttonBox.accepted.connect(AboutNUSGet.accept)
self.buttonBox.rejected.connect(AboutNUSGet.reject)
QMetaObject.connectSlotsByName(AboutNUSGet)
# setupUi
def retranslateUi(self, AboutNUSGet):
AboutNUSGet.setWindowTitle(QCoreApplication.translate("AboutNUSGet", u"Dialog", None))
self.icon_lbl.setText("")
self.about_title_lbl.setText(QCoreApplication.translate("AboutNUSGet", u"About NUSGet", None))
self.version_lbl.setText(QCoreApplication.translate("AboutNUSGet", u"Placeholder Version String", None))
self.detail_text_lbl.setText(QCoreApplication.translate("AboutNUSGet", u"Copyright (c) 2024-2025 NinjaCheetah & Contributors", None))
self.textBrowser.setHtml(QCoreApplication.translate("AboutNUSGet", u"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><meta charset=\"utf-8\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"hr { height: 1px; border-width: 0; }\n"
"li.unchecked::marker { content: \"\\2610\"; }\n"
"li.checked::marker { content: \"\\2612\"; }\n"
"</style></head><body style=\" font-family:'.AppleSystemUIFont'; font-size:13pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:700;\">Translations</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">German (Deutsch): <a href=\"https://github.com/yeah-its-gloria\"><span style=\" text-decoration: underline; color:#3586ff;\">yeah-its-gloria</span></a></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; mar"
"gin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Italian (Italiano): <a href=\"https://github.com/LNLenost\"><span style=\" text-decoration: underline; color:#3586ff;\">LNLenost</span></a></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Korean (\ud55c\uad6d\uc5b4): <a href=\"https://github.com/DDinghoya\"><span style=\" text-decoration: underline; color:#3586ff;\">DDinghoya</span></a></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Norwegian (Norsk): <a href=\"https://github.com/rolfiee\"><span style=\" text-decoration: underline; color:#3586ff;\">rolfiee</span></a></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Romanian (Rom\u00e2n\u0103): <a href=\"https://github.com/NotImplementedLife\"><span style=\" text-decoration: underline; color:#3586ff;\">"
"NotImplementedLife</span></a></p></body></html>", None))
# retranslateUi

View File

@@ -11,15 +11,16 @@
from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
QMetaObject, QObject, QPoint, QRect,
QSize, QTime, QUrl, Qt)
from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
QFont, QFontDatabase, QGradient, QIcon,
QImage, QKeySequence, QLinearGradient, QPainter,
QPalette, QPixmap, QRadialGradient, QTransform)
from PySide6.QtGui import (QAction, QBrush, QColor, QConicalGradient,
QCursor, QFont, QFontDatabase, QGradient,
QIcon, QImage, QKeySequence, QLinearGradient,
QPainter, QPalette, QPixmap, QRadialGradient,
QTransform)
from PySide6.QtWidgets import (QApplication, QCheckBox, QComboBox, QHBoxLayout,
QHeaderView, QLabel, QLayout, QLineEdit,
QMainWindow, QMenuBar, QPushButton, QSizePolicy,
QSpacerItem, QTabWidget, QTextBrowser, QTreeView,
QVBoxLayout, QWidget)
QMainWindow, QMenu, QMenuBar, QPushButton,
QSizePolicy, QSpacerItem, QTabWidget, QTextBrowser,
QTreeView, QVBoxLayout, QWidget)
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
@@ -28,6 +29,13 @@ class Ui_MainWindow(object):
MainWindow.resize(1010, 625)
MainWindow.setMinimumSize(QSize(1010, 625))
MainWindow.setMaximumSize(QSize(1010, 625))
self.actionAbout = QAction(MainWindow)
self.actionAbout.setObjectName(u"actionAbout")
icon = QIcon(QIcon.fromTheme(QIcon.ThemeIcon.HelpAbout))
self.actionAbout.setIcon(icon)
self.actionAbout_Qt = QAction(MainWindow)
self.actionAbout_Qt.setObjectName(u"actionAbout_Qt")
self.actionAbout_Qt.setIcon(icon)
self.centralwidget = QWidget(MainWindow)
self.centralwidget.setObjectName(u"centralwidget")
self.horizontalLayout_3 = QHBoxLayout(self.centralwidget)
@@ -457,8 +465,15 @@ class Ui_MainWindow(object):
self.menubar = QMenuBar(MainWindow)
self.menubar.setObjectName(u"menubar")
self.menubar.setGeometry(QRect(0, 0, 1010, 21))
self.menuHelp = QMenu(self.menubar)
self.menuHelp.setObjectName(u"menuHelp")
MainWindow.setMenuBar(self.menubar)
self.menubar.addAction(self.menuHelp.menuAction())
self.menuHelp.addAction(self.actionAbout)
self.menuHelp.addAction(self.actionAbout_Qt)
self.menuHelp.addSeparator()
self.retranslateUi(MainWindow)
self.platform_tabs.setCurrentIndex(0)
@@ -470,6 +485,8 @@ class Ui_MainWindow(object):
def retranslateUi(self, MainWindow):
MainWindow.setWindowTitle(QCoreApplication.translate("MainWindow", u"MainWindow", None))
self.actionAbout.setText(QCoreApplication.translate("MainWindow", u"About", None))
self.actionAbout_Qt.setText(QCoreApplication.translate("MainWindow", u"About Qt", None))
self.tree_filter_input.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Search", None))
self.tree_filter_reset_btn.setText(QCoreApplication.translate("MainWindow", u"Clear", None))
self.platform_tabs.setTabText(self.platform_tabs.indexOf(self.wii_tab), QCoreApplication.translate("MainWindow", u"Wii", None))
@@ -509,5 +526,6 @@ class Ui_MainWindow(object):
"li.checked::marker { content: \"\\2612\"; }\n"
"</style></head><body style=\" font-family:'.AppleSystemUIFont'; font-size:13pt; font-weight:400; font-style:normal;\">\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:9pt;\"><br /></p></body></html>", None))
self.menuHelp.setTitle(QCoreApplication.translate("MainWindow", u"Help", None))
# retranslateUi

185
qt/ui/AboutNUSGet.ui Normal file
View File

@@ -0,0 +1,185 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>AboutNUSGet</class>
<widget class="QDialog" name="AboutNUSGet">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="outer_layout">
<item>
<layout class="QVBoxLayout" name="icon_layout">
<property name="sizeConstraint">
<enum>QLayout::SizeConstraint::SetDefaultConstraint</enum>
</property>
<item>
<widget class="QLabel" name="icon_lbl">
<property name="maximumSize">
<size>
<width>75</width>
<height>75</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="details_layout">
<item>
<widget class="QLabel" name="about_title_lbl">
<property name="font">
<font>
<pointsize>15</pointsize>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>About NUSGet</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="version_lbl">
<property name="font">
<font>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Placeholder Version String</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="detail_text_lbl">
<property name="text">
<string>Copyright (c) 2024-2025 NinjaCheetah &amp; Contributors</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QTextBrowser" name="textBrowser">
<property name="html">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;meta charset=&quot;utf-8&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
hr { height: 1px; border-width: 0; }
li.unchecked::marker { content: &quot;\2610&quot;; }
li.checked::marker { content: &quot;\2612&quot;; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'.AppleSystemUIFont'; font-size:13pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:700;&quot;&gt;Translations&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;German (Deutsch): &lt;a href=&quot;https://github.com/yeah-its-gloria&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#3586ff;&quot;&gt;yeah-its-gloria&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Italian (Italiano): &lt;a href=&quot;https://github.com/LNLenost&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#3586ff;&quot;&gt;LNLenost&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Korean (한국어): &lt;a href=&quot;https://github.com/DDinghoya&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#3586ff;&quot;&gt;DDinghoya&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Norwegian (Norsk): &lt;a href=&quot;https://github.com/rolfiee&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#3586ff;&quot;&gt;rolfiee&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Romanian (Română): &lt;a href=&quot;https://github.com/NotImplementedLife&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#3586ff;&quot;&gt;NotImplementedLife&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::StandardButton::Close</set>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>AboutNUSGet</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>AboutNUSGet</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>

View File

@@ -735,7 +735,32 @@ li.checked::marker { content: &quot;\2612&quot;; }
<height>21</height>
</rect>
</property>
<widget class="QMenu" name="menuHelp">
<property name="title">
<string>Help</string>
</property>
<addaction name="actionAbout"/>
<addaction name="actionAbout_Qt"/>
<addaction name="separator"/>
</widget>
<addaction name="menuHelp"/>
</widget>
<action name="actionAbout">
<property name="icon">
<iconset theme="QIcon::ThemeIcon::HelpAbout"/>
</property>
<property name="text">
<string>About</string>
</property>
</action>
<action name="actionAbout_Qt">
<property name="icon">
<iconset theme="QIcon::ThemeIcon::HelpAbout"/>
</property>
<property name="text">
<string>About Qt</string>
</property>
</action>
</widget>
<resources/>
<connections/>