renamed some classes for clarity

This commit is contained in:
Faraphel 2023-12-29 22:54:40 +01:00
parent dd0f546d9b
commit cd4619fa00
6 changed files with 15 additions and 12 deletions

View file

@ -4,17 +4,17 @@
<context>
<name>FrameSurvey</name>
<message>
<location filename="source/widget/FrameSurvey.py" line="54"/>
<location filename="source/widget/SurveyEngine.py" line="54"/>
<source>ABANDON</source>
<translation>Abandonner</translation>
</message>
<message>
<location filename="source/widget/FrameSurvey.py" line="60"/>
<location filename="source/widget/SurveyEngine.py" line="60"/>
<source>SKIP</source>
<translation>Passer</translation>
</message>
<message>
<location filename="source/widget/FrameSurvey.py" line="65"/>
<location filename="source/widget/SurveyEngine.py" line="65"/>
<source>NEXT</source>
<translation>Suivant</translation>
</message>

View file

@ -5,7 +5,7 @@ from PyQt6.QtWidgets import QApplication
import translate
from source import assets_path
from source.widget import MyMainWindow
from source.widget import SurveyWindow
if __name__ == "__main__":
@ -25,7 +25,7 @@ if __name__ == "__main__":
translator.load(str(assets_path / f"language/{language_code}.qm"))
# create the window
window = MyMainWindow()
window = SurveyWindow()
window.show()
# start the application

View file

@ -1,2 +1,5 @@
PyQt6
PyQt6~=6.6.1
PyQt6-WebEngine
nextcord~=2.6.0
requests~=2.31.0

View file

@ -9,7 +9,7 @@ from typing import Optional
import nextcord
import requests
from PyQt6.QtCore import pyqtSignal
from PyQt6.QtWidgets import QFrame, QVBoxLayout, QHBoxLayout, QPushButton, QProgressBar
from PyQt6.QtWidgets import QFrame, QVBoxLayout, QHBoxLayout, QPushButton, QProgressBar, QWidget
from source.survey.base import BaseSurvey
from source.survey import Empty, survey_get
@ -19,7 +19,7 @@ result_path = Path("./result/")
result_path.mkdir(parents=True, exist_ok=True)
class FrameSurvey(QFrame):
class SurveyEngine(QWidget):
signal_abandon = pyqtSignal()
signal_skip = pyqtSignal()
signal_success = pyqtSignal()

View file

@ -7,11 +7,11 @@ from source import widget, assets_path
icon_path = assets_path / "icon.png"
class MyMainWindow(QMainWindow):
class SurveyWindow(QMainWindow):
def __init__(self):
super().__init__()
self.setWindowIcon(QIcon(str(icon_path.resolve())))
self.setWindowTitle(self.tr("SURVEY"))
self.setCentralWidget(widget.FrameSurvey("./surveys.json"))
self.setCentralWidget(widget.SurveyEngine("./surveys.json"))

View file

@ -1,3 +1,3 @@
from .Browser import Browser
from .FrameSurvey import FrameSurvey
from .MyMainWindow import MyMainWindow
from .SurveyEngine import SurveyEngine
from .SurveyWindow import SurveyWindow