diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..32c93a6 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,15 @@ +root = true + +[*] +charset = utf-8 +trim_trailing_whitespace = true +end_of_line = lf +indent_style = space +insert_final_newline = true +indent_size = 2 + +[*.py] +indent_size = 4 + +[pyproject.toml] +indent_size = 4 \ No newline at end of file diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..8fea75e --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,14 @@ +{ + "recommendations": [ + "ms-python.python", + "ms-python.debugpy", + "ms-python.vscode-pylance", + "ms-python.vscode-python-envs", + "ms-python.mypy-type-checker", + "charliermarsh.ruff", + "editorconfig.editorconfig", + "njpwerner.autodocstring", + "redhat.vscode-yaml", + "tamasfe.even-better-toml" + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..55720e3 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "python.analysis.autoImportCompletions": true, + "python.analysis.extraPaths": [".venv/lib/python3.11/site-packages"], + "python.analysis.fixAll": ["source.unusedImports"], + "python.languageServer": "Pylance" +} diff --git a/mainwindow.py b/mainwindow.py index ebd5781..400eb23 100644 --- a/mainwindow.py +++ b/mainwindow.py @@ -6,14 +6,14 @@ from PyQt6.QtCore import Qt from PyQt6.QtGui import QFontDatabase, QFont, QColor from PyQt6.QtWidgets import QApplication, QMainWindow -from win11toast import toast +from win11toast import toast, notify from slidergroovecolorstyle import ThinSubPageLineStyle, ThinAddPageLineStyle # Compile resources.qrc into resources_rc.py # rcc -g python resources.qrc -o resources_rc.py -import resources # This is generated from the .qrc file +import 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'): @@ -96,7 +96,14 @@ class MainWindow(QMainWindow): event.accept() def connexion_btn_link(self): - toast('Hello Python🐍') + icon = { + 'src': ':/assets/background.png', + 'placement': 'appLogoOverride' + } + buttons = [ + {'activationType': 'protocol', 'arguments': '', 'content': 'Entrer en jeu'}, + ] + toast('C\'est enfin à ton tour d\'entrer en jeu! 🎮🐍', app_id='LaTanière Launcher',buttons=buttons) if __name__ == "__main__": @@ -114,4 +121,4 @@ if __name__ == "__main__": app.setFont(custom_font) window = MainWindow() window.show() - sys.exit(app.exec()) \ No newline at end of file + sys.exit(app.exec()) diff --git a/pyproject.toml b/pyproject.toml index 3ebbab1..2fcf249 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,3 +7,8 @@ requires-python = ">=3.14" dependencies = [ "pyside6>=6.10.2", ] + +[tool.mypy] +[[tool.mypy.overrides]] +module = ["win11toast.*"] +follow_untyped_imports = true