Passage à PySide6 car licence plus permissive
This commit is contained in:
@@ -1,10 +1,19 @@
|
|||||||
PyQt6==6.10.2
|
altgraph==0.17.5
|
||||||
PyQt6-Qt6==6.10.2
|
|
||||||
PyQt6_sip==13.11.0
|
|
||||||
shiboken6==6.10.2
|
|
||||||
librt==0.8.1
|
librt==0.8.1
|
||||||
|
modulegraph==0.19.7
|
||||||
mypy==1.19.1
|
mypy==1.19.1
|
||||||
mypy_extensions==1.1.0
|
mypy_extensions==1.1.0
|
||||||
|
packaging==26.0
|
||||||
|
pathspec==1.0.4
|
||||||
|
pefile==2024.8.26
|
||||||
|
pyinstaller==6.19.0
|
||||||
|
pyinstaller-hooks-contrib==2026.2
|
||||||
|
PySide6==6.10.2
|
||||||
|
PySide6_Addons==6.10.2
|
||||||
|
PySide6_Essentials==6.10.2
|
||||||
|
pywin32-ctypes==0.2.3
|
||||||
|
setuptools==82.0.0
|
||||||
|
shiboken6==6.10.2
|
||||||
typing_extensions==4.15.0
|
typing_extensions==4.15.0
|
||||||
win11toast==0.36.3
|
win11toast==0.36.3
|
||||||
winrt-runtime==3.2.1
|
winrt-runtime==3.2.1
|
||||||
|
|||||||
@@ -1,32 +1,29 @@
|
|||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from PyQt6 import uic
|
from PySide6 import QtGui
|
||||||
from PyQt6.QtCore import Qt
|
from PySide6.QtCore import Qt
|
||||||
from PyQt6.QtGui import QFontDatabase, QFont
|
from PySide6.QtGui import QFontDatabase, QFont
|
||||||
from PyQt6.QtWidgets import QApplication, QMainWindow
|
from PySide6.QtUiTools import QUiLoader
|
||||||
|
from PySide6.QtWidgets import QMainWindow, QApplication
|
||||||
|
|
||||||
# Compile resources.qrc into resources_rc.py
|
# Compile resources.qrc into resources_rc.py
|
||||||
# rcc -g python .\resources.qrc -o .\src\resources_rc.py
|
# rcc -g python .\resources.qrc -o .\src\resources_rc.py
|
||||||
|
|
||||||
import resources as resources # This is generated from the .qrc file # noqa: F401
|
import resources as resources # This is generated from the .qrc file # noqa: F401
|
||||||
|
|
||||||
# À placer tout en haut, avant les imports PyQt6 si possible
|
|
||||||
if sys.platform.startswith('linux'):
|
|
||||||
os.environ["QT_QPA_PLATFORM"] = "xcb"
|
|
||||||
|
|
||||||
if sys.platform=='windows' or sys.platform=="win32":
|
if sys.platform=='windows' or sys.platform=="win32":
|
||||||
from win11toast import toast # type: ignore
|
from win11toast import toast # type: ignore
|
||||||
|
|
||||||
if getattr(sys, 'frozen', False) and hasattr(sys, '_MEIPASS'):
|
if getattr(sys, 'frozen', False) and hasattr(sys, '_MEIPASS'):
|
||||||
bundle_dir = Path(sys._MEIPASS)
|
bundle_dir = Path(sys._MEIPASS)
|
||||||
else:
|
else:
|
||||||
bundle_dir = Path(__file__).parent
|
bundle_dir = Path(__file__).parent.parent
|
||||||
|
|
||||||
# Remove this into final release
|
# Remove this into final release
|
||||||
from fake_patch_notes import patch_note
|
from fake_patch_notes import patch_note
|
||||||
NO_STAFF = True
|
|
||||||
|
|
||||||
|
NO_STAFF = True
|
||||||
CURRENT = os.path.dirname(os.path.realpath(__file__))
|
CURRENT = os.path.dirname(os.path.realpath(__file__))
|
||||||
|
|
||||||
def load_custom_font():
|
def load_custom_font():
|
||||||
@@ -42,67 +39,54 @@ def load_custom_font():
|
|||||||
return font_families[0]
|
return font_families[0]
|
||||||
|
|
||||||
class MainWindow(QMainWindow):
|
class MainWindow(QMainWindow):
|
||||||
|
def __init__(self):
|
||||||
|
super().__init__()
|
||||||
|
|
||||||
|
self.ui = QUiLoader().load(f"{bundle_dir}/ui/mainwindow.ui", self)
|
||||||
|
central = self.ui.centralWidget()
|
||||||
|
self.setCentralWidget(central)
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
|
||||||
super().__init__(*args, **kwargs)
|
|
||||||
# Remove the title bar and window frame
|
# Remove the title bar and window frame
|
||||||
self.setWindowFlags(Qt.WindowType.FramelessWindowHint | Qt.WindowType.Window)
|
self.setWindowFlags(Qt.WindowType.FramelessWindowHint | Qt.WindowType.Window)
|
||||||
|
|
||||||
# Optional: Make background transparent (if you want rounded corners, etc.)
|
# Optional: Make background transparent (if you want rounded corners, etc.)
|
||||||
self.setAttribute(Qt.WidgetAttribute.WA_TranslucentBackground)
|
self.setAttribute(Qt.WidgetAttribute.WA_TranslucentBackground)
|
||||||
|
|
||||||
# Track mouse position for dragging
|
# Track mouse position for dragging
|
||||||
self._drag_pos = None
|
self._drag_pos = None
|
||||||
|
|
||||||
uic.loadUi(f"{bundle_dir}/ui/mainwindow.ui", self)
|
|
||||||
|
|
||||||
# Fixe some qss properties not taken into account
|
|
||||||
self.subtitle_label.setStyleSheet("color: rgb(163, 177, 198);")
|
|
||||||
self.queue_position.setStyleSheet("color: rgb(17, 248, 183);")
|
|
||||||
|
|
||||||
if NO_STAFF :
|
if NO_STAFF :
|
||||||
self.staff_btn.hide()
|
self.ui.staff_btn.hide()
|
||||||
self.spacer_substitution.hide()
|
self.ui.spacer_substitution.hide()
|
||||||
|
|
||||||
self.info_text.setMarkdown(patch_note)
|
self.ui.info_text.setMarkdown(patch_note)
|
||||||
|
|
||||||
# Find the button by its objectName in Qt Designer
|
# Find the button by its objectName in Qt Designer
|
||||||
# Example: objectName = "close_btn"
|
# Example: objectName = "close_btn"
|
||||||
self.close_btn.clicked.connect(self.close_link)
|
self.ui.close_btn.clicked.connect(self.close)
|
||||||
self.minimize_btn.clicked.connect(self.minimize_link)
|
self.ui.minimize_btn.clicked.connect(self.showMinimized)
|
||||||
self.connexion_btn.clicked.connect(self.connexion_btn_link)
|
self.ui.connexion_btn.clicked.connect(self.connexion_btn_link)
|
||||||
|
|
||||||
@staticmethod
|
self.show()
|
||||||
def close_link():
|
|
||||||
sys.exit(app.exec())
|
|
||||||
|
|
||||||
def minimize_link(self):
|
|
||||||
# Minimize the application
|
|
||||||
self.setWindowState(Qt.WindowState.WindowMinimized)
|
|
||||||
|
|
||||||
# Mouse press event to start dragging
|
# Mouse press event to start dragging
|
||||||
def mousePressEvent(self, event):
|
def mousePressEvent(self, event: QtGui.QMouseEvent) -> None:
|
||||||
if event.button() == Qt.MouseButton.LeftButton:
|
if event.button() == Qt.MouseButton.LeftButton:
|
||||||
self._drag_pos = event.globalPosition().toPoint() - self.frameGeometry().topLeft()
|
self._drag_pos = event.globalPosition().toPoint() - self.frameGeometry().topLeft()
|
||||||
event.accept()
|
super().mousePressEvent(event)
|
||||||
|
|
||||||
# Mouse move event to drag window
|
# Mouse move event to drag window
|
||||||
def mouseMoveEvent(self, event):
|
def mouseMoveEvent(self, event: QtGui.QMouseEvent) -> None:
|
||||||
if event.buttons() == Qt.MouseButton.LeftButton and self._drag_pos is not None:
|
if event.buttons() & Qt.MouseButton.LeftButton and self._drag_pos is not None:
|
||||||
self.move(event.globalPosition().toPoint() - self._drag_pos)
|
self.move(event.globalPosition().toPoint() - self._drag_pos)
|
||||||
event.accept()
|
super().mouseMoveEvent(event)
|
||||||
|
|
||||||
# Mouse release event to stop dragging
|
# Mouse release event to stop dragging
|
||||||
def mouseReleaseEvent(self, event):
|
def mouseReleaseEvent(self, event):
|
||||||
self._drag_pos = None
|
self._drag_pos = None
|
||||||
event.accept()
|
super().mouseReleaseEvent(event)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def connexion_btn_link():
|
def connexion_btn_link():
|
||||||
icon = {
|
|
||||||
'src': ':/assets/background.png',
|
|
||||||
'placement': 'appLogoOverride'
|
|
||||||
}
|
|
||||||
buttons = [
|
buttons = [
|
||||||
{'activationType': 'protocol', 'arguments': '', 'content': 'Entrer en jeu'},
|
{'activationType': 'protocol', 'arguments': '', 'content': 'Entrer en jeu'},
|
||||||
]
|
]
|
||||||
@@ -124,5 +108,5 @@ if __name__ == "__main__":
|
|||||||
app.setStyleSheet(style)
|
app.setStyleSheet(style)
|
||||||
|
|
||||||
window = MainWindow()
|
window = MainWindow()
|
||||||
window.show()
|
|
||||||
sys.exit(app.exec())
|
sys.exit(app.exec())
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
# Created by: The Resource Compiler for Qt version 6.10.2
|
# Created by: The Resource Compiler for Qt version 6.10.2
|
||||||
# WARNING! All changes made in this file will be lost!
|
# WARNING! All changes made in this file will be lost!
|
||||||
|
|
||||||
from PyQt6 import QtCore
|
from PySide6 import QtCore
|
||||||
|
|
||||||
qt_resource_data = b"\
|
qt_resource_data = b"\
|
||||||
\x00\x00\x0bp\
|
\x00\x00\x0bp\
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
QLabel#maintitle_label {
|
QLabel#maintitle_label {
|
||||||
font-size: 38px;
|
font-size: 38px;
|
||||||
|
color: rgb(255, 255, 255);
|
||||||
}
|
}
|
||||||
|
|
||||||
QLabel#subtitle_label {
|
QLabel#subtitle_label {
|
||||||
@@ -18,9 +19,14 @@ QLabel#queue_position {
|
|||||||
color: rgb(17, 248, 183);
|
color: rgb(17, 248, 183);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QLabel#queue_lbl {
|
||||||
|
color: rgb(255, 255, 255);
|
||||||
|
}
|
||||||
|
|
||||||
QPushButton#connexion_btn {
|
QPushButton#connexion_btn {
|
||||||
border-radius: 15px;
|
border-radius: 15px;
|
||||||
background-color: rgb(255, 120, 0);
|
background-color: rgb(255, 120, 0);
|
||||||
|
color: rgb(255, 255, 255);
|
||||||
}
|
}
|
||||||
|
|
||||||
QPushButton#connexion_btn:hover {
|
QPushButton#connexion_btn:hover {
|
||||||
@@ -32,6 +38,7 @@ QPushButton#intranet_btn
|
|||||||
{
|
{
|
||||||
border-radius: 15px;
|
border-radius: 15px;
|
||||||
background-color: rgb(32, 58, 67);
|
background-color: rgb(32, 58, 67);
|
||||||
|
color: rgb(255, 255, 255);
|
||||||
}
|
}
|
||||||
|
|
||||||
QPushButton#discord_btn:hover,
|
QPushButton#discord_btn:hover,
|
||||||
@@ -73,6 +80,7 @@ QFrame#info_frame{
|
|||||||
QTextEdit#info_text {
|
QTextEdit#info_text {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
border: none;
|
border: none;
|
||||||
|
color: rgb(255, 255, 255);
|
||||||
}
|
}
|
||||||
|
|
||||||
QSlider::groove:horizontal {
|
QSlider::groove:horizontal {
|
||||||
|
|||||||
@@ -41,9 +41,6 @@
|
|||||||
<iconset resource="../resources.qrc">
|
<iconset resource="../resources.qrc">
|
||||||
<normaloff>:/assets/Icone.ico</normaloff>:/assets/Icone.ico</iconset>
|
<normaloff>:/assets/Icone.ico</normaloff>:/assets/Icone.ico</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">color: rgb(255, 255, 255);</string>
|
|
||||||
</property>
|
|
||||||
<widget class="QWidget" name="main_container">
|
<widget class="QWidget" name="main_container">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
@@ -351,7 +348,7 @@
|
|||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_8">
|
<layout class="QHBoxLayout" name="horizontalLayout_8">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="queue_lbl">
|
||||||
<property name="autoFillBackground">
|
<property name="autoFillBackground">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
|||||||
@@ -1,24 +1,20 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
## Form generated from reading UI file 'mainwindow.ui'
|
## Form generated from reading UI file 'mainwindowdJHBSQ.ui'
|
||||||
##
|
##
|
||||||
## Created by: Qt User Interface Compiler version 6.10.2
|
## 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!
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
from PyQt6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
|
|
||||||
QMetaObject, QObject, QPoint, QRect,
|
|
||||||
QSize, QTime, QUrl, Qt)
|
|
||||||
from PyQt6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
|
|
||||||
QFont, QFontDatabase, QGradient, QIcon,
|
|
||||||
QImage, QKeySequence, QLinearGradient, QPainter,
|
|
||||||
QPalette, QPixmap, QRadialGradient, QTransform)
|
|
||||||
from PyQt6.QtWidgets import (QApplication, QFrame, QHBoxLayout, QLabel,
|
|
||||||
QMainWindow, QPushButton, QSizePolicy, QSlider,
|
|
||||||
QSpacerItem, QTextEdit, QVBoxLayout, QWidget)
|
|
||||||
import resources_rc
|
import resources_rc
|
||||||
|
from PySide6.QtCore import (QCoreApplication, QMetaObject, QSize, Qt)
|
||||||
|
from PySide6.QtGui import (QIcon)
|
||||||
|
from PySide6.QtWidgets import (QFrame, QHBoxLayout, QLabel,
|
||||||
|
QPushButton, QSizePolicy, QSlider,
|
||||||
|
QSpacerItem, QTextEdit, QVBoxLayout, QWidget)
|
||||||
|
|
||||||
|
|
||||||
class Ui_MainWindow(object):
|
class Ui_MainWindow(object):
|
||||||
def setupUi(self, MainWindow):
|
def setupUi(self, MainWindow):
|
||||||
@@ -37,7 +33,6 @@ class Ui_MainWindow(object):
|
|||||||
icon = QIcon()
|
icon = QIcon()
|
||||||
icon.addFile(u":/assets/Icone.ico", QSize(), QIcon.Mode.Normal, QIcon.State.Off)
|
icon.addFile(u":/assets/Icone.ico", QSize(), QIcon.Mode.Normal, QIcon.State.Off)
|
||||||
MainWindow.setWindowIcon(icon)
|
MainWindow.setWindowIcon(icon)
|
||||||
MainWindow.setStyleSheet(u"color: rgb(255, 255, 255);")
|
|
||||||
self.main_container = QWidget(MainWindow)
|
self.main_container = QWidget(MainWindow)
|
||||||
self.main_container.setObjectName(u"main_container")
|
self.main_container.setObjectName(u"main_container")
|
||||||
self.main_container.setMinimumSize(QSize(1199, 703))
|
self.main_container.setMinimumSize(QSize(1199, 703))
|
||||||
@@ -144,12 +139,12 @@ class Ui_MainWindow(object):
|
|||||||
self.frame_5.setFrameShadow(QFrame.Shadow.Raised)
|
self.frame_5.setFrameShadow(QFrame.Shadow.Raised)
|
||||||
self.horizontalLayout_8 = QHBoxLayout(self.frame_5)
|
self.horizontalLayout_8 = QHBoxLayout(self.frame_5)
|
||||||
self.horizontalLayout_8.setObjectName(u"horizontalLayout_8")
|
self.horizontalLayout_8.setObjectName(u"horizontalLayout_8")
|
||||||
self.label = QLabel(self.frame_5)
|
self.queue_lbl = QLabel(self.frame_5)
|
||||||
self.label.setObjectName(u"label")
|
self.queue_lbl.setObjectName(u"queue_lbl")
|
||||||
self.label.setAutoFillBackground(False)
|
self.queue_lbl.setAutoFillBackground(False)
|
||||||
self.label.setAlignment(Qt.AlignmentFlag.AlignCenter)
|
self.queue_lbl.setAlignment(Qt.AlignmentFlag.AlignCenter)
|
||||||
|
|
||||||
self.horizontalLayout_8.addWidget(self.label)
|
self.horizontalLayout_8.addWidget(self.queue_lbl)
|
||||||
|
|
||||||
self.queue_position = QLabel(self.frame_5)
|
self.queue_position = QLabel(self.frame_5)
|
||||||
self.queue_position.setObjectName(u"queue_position")
|
self.queue_position.setObjectName(u"queue_position")
|
||||||
@@ -387,7 +382,7 @@ class Ui_MainWindow(object):
|
|||||||
MainWindow.setWindowTitle(QCoreApplication.translate("MainWindow", u"MainWindow", None))
|
MainWindow.setWindowTitle(QCoreApplication.translate("MainWindow", u"MainWindow", None))
|
||||||
self.minimize_btn.setText("")
|
self.minimize_btn.setText("")
|
||||||
self.close_btn.setText("")
|
self.close_btn.setText("")
|
||||||
self.label.setText(QCoreApplication.translate("MainWindow", u"Position en file d'attente: ", None))
|
self.queue_lbl.setText(QCoreApplication.translate("MainWindow", u"Position en file d'attente: ", None))
|
||||||
self.queue_position.setText(QCoreApplication.translate("MainWindow", u"20", None))
|
self.queue_position.setText(QCoreApplication.translate("MainWindow", u"20", None))
|
||||||
self.volume_btn.setText("")
|
self.volume_btn.setText("")
|
||||||
self.maintitle_label.setText(QCoreApplication.translate("MainWindow", u"LA TANI\u00c8RE", None))
|
self.maintitle_label.setText(QCoreApplication.translate("MainWindow", u"LA TANI\u00c8RE", None))
|
||||||
|
|||||||
Reference in New Issue
Block a user