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' ## 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! ## 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, QImage, QKeySequence, QLinearGradient, QPainter,
QPalette, QPixmap, QRadialGradient, QTransform) QPalette, QPixmap, QRadialGradient, QTransform)
from PySide6.QtWidgets import (QAbstractButton, QApplication, QDialog, QDialogButtonBox, from PySide6.QtWidgets import (QAbstractButton, QApplication, QDialog, QDialogButtonBox,
QFrame, QLabel, QPlainTextEdit, QSizePolicy, QLabel, QSizePolicy, QVBoxLayout, QWidget)
QWidget)
import about_win_rc import about_win_rc
class Ui_About(object): class Ui_About(object):
def setupUi(self, About): def setupUi(self, About):
if not About.objectName(): if not About.objectName():
About.setObjectName(u"About") About.setObjectName(u"About")
About.resize(400, 247) About.resize(500, 220)
self.buttonBox = QDialogButtonBox(About) self.verticalLayout = QVBoxLayout(About)
self.buttonBox.setObjectName(u"buttonBox") self.verticalLayout.setSpacing(6)
self.buttonBox.setGeometry(QRect(30, 200, 341, 32)) self.verticalLayout.setObjectName(u"verticalLayout")
self.buttonBox.setOrientation(Qt.Horizontal) self.verticalLayout.setContentsMargins(20, 16, 20, 16)
self.buttonBox.setStandardButtons(QDialogButtonBox.Ok)
self.label = QLabel(About) self.label = QLabel(About)
self.label.setObjectName(u"label") self.label.setObjectName(u"label")
self.label.setGeometry(QRect(30, 20, 341, 31))
font = QFont() font = QFont()
font.setPointSize(14) font.setPointSize(14)
self.label.setFont(font) self.label.setFont(font)
self.label.setWordWrap(True)
self.verticalLayout.addWidget(self.label)
self.labelVersion = QLabel(About) self.labelVersion = QLabel(About)
self.labelVersion.setObjectName(u"labelVersion") self.labelVersion.setObjectName(u"labelVersion")
self.labelVersion.setGeometry(QRect(30, 60, 341, 16)) self.labelVersion.setWordWrap(True)
self.plainTextEdit = QPlainTextEdit(About)
self.plainTextEdit.setObjectName(u"plainTextEdit") self.verticalLayout.addWidget(self.labelVersion)
self.plainTextEdit.setGeometry(QRect(30, 100, 341, 91))
self.plainTextEdit.setFrameShape(QFrame.NoFrame) self.labelCopyright = QLabel(About)
self.plainTextEdit.setFrameShadow(QFrame.Sunken) self.labelCopyright.setObjectName(u"labelCopyright")
self.plainTextEdit.setReadOnly(True)
self.labelCesUnitVersion = QLabel(About) self.verticalLayout.addWidget(self.labelCopyright)
self.labelCesUnitVersion.setObjectName(u"labelCesUnitVersion")
self.labelCesUnitVersion.setGeometry(QRect(30, 70, 341, 16)) 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.retranslateUi(About)
self.buttonBox.accepted.connect(About.accept) self.buttonBox.accepted.connect(About.accept)
@@ -57,10 +68,10 @@ class Ui_About(object):
# setupUi # setupUi
def retranslateUi(self, About): 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.label.setText(QCoreApplication.translate("About", u"Testium", None))
self.labelVersion.setText(QCoreApplication.translate("About", u"Version", None)) self.labelVersion.setText("")
self.plainTextEdit.setPlainText(QCoreApplication.translate("About", u"This gui was developed with the help of Qt by Fran\u00e7ois Dausseur.", None)) self.labelCopyright.setText(QCoreApplication.translate("About", u"\u00a9 2025-2026 Fran\u00e7ois Dausseur", None))
self.labelCesUnitVersion.setText(QCoreApplication.translate("About", u"Version", None)) self.labelLicence.setText(QCoreApplication.translate("About", u"Licensed under <a href=\"https://eupl.eu/1.2/en/\">EUPL-1.2</a>", None))
# retranslateUi # retranslateUi

View File

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

View File

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