Rework About dialog: licence, copyright, proper version display

- about_win.ui: QVBoxLayout, version shown in a word-wrap QLabel
  (sized to content, no oversized text area), add labelCopyright
  (© 2025-2026 François Dausseur) and labelLicence (EUPL-1.2 link)
- about_win.py: regenerated from UI
- testium_win.py: set labelVersion from get_testium_version() (branch,
  dirty flag, commit or binary/Flatpak label)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-01 19:30:37 +02:00
parent d7f25718d0
commit a70b70db54
3 changed files with 142 additions and 151 deletions

View File

@@ -3,7 +3,7 @@
################################################################################
## Form generated from reading UI file 'about_win.ui'
##
## Created by: Qt User Interface Compiler version 6.11.0
## Created by: Qt User Interface Compiler version 6.10.2
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################
@@ -16,39 +16,50 @@ from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
QImage, QKeySequence, QLinearGradient, QPainter,
QPalette, QPixmap, QRadialGradient, QTransform)
from PySide6.QtWidgets import (QAbstractButton, QApplication, QDialog, QDialogButtonBox,
QFrame, QLabel, QPlainTextEdit, QSizePolicy,
QWidget)
QLabel, QSizePolicy, QVBoxLayout, QWidget)
import about_win_rc
class Ui_About(object):
def setupUi(self, About):
if not About.objectName():
About.setObjectName(u"About")
About.resize(400, 247)
self.buttonBox = QDialogButtonBox(About)
self.buttonBox.setObjectName(u"buttonBox")
self.buttonBox.setGeometry(QRect(30, 200, 341, 32))
self.buttonBox.setOrientation(Qt.Horizontal)
self.buttonBox.setStandardButtons(QDialogButtonBox.Ok)
About.resize(500, 220)
self.verticalLayout = QVBoxLayout(About)
self.verticalLayout.setSpacing(6)
self.verticalLayout.setObjectName(u"verticalLayout")
self.verticalLayout.setContentsMargins(20, 16, 20, 16)
self.label = QLabel(About)
self.label.setObjectName(u"label")
self.label.setGeometry(QRect(30, 20, 341, 31))
font = QFont()
font.setPointSize(14)
self.label.setFont(font)
self.label.setWordWrap(True)
self.verticalLayout.addWidget(self.label)
self.labelVersion = QLabel(About)
self.labelVersion.setObjectName(u"labelVersion")
self.labelVersion.setGeometry(QRect(30, 60, 341, 16))
self.plainTextEdit = QPlainTextEdit(About)
self.plainTextEdit.setObjectName(u"plainTextEdit")
self.plainTextEdit.setGeometry(QRect(30, 100, 341, 91))
self.plainTextEdit.setFrameShape(QFrame.NoFrame)
self.plainTextEdit.setFrameShadow(QFrame.Sunken)
self.plainTextEdit.setReadOnly(True)
self.labelCesUnitVersion = QLabel(About)
self.labelCesUnitVersion.setObjectName(u"labelCesUnitVersion")
self.labelCesUnitVersion.setGeometry(QRect(30, 70, 341, 16))
self.labelVersion.setWordWrap(True)
self.verticalLayout.addWidget(self.labelVersion)
self.labelCopyright = QLabel(About)
self.labelCopyright.setObjectName(u"labelCopyright")
self.verticalLayout.addWidget(self.labelCopyright)
self.labelLicence = QLabel(About)
self.labelLicence.setObjectName(u"labelLicence")
self.labelLicence.setOpenExternalLinks(True)
self.verticalLayout.addWidget(self.labelLicence)
self.buttonBox = QDialogButtonBox(About)
self.buttonBox.setObjectName(u"buttonBox")
self.buttonBox.setOrientation(Qt.Horizontal)
self.buttonBox.setStandardButtons(QDialogButtonBox.Ok)
self.verticalLayout.addWidget(self.buttonBox)
self.retranslateUi(About)
self.buttonBox.accepted.connect(About.accept)
@@ -57,10 +68,10 @@ class Ui_About(object):
# setupUi
def retranslateUi(self, About):
About.setWindowTitle(QCoreApplication.translate("About", u"A propos", None))
About.setWindowTitle(QCoreApplication.translate("About", u"\u00c0 propos", None))
self.label.setText(QCoreApplication.translate("About", u"Testium", None))
self.labelVersion.setText(QCoreApplication.translate("About", u"Version", None))
self.plainTextEdit.setPlainText(QCoreApplication.translate("About", u"This gui was developed with the help of Qt by Fran\u00e7ois Dausseur.", None))
self.labelCesUnitVersion.setText(QCoreApplication.translate("About", u"Version", None))
self.labelVersion.setText("")
self.labelCopyright.setText(QCoreApplication.translate("About", u"\u00a9 2025-2026 Fran\u00e7ois Dausseur", None))
self.labelLicence.setText(QCoreApplication.translate("About", u"Licensed under <a href=\"https://eupl.eu/1.2/en/\">EUPL-1.2</a>", None))
# retranslateUi

View File

@@ -1,123 +1,104 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>About</class>
<widget class="QDialog" name="About">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>247</height>
</rect>
</property>
<property name="windowTitle">
<string>A propos</string>
</property>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="geometry">
<rect>
<x>30</x>
<y>200</y>
<width>341</width>
<height>32</height>
</rect>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Ok</set>
</property>
</widget>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>30</x>
<y>20</y>
<width>341</width>
<height>31</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>14</pointsize>
</font>
</property>
<property name="text">
<string>Testium</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
<widget class="QLabel" name="labelVersion">
<property name="geometry">
<rect>
<x>30</x>
<y>60</y>
<width>341</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Version</string>
</property>
</widget>
<widget class="QPlainTextEdit" name="plainTextEdit">
<property name="geometry">
<rect>
<x>30</x>
<y>100</y>
<width>341</width>
<height>91</height>
</rect>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
<property name="plainText">
<string>This gui was developed with the help of Qt by François Dausseur.</string>
</property>
</widget>
<widget class="QLabel" name="labelCesUnitVersion">
<property name="geometry">
<rect>
<x>30</x>
<y>70</y>
<width>341</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Version</string>
</property>
</widget>
</widget>
<resources>
<include location="../resources/about_win.qrc"/>
</resources>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>About</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>
</connections>
</ui>
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>About</class>
<widget class="QDialog" name="About">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>500</width>
<height>220</height>
</rect>
</property>
<property name="windowTitle">
<string>À propos</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="leftMargin">
<number>20</number>
</property>
<property name="topMargin">
<number>16</number>
</property>
<property name="rightMargin">
<number>20</number>
</property>
<property name="bottomMargin">
<number>16</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<item>
<widget class="QLabel" name="label">
<property name="font">
<font>
<pointsize>14</pointsize>
</font>
</property>
<property name="text">
<string>Testium</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="labelVersion">
<property name="text">
<string/>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="labelCopyright">
<property name="text">
<string>© 2025-2026 François Dausseur</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="labelLicence">
<property name="text">
<string>Licensed under &lt;a href=&quot;https://eupl.eu/1.2/en/&quot;&gt;EUPL-1.2&lt;/a&gt;</string>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout>
</widget>
<resources>
<include location="../resources/about_win.qrc"/>
</resources>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>About</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>
</connections>
</ui>

View File

@@ -40,11 +40,11 @@ from main_win.test_run.test_run import ThreadTestStatus
import interpreter.utils.settings as prefs
from lib.stdout_redirect import stdio_redir
import libs.testium as tm
from interpreter.utils.version import get_testium_version
from interpreter.utils.test_init import (
env_init,
locate_report_file,
)
from interpreter.utils.version import get_testium_version
from lib.tum_except import ETUMFileError, ETUMRuntimeError
from main_win.test_controller_service import TestControllerService
from main_win.test_runner import TestRunner, TestState
@@ -206,8 +206,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
self.d_about_win = QDialog()
self.about_win = Ui_About()
self.about_win.setupUi(self.d_about_win)
self.about_win.labelVersion.setText("testium - " + get_testium_version())
self.about_win.labelCesUnitVersion.setText("")
self.about_win.labelVersion.setText(get_testium_version())
self.d_about_win.setModal(True)
self.d_f1_win = DialogF1(self)