├── .github
├── dependabot.yml
└── workflows
│ └── build.yml
├── .gitignore
├── Justfile
├── LICENSE
├── README.MD
├── build-aux
├── generate-lupdate-project-file.py
├── generate-qt-creator-project-file.py
└── icon.ico
├── data
├── app-icon.svg
├── icons
│ ├── close_black_24dp.svg
│ ├── close_fullscreen_black_24dp.svg
│ ├── minimize_black_24dp.svg
│ └── open_in_full_black_24dp.svg
└── qtquickcontrols2.conf
├── docs
├── internationalization.md
└── picture.png
├── i18n
├── de_DE.ts
└── he_IL.ts
├── main.py
├── myapp
├── __init__.py
├── application.py
├── framelesswindow
│ ├── __init__.py
│ ├── linux
│ │ ├── __init__.py
│ │ └── event.py
│ └── win
│ │ ├── __init__.py
│ │ ├── c_structures.py
│ │ ├── effect.py
│ │ └── event.py
├── pyobjects
│ ├── __init__.py
│ └── example_singleton.py
└── startup.py
├── pyproject.toml
├── qml
├── app
│ ├── MyAppMainPage.qml
│ └── qmldir
├── header
│ ├── MyAppHeader.qml
│ ├── MyAppHeaderContent.qml
│ ├── MyAppHelpMenu.qml
│ ├── MyAppMenu1.qml
│ ├── MyAppMenu2.qml
│ ├── MyAppOptionsMenu.qml
│ └── qmldir
├── main.qml
├── models
│ ├── MyAppLanguageModel.qml
│ ├── qmldir
│ └── tst_MyAppLanguageModel.qml
└── shared
│ ├── MyAppAutoWidthMenu.qml
│ └── qmldir
├── test
├── __init__.py
└── services
│ ├── __init__.py
│ └── test_resource_availability.py
└── uv.lock
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | # Set update schedule for GitHub Actions
2 |
3 | version: 2
4 |
5 | updates:
6 | - package-ecosystem: "github-actions"
7 | directory: "/"
8 | schedule:
9 | interval: "monthly"
10 |
--------------------------------------------------------------------------------
/.github/workflows/build.yml:
--------------------------------------------------------------------------------
1 | name: 'Build'
2 |
3 | on:
4 | push:
5 | branches: ['**']
6 |
7 | defaults:
8 | run:
9 | shell: bash
10 |
11 | jobs:
12 | matrix-build:
13 | strategy:
14 | matrix:
15 | os:
16 | - windows-latest
17 | - ubuntu-24.04
18 | runs-on: ${{ matrix.os }}
19 | name: Build (${{ matrix.os }})
20 | outputs:
21 | artifact_app_name: ${{ steps.build_step.outputs.artifact_app_name }}
22 | steps:
23 | - name: Checkout Repository
24 | uses: actions/checkout@v4
25 | with:
26 | fetch-depth: 0
27 | - name: Install Python 3.13
28 | uses: actions/setup-python@v5
29 | with:
30 | python-version: "3.13"
31 | - name: Install just
32 | uses: taiki-e/install-action@just
33 | - name: Install uv
34 | uses: astral-sh/setup-uv@v6
35 | with:
36 | enable-cache: false
37 | - name: Run Build
38 | id: build_step
39 | run: |
40 | set -euo pipefail
41 |
42 | function debug() { echo -e "\033[0;35m$*\033[0m"; }
43 | function execute() { echo -e "\033[0;34m$*\033[0m"; "$@"; }
44 |
45 | #
46 | echo "::group::Remove Qml Test Files"
47 | execute find . -type f -name 'tst_*' -delete
48 | echo "::endgroup::"
49 |
50 | #
51 | echo "::group::Set Build Information"
52 | CURRENT_COMMIT="$(git rev-parse HEAD)"
53 | CURRENT_COMMIT="${CURRENT_COMMIT:0:8}"
54 | echo "git commit: $CURRENT_COMMIT"
55 |
56 | ARTIFACT_APP_NAME="MyApp-$CURRENT_COMMIT"
57 | echo "artifact app name: $ARTIFACT_APP_NAME"
58 | echo "artifact_app_name=$ARTIFACT_APP_NAME" >> $GITHUB_OUTPUT
59 | echo "::endgroup::"
60 |
61 | #
62 | echo "::group::Setup Virtual Environment"
63 | execute just init
64 | echo "::endgroup::"
65 |
66 | #
67 | echo "::group::Run Python Build"
68 | execute just test-python
69 | execute just clean
70 | execute just build
71 | echo "::endgroup::"
72 |
73 | #
74 | RELEASE_NAME="release-build-${RUNNER_OS@L}"
75 | echo "release_name=$RELEASE_NAME" >> $GITHUB_OUTPUT
76 | debug "Uploading build/release as $RELEASE_NAME"
77 | - name: Upload Build Artifact
78 | uses: actions/upload-artifact@v4
79 | with:
80 | path: build/release
81 | name: ${{ steps.build_step.outputs.release_name }}
82 |
83 | test_qml:
84 | runs-on: ubuntu-latest
85 | name: Test Qml
86 | steps:
87 | - name: Checkout Repository
88 | uses: actions/checkout@v4
89 | - name: Install Qt 6.8.*
90 | uses: jurplel/install-qt-action@v4
91 | with:
92 | arch: linux_gcc_64
93 | version: 6.8.*
94 | - name: Install just
95 | uses: taiki-e/install-action@just
96 | - name: Execute Qml Tests
97 | run: just test-qml
98 |
99 | distributable-windows:
100 | runs-on: windows-latest
101 | name: Build Windows
102 | needs:
103 | - matrix-build
104 | - test_qml
105 | steps:
106 | - name: Checkout Repository
107 | uses: actions/checkout@v4
108 | - name: Install Python 3.13
109 | uses: actions/setup-python@v5
110 | with:
111 | python-version: "3.13"
112 | - name: Install just
113 | uses: taiki-e/install-action@just
114 | - name: Install uv
115 | uses: astral-sh/setup-uv@v6
116 | with:
117 | enable-cache: false
118 | - name: Remove Python sources
119 | run: rm -rf myapp main.py
120 | - name: Download Build Artifact
121 | uses: actions/download-artifact@v4
122 | with:
123 | path: build/release
124 | name: release-build-windows
125 | - name: Setup Build Environment
126 | run: |
127 | just init '--no-group dev'
128 | uv pip install pyinstaller
129 | - name: Build Bundle
130 | run: |
131 | source .venv/Scripts/activate
132 | pyinstaller \
133 | --name MyApp \
134 | --workpath build-windows \
135 | --icon=build-aux/icon.ico \
136 | --collect-binaries PySide6 \
137 | --add-data "LICENSE;." \
138 | --noconsole \
139 | build/release/main.py
140 | - name: Remove Redundant Binaries
141 | run: |
142 | find dist/MyApp -type f -name 'Qt6WebEngineCore.dll' -delete
143 | find dist/MyApp -type f -name 'QtWidgets.pyd' -delete
144 | find dist/MyApp -type f -name 'opengl32sw.dll' -delete
145 | find dist/MyApp -type f -name 'qt6qmlcompiler.dll' -delete
146 | - name: Upload Artifact
147 | uses: actions/upload-artifact@v4
148 | with:
149 | name: ${{ needs.matrix-build.outputs.artifact_app_name }}-win-x86_64
150 | path: dist/MyApp
151 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Created by https://www.toptal.com/developers/gitignore/api/python,pycharm,qt,qtcreator,vscode,sublimetext,qml,linux,windows,macos,vim,emacs
2 | # Edit at https://www.toptal.com/developers/gitignore?templates=python,pycharm,qt,qtcreator,vscode,sublimetext,qml,linux,windows,macos,vim,emacs
3 |
4 | ### Emacs ###
5 | # -*- mode: gitignore; -*-
6 | *~
7 | \#*\#
8 | /.emacs.desktop
9 | /.emacs.desktop.lock
10 | *.elc
11 | auto-save-list
12 | tramp
13 | .\#*
14 |
15 | # Org-mode
16 | .org-id-locations
17 | *_archive
18 | ltximg/**
19 |
20 | # flymake-mode
21 | *_flymake.*
22 |
23 | # eshell files
24 | /eshell/history
25 | /eshell/lastdir
26 |
27 | # elpa packages
28 | /elpa/
29 |
30 | # reftex files
31 | *.rel
32 |
33 | # AUCTeX auto folder
34 | /auto/
35 |
36 | # cask packages
37 | .cask/
38 | dist/
39 |
40 | # Flycheck
41 | flycheck_*.el
42 |
43 | # server auth directory
44 | /server/
45 |
46 | # projectiles files
47 | .projectile
48 |
49 | # directory configuration
50 | .dir-locals.el
51 |
52 | # network security
53 | /network-security.data
54 |
55 |
56 | ### Linux ###
57 |
58 | # temporary files which can be created if a process still has a handle open of a deleted file
59 | .fuse_hidden*
60 |
61 | # KDE directory preferences
62 | .directory
63 |
64 | # Linux trash folder which might appear on any partition or disk
65 | .Trash-*
66 |
67 | # .nfs files are created when an open file is removed but is still being accessed
68 | .nfs*
69 |
70 | ### macOS ###
71 | # General
72 | .DS_Store
73 | .AppleDouble
74 | .LSOverride
75 |
76 | # Icon must end with two \r
77 | Icon
78 |
79 |
80 | # Thumbnails
81 | ._*
82 |
83 | # Files that might appear in the root of a volume
84 | .DocumentRevisions-V100
85 | .fseventsd
86 | .Spotlight-V100
87 | .TemporaryItems
88 | .Trashes
89 | .VolumeIcon.icns
90 | .com.apple.timemachine.donotpresent
91 |
92 | # Directories potentially created on remote AFP share
93 | .AppleDB
94 | .AppleDesktop
95 | Network Trash Folder
96 | Temporary Items
97 | .apdisk
98 |
99 | ### PyCharm ###
100 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
101 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
102 |
103 | # User-specific stuff
104 | .idea/**/workspace.xml
105 | .idea/**/tasks.xml
106 | .idea/**/usage.statistics.xml
107 | .idea/**/dictionaries
108 | .idea/**/shelf
109 |
110 | # Generated files
111 | .idea/**/contentModel.xml
112 |
113 | # Sensitive or high-churn files
114 | .idea/**/dataSources/
115 | .idea/**/dataSources.ids
116 | .idea/**/dataSources.local.xml
117 | .idea/**/sqlDataSources.xml
118 | .idea/**/dynamic.xml
119 | .idea/**/uiDesigner.xml
120 | .idea/**/dbnavigator.xml
121 |
122 | # Gradle
123 | .idea/**/gradle.xml
124 | .idea/**/libraries
125 |
126 | # Gradle and Maven with auto-import
127 | # When using Gradle or Maven with auto-import, you should exclude module files,
128 | # since they will be recreated, and may cause churn. Uncomment if using
129 | # auto-import.
130 | # .idea/artifacts
131 | # .idea/compiler.xml
132 | # .idea/jarRepositories.xml
133 | # .idea/modules.xml
134 | # .idea/*.iml
135 | # .idea/modules
136 | # *.iml
137 | # *.ipr
138 |
139 | # CMake
140 | cmake-build-*/
141 |
142 | # Mongo Explorer plugin
143 | .idea/**/mongoSettings.xml
144 |
145 | # File-based project format
146 | *.iws
147 |
148 | # IntelliJ
149 | out/
150 | .idea
151 |
152 | # mpeltonen/sbt-idea plugin
153 | .idea_modules/
154 |
155 | # JIRA plugin
156 | atlassian-ide-plugin.xml
157 |
158 | # Cursive Clojure plugin
159 | .idea/replstate.xml
160 |
161 | # Crashlytics plugin (for Android Studio and IntelliJ)
162 | com_crashlytics_export_strings.xml
163 | crashlytics.properties
164 | crashlytics-build.properties
165 | fabric.properties
166 |
167 | # Editor-based Rest Client
168 | .idea/httpRequests
169 |
170 | # Android studio 3.1+ serialized cache file
171 | .idea/caches/build_file_checksums.ser
172 |
173 | ### PyCharm Patch ###
174 | # Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
175 |
176 | # *.iml
177 | # modules.xml
178 | # .idea/misc.xml
179 | # *.ipr
180 |
181 | # Sonarlint plugin
182 | # https://plugins.jetbrains.com/plugin/7973-sonarlint
183 | .idea/**/sonarlint/
184 |
185 | # SonarQube Plugin
186 | # https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
187 | .idea/**/sonarIssues.xml
188 |
189 | # Markdown Navigator plugin
190 | # https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
191 | .idea/**/markdown-navigator.xml
192 | .idea/**/markdown-navigator-enh.xml
193 | .idea/**/markdown-navigator/
194 |
195 | # Cache file creation bug
196 | # See https://youtrack.jetbrains.com/issue/JBR-2257
197 | .idea/$CACHE_FILE$
198 |
199 | # CodeStream plugin
200 | # https://plugins.jetbrains.com/plugin/12206-codestream
201 | .idea/codestream.xml
202 |
203 | ### Python ###
204 | # Byte-compiled / optimized / DLL files
205 | __pycache__/
206 | *.py[cod]
207 | *$py.class
208 |
209 | # C extensions
210 | *.so
211 |
212 | # Distribution / packaging
213 | .Python
214 | build/
215 | develop-eggs/
216 | downloads/
217 | eggs/
218 | .eggs/
219 | parts/
220 | sdist/
221 | var/
222 | wheels/
223 | pip-wheel-metadata/
224 | share/python-wheels/
225 | *.egg-info/
226 | .installed.cfg
227 | *.egg
228 | MANIFEST
229 |
230 | # PyInstaller
231 | # Usually these files are written by a python script from a template
232 | # before PyInstaller builds the exe, so as to inject date/other infos into it.
233 | *.manifest
234 | *.spec
235 |
236 | # Installer logs
237 | pip-log.txt
238 | pip-delete-this-directory.txt
239 |
240 | # Unit test / coverage reports
241 | htmlcov/
242 | .tox/
243 | .nox/
244 | .coverage
245 | .coverage.*
246 | .cache
247 | nosetests.xml
248 | coverage.xml
249 | *.cover
250 | *.py,cover
251 | .hypothesis/
252 | .pytest_cache/
253 | pytestdebug.log
254 |
255 | # Translations
256 | *.mo
257 | *.pot
258 |
259 | # Django stuff:
260 | *.log
261 | local_settings.py
262 | db.sqlite3
263 | db.sqlite3-journal
264 |
265 | # Flask stuff:
266 | instance/
267 | .webassets-cache
268 |
269 | # Scrapy stuff:
270 | .scrapy
271 |
272 | # Sphinx documentation
273 | docs/_build/
274 | doc/_build/
275 |
276 | # PyBuilder
277 | target/
278 |
279 | # Jupyter Notebook
280 | .ipynb_checkpoints
281 |
282 | # IPython
283 | profile_default/
284 | ipython_config.py
285 |
286 | # pyenv
287 | .python-version
288 |
289 | # pipenv
290 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
291 | # However, in case of collaboration, if having platform-specific dependencies or dependencies
292 | # having no cross-platform support, pipenv may install dependencies that don't work, or not
293 | # install all needed dependencies.
294 | #Pipfile.lock
295 |
296 | # poetry
297 | #poetry.lock
298 |
299 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow
300 | __pypackages__/
301 |
302 | # Celery stuff
303 | celerybeat-schedule
304 | celerybeat.pid
305 |
306 | # SageMath parsed files
307 | *.sage.py
308 |
309 | # Environments
310 | # .env
311 | .env/
312 | .venv/
313 | env/
314 | venv/
315 | ENV/
316 | env.bak/
317 | venv.bak/
318 | pythonenv*
319 |
320 | # Spyder project settings
321 | .spyderproject
322 | .spyproject
323 |
324 | # Rope project settings
325 | .ropeproject
326 |
327 | # mkdocs documentation
328 | /site
329 |
330 | # mypy
331 | .mypy_cache/
332 | .dmypy.json
333 | dmypy.json
334 |
335 | # Pyre type checker
336 | .pyre/
337 |
338 | # pytype static type analyzer
339 | .pytype/
340 |
341 | # operating system-related files
342 | # file properties cache/storage on macOS
343 | *.DS_Store
344 | # thumbnail cache on Windows
345 | Thumbs.db
346 |
347 | # profiling data
348 | .prof
349 |
350 |
351 | ### QML ###
352 | # Cached binary representations of QML and JS files
353 | *.qmlc
354 | *.jsc
355 |
356 | ### Qt ###
357 | # C++ objects and libs
358 | *.slo
359 | *.lo
360 | *.o
361 | *.a
362 | *.la
363 | *.lai
364 | *.so.*
365 | *.dll
366 | *.dylib
367 |
368 | # Qt-es
369 | object_script.*.Release
370 | object_script.*.Debug
371 | *_plugin_import.cpp
372 | /.qmake.cache
373 | /.qmake.stash
374 | *.pro.user
375 | *.pro.user.*
376 | *.qbs.user
377 | *.qbs.user.*
378 | *.moc
379 | moc_*.cpp
380 | moc_*.h
381 | qrc_*.cpp
382 | ui_*.h
383 | Makefile*
384 | *.qm
385 | *.prl
386 |
387 | # Qt unit tests
388 | target_wrapper.*
389 |
390 | # QtCreator
391 | *.autosave
392 |
393 | # QtCreator Qml
394 | *.qmlproject.user
395 | *.qmlproject.user.*
396 |
397 | # QtCreator CMake
398 | CMakeLists.txt.user*
399 |
400 | # QtCreator 4.8< compilation database
401 | compile_commands.json
402 |
403 | # QtCreator local machine specific files for imported projects
404 | *creator.user*
405 |
406 | ### QtCreator ###
407 | # gitignore for Qt Creator like IDE for pure C/C++ project without Qt
408 | #
409 | # Reference: http://doc.qt.io/qtcreator/creator-project-generic.html
410 |
411 |
412 |
413 | # Qt Creator autogenerated files
414 |
415 |
416 | # A listing of all the files included in the project
417 | *.files
418 |
419 | # Include directories
420 | *.includes
421 |
422 | # Project configuration settings like predefined Macros
423 | *.config
424 |
425 | # Qt Creator settings
426 | *.creator
427 |
428 | # User project settings
429 | *.creator.user*
430 |
431 | # Qt Creator backups
432 |
433 | # Flags for Clang Code Model
434 | *.cxxflags
435 | *.cflags
436 |
437 |
438 | ### SublimeText ###
439 | # Cache files for Sublime Text
440 | *.tmlanguage.cache
441 | *.tmPreferences.cache
442 | *.stTheme.cache
443 |
444 | # Workspace files are user-specific
445 | *.sublime-workspace
446 |
447 | # Project files should be checked into the repository, unless a significant
448 | # proportion of contributors will probably not be using Sublime Text
449 | # *.sublime-project
450 |
451 | # SFTP configuration file
452 | sftp-config.json
453 |
454 | # Package control specific files
455 | Package Control.last-run
456 | Package Control.ca-list
457 | Package Control.ca-bundle
458 | Package Control.system-ca-bundle
459 | Package Control.cache/
460 | Package Control.ca-certs/
461 | Package Control.merged-ca-bundle
462 | Package Control.user-ca-bundle
463 | oscrypto-ca-bundle.crt
464 | bh_unicode_properties.cache
465 |
466 | # Sublime-github package stores a github token in this file
467 | # https://packagecontrol.io/packages/sublime-github
468 | GitHub.sublime-settings
469 |
470 | ### Vim ###
471 | # Swap
472 | [._]*.s[a-v][a-z]
473 | !*.svg # comment out if you don't need vector files
474 | [._]*.sw[a-p]
475 | [._]s[a-rt-v][a-z]
476 | [._]ss[a-gi-z]
477 | [._]sw[a-p]
478 |
479 | # Session
480 | Session.vim
481 | Sessionx.vim
482 |
483 | # Temporary
484 | .netrwhist
485 | # Auto-generated tag files
486 | tags
487 | # Persistent undo
488 | [._]*.un~
489 |
490 | ### vscode ###
491 | .vscode/*
492 | !.vscode/settings.json
493 | !.vscode/tasks.json
494 | !.vscode/launch.json
495 | !.vscode/extensions.json
496 | *.code-workspace
497 |
498 | ### Windows ###
499 | # Windows thumbnail cache files
500 | Thumbs.db:encryptable
501 | ehthumbs.db
502 | ehthumbs_vista.db
503 |
504 | # Dump file
505 | *.stackdump
506 |
507 | # Folder config file
508 | [Dd]esktop.ini
509 |
510 | # Recycle Bin used on file shares
511 | $RECYCLE.BIN/
512 |
513 | # Windows Installer files
514 | *.cab
515 | *.msi
516 | *.msix
517 | *.msm
518 | *.msp
519 |
520 | # Windows shortcuts
521 | *.lnk
522 |
523 | # End of https://www.toptal.com/developers/gitignore/api/python,pycharm,qt,qtcreator,vscode,sublimetext,qml,linux,windows,macos,vim,emacs
524 |
525 | .flatpak-builder
526 | build-dir
527 | myapp/generated_resources.py
528 | test/generated_resources.py
529 |
--------------------------------------------------------------------------------
/Justfile:
--------------------------------------------------------------------------------
1 | # Copyright 2024
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU Lesser General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU Lesser General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU Lesser General Public License
14 | # along with this program. If not, see .
15 |
16 | export QML_IMPORT_PATH := DIRECTORY_QML_TESTS
17 | export QT_QPA_PLATFORM := 'offscreen'
18 | export QT_QUICK_CONTROLS_MATERIAL_VARIANT := 'Dense'
19 | export QT_QUICK_CONTROLS_STYLE := 'Material'
20 |
21 | #
22 |
23 | TOOL_CLI_QML_LINTER := 'qmllint'
24 | TOOL_CLI_QML_TESTRUNNER := 'qmltestrunner'
25 |
26 | ##### #####
27 | ##### Names #####
28 | ##### #####
29 |
30 | NAME_DIRECTORY_BUILD := 'build'
31 | NAME_DIRECTORY_BUILD_HELPERS := 'build-aux'
32 | NAME_DIRECTORY_PY_SOURCES := 'myapp'
33 | NAME_DIRECTORY_PY_TESTS := 'test'
34 | NAME_FILE_GENERATED_RESOURCES := 'generated_resources.py'
35 | NAME_FILE_MAIN_ENTRY := 'main.py'
36 |
37 | ##### #####
38 | ##### Existing Directories #####
39 | ##### #####
40 |
41 | DIRECTORY_ROOT := invocation_directory()
42 | DIRECTORY_BUILD_HELPERS := DIRECTORY_ROOT + '/' + NAME_DIRECTORY_BUILD_HELPERS
43 | DIRECTORY_DATA := DIRECTORY_ROOT + '/data'
44 | DIRECTORY_I18N := DIRECTORY_ROOT + '/i18n'
45 | DIRECTORY_PY_SOURCES := DIRECTORY_ROOT + '/' + NAME_DIRECTORY_PY_SOURCES
46 | DIRECTORY_PY_TESTS := DIRECTORY_ROOT + '/' + NAME_DIRECTORY_PY_TESTS
47 | DIRECTORY_QML_SOURCES := DIRECTORY_ROOT + '/qml'
48 | DIRECTORY_QML_TESTS := DIRECTORY_ROOT + '/qml'
49 |
50 | ##### #####
51 | ##### Existing Files #####
52 | ##### #####
53 |
54 | FILE_APP_ENTRY := DIRECTORY_ROOT + '/' + NAME_FILE_MAIN_ENTRY
55 |
56 | ##### #####
57 | ##### Generated Directories #####
58 | ##### #####
59 |
60 | DIRECTORY_BUILD := DIRECTORY_ROOT + '/' + NAME_DIRECTORY_BUILD
61 | DIRECTORY_BUILD_PY := DIRECTORY_BUILD_RELEASE + '/' + NAME_DIRECTORY_PY_SOURCES
62 |
63 | #
64 |
65 | DIRECTORY_BUILD_QRC_DATA := DIRECTORY_BUILD + '/qrc-data'
66 | DIRECTORY_BUILD_QRC_I18N := DIRECTORY_BUILD + '/qrc-i18n'
67 | DIRECTORY_BUILD_QRC_QML := DIRECTORY_BUILD + '/qrc-qml'
68 | DIRECTORY_BUILD_RELEASE := DIRECTORY_BUILD + '/release'
69 | DIRECTORY_BUILD_RESOURCES := DIRECTORY_BUILD + '/resources'
70 | DIRECTORY_BUILD_TRANSLATIONS := DIRECTORY_BUILD + '/translations'
71 |
72 | ##### #####
73 | ##### Generated Files #####
74 | ##### #####
75 |
76 | FILE_BUILD_QRC_DATA := DIRECTORY_BUILD_QRC_DATA + '/data.qrc'
77 | FILE_BUILD_QRC_I18N := DIRECTORY_BUILD_QRC_I18N + '/i18n.qrc'
78 | FILE_BUILD_QRC_I18N_JSON := DIRECTORY_BUILD_QRC_I18N + '/myapp.json'
79 | FILE_BUILD_QRC_QML := DIRECTORY_BUILD_QRC_QML + '/qml.qrc'
80 | FILE_BUILD_RESOURCES := DIRECTORY_BUILD_RESOURCES + '/' + NAME_FILE_GENERATED_RESOURCES
81 | FILE_BUILD_TRANSLATIONS_JSON := DIRECTORY_BUILD_TRANSLATIONS + '/myapp.json'
82 | FILE_PY_SOURCES_RESOURCES := DIRECTORY_PY_SOURCES + '/' + NAME_FILE_GENERATED_RESOURCES
83 | FILE_PY_TEST_RESOURCES := DIRECTORY_PY_TESTS + '/' + NAME_FILE_GENERATED_RESOURCES
84 |
85 | @_default:
86 | just --list
87 |
88 | # Initialize repository
89 | [group('build')]
90 | @init ARGS='--group dev':
91 | uv sync {{ ARGS }}
92 |
93 | # Build full project into build/release
94 | [group('build')]
95 | @build: _check-pyside-setup _clean-build _clean-develop _compile-resources
96 | rm -rf \
97 | {{ DIRECTORY_BUILD_PY }}
98 | mkdir -p \
99 | {{ DIRECTORY_BUILD_PY }}
100 | cp -r \
101 | {{ DIRECTORY_PY_SOURCES }}/. \
102 | {{ DIRECTORY_BUILD_PY }}
103 | cp \
104 | {{ FILE_BUILD_RESOURCES }} \
105 | {{ DIRECTORY_BUILD_PY }}
106 | cp \
107 | {{ FILE_APP_ENTRY }} \
108 | {{ DIRECTORY_BUILD_RELEASE }}
109 | echo ''; \
110 | echo 'Please find the finished project in {{ DIRECTORY_BUILD_RELEASE }}'
111 |
112 | # Build and compile resources into source directory
113 | [group('build')]
114 | @build-develop: _check-pyside-setup _clean-develop _compile-resources
115 | # Generates resources and copies them into the source directory
116 | # This allows to develop/debug the project normally
117 |
118 | cp {{ FILE_BUILD_RESOURCES }} {{ DIRECTORY_PY_SOURCES }}
119 |
120 | # Remove ALL generated files
121 | [group('build')]
122 | @clean: _clean-build _clean-develop _clean-test
123 |
124 | # Add new language
125 | [group('i18n')]
126 | @add-translation locale: _check-pyside-setup _prepare-translation-extractions
127 | uv --directory "{{ DIRECTORY_BUILD_TRANSLATIONS }}" \
128 | run pyside6-lupdate \
129 | -verbose \
130 | -source-language en_US \
131 | -target-language {{ locale }} \
132 | -ts {{ DIRECTORY_I18N }}/{{ locale }}.ts
133 | echo ''
134 | just update-translations
135 |
136 | # Update *.ts files by traversing the source code
137 | [group('i18n')]
138 | @update-translations: _check-pyside-setup _clean-develop _prepare-translation-extractions
139 | # Traverses *.qml and *.py files to update translation files
140 | # Requires translations in .py: QCoreApplication.translate("context", "string")
141 | # Requires translations in .qml: qsTranslate("context", "string")
142 | uv --directory "{{ DIRECTORY_BUILD_TRANSLATIONS }}" \
143 | run pyside6-lupdate \
144 | -locations none \
145 | -project {{ FILE_BUILD_TRANSLATIONS_JSON }}
146 | cp -r \
147 | {{ DIRECTORY_BUILD_TRANSLATIONS }}/i18n/*.ts \
148 | {{ DIRECTORY_I18N }}
149 |
150 | # Run Python and QML tests
151 | [group('test')]
152 | @test: test-python test-qml
153 |
154 | # Run Python tests
155 | [group('test')]
156 | @test-python: _check-pyside-setup _clean-test _compile-resources
157 | cp {{ FILE_BUILD_RESOURCES }} {{ FILE_PY_TEST_RESOURCES }}
158 | uv run pytest test
159 |
160 | # Run QML tests
161 | [group('test')]
162 | @test-qml: _check-qml-setup
163 | {{ TOOL_CLI_QML_TESTRUNNER }} \
164 | -silent \
165 | -input {{ DIRECTORY_QML_TESTS }}
166 |
167 | @_clean-build:
168 | rm -rf {{ DIRECTORY_BUILD }}
169 |
170 | @_clean-develop:
171 | rm -rf {{ FILE_PY_SOURCES_RESOURCES }}
172 |
173 | @_clean-test:
174 | rm -rf {{ FILE_PY_TEST_RESOURCES }}
175 |
176 | @_check-pyside-setup:
177 | uv version
178 |
179 | @_check-qml-setup:
180 | which {{ TOOL_CLI_QML_TESTRUNNER }}
181 | echo ''
182 |
183 | @_compile-resources: _generate-qrc-data _generate-qrc-i18n _generate-qrc-qml
184 | rm -rf \
185 | {{ DIRECTORY_BUILD_RESOURCES }}
186 | mkdir -p \
187 | {{ DIRECTORY_BUILD_RESOURCES }}
188 | cp -r \
189 | {{ DIRECTORY_BUILD_QRC_QML }}/. \
190 | {{ DIRECTORY_BUILD_QRC_DATA }}/. \
191 | {{ DIRECTORY_BUILD_QRC_I18N }}/. \
192 | {{ DIRECTORY_BUILD_RESOURCES }}
193 | uv run pyside6-rcc \
194 | {{ DIRECTORY_BUILD_RESOURCES }}/data.qrc \
195 | {{ DIRECTORY_BUILD_RESOURCES }}/i18n.qrc \
196 | {{ DIRECTORY_BUILD_RESOURCES }}/qml.qrc \
197 | -o {{ FILE_BUILD_RESOURCES }}
198 |
199 | @_generate-qrc-data:
200 | rm -rf \
201 | {{ DIRECTORY_BUILD_QRC_DATA }}
202 | mkdir -p \
203 | {{ DIRECTORY_BUILD_QRC_DATA }}
204 | cp -r \
205 | {{ DIRECTORY_DATA }} \
206 | {{ DIRECTORY_BUILD_QRC_DATA }}
207 | uv --directory "{{ DIRECTORY_BUILD_QRC_DATA }}/data" \
208 | run pyside6-rcc \
209 | --project | sed 's,./,data/,' > {{ FILE_BUILD_QRC_DATA }}
210 |
211 | @_generate-qrc-i18n:
212 | rm -rf \
213 | {{ DIRECTORY_BUILD_QRC_I18N }}
214 | mkdir -p \
215 | {{ DIRECTORY_BUILD_QRC_I18N }}
216 | cp -r \
217 | {{ DIRECTORY_I18N }} {{ DIRECTORY_BUILD_QRC_I18N }}
218 | {{ DIRECTORY_BUILD_HELPERS }}/generate-lupdate-project-file.py \
219 | --relative-to {{ DIRECTORY_BUILD_QRC_I18N }} \
220 | --out-file {{ FILE_BUILD_QRC_I18N_JSON }}
221 | uv --directory "{{ DIRECTORY_BUILD_QRC_I18N }}" \
222 | run pyside6-lrelease \
223 | -project {{ FILE_BUILD_QRC_I18N_JSON }}
224 | cd \
225 | {{ DIRECTORY_BUILD_QRC_I18N }}/i18n; \
226 | rm \
227 | {{ FILE_BUILD_QRC_I18N_JSON }} \
228 | *.ts
229 | uv --directory "{{ DIRECTORY_BUILD_QRC_I18N }}/i18n" \
230 | run pyside6-rcc \
231 | --project | sed 's,./,i18n/,' > {{ FILE_BUILD_QRC_I18N }}
232 |
233 | @_generate-qrc-qml:
234 | rm -rf \
235 | {{ DIRECTORY_BUILD_QRC_QML }}
236 | mkdir -p \
237 | {{ DIRECTORY_BUILD_QRC_QML }}
238 | cp -r \
239 | {{ DIRECTORY_QML_SOURCES }} \
240 | {{ DIRECTORY_BUILD_QRC_QML }}
241 | cd {{ DIRECTORY_BUILD_QRC_QML }}; \
242 | mkdir qt && mv qml qt
243 | uv --directory "{{ DIRECTORY_BUILD_QRC_QML }}" \
244 | run pyside6-rcc --project \
245 | | sed 's,./,,' \
246 | | grep -v "qml.qrc" > {{ FILE_BUILD_QRC_QML }}
247 |
248 | @_prepare-translation-extractions:
249 | rm -rf \
250 | {{ DIRECTORY_BUILD_TRANSLATIONS }}
251 | mkdir -p \
252 | {{ DIRECTORY_BUILD_TRANSLATIONS }}
253 | cp -r \
254 | {{ DIRECTORY_I18N }} \
255 | {{ DIRECTORY_PY_SOURCES }} \
256 | {{ DIRECTORY_QML_SOURCES }} \
257 | {{ DIRECTORY_BUILD_TRANSLATIONS }}
258 | {{ DIRECTORY_BUILD_HELPERS }}/generate-lupdate-project-file.py \
259 | --relative-to {{ DIRECTORY_BUILD_TRANSLATIONS }} \
260 | --out-file {{ FILE_BUILD_TRANSLATIONS_JSON }}
261 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 |
635 | Copyright (C)
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | Copyright (C)
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
--------------------------------------------------------------------------------
/README.MD:
--------------------------------------------------------------------------------
1 | # Unofficial Opinionated Template for PySide6 with QtQuick
2 |
3 | An unofficial and opinionated project template designed for a quick start with PySide6 and QtQuick.
4 |
5 | 
6 |
7 | # Features
8 |
9 | - Compatible with Python **3.9+**
10 | - Supports internationalization,
11 | including [Right-to-Left User Interfaces](https://doc.qt.io/qt-6/qtquick-positioning-righttoleft.html)
12 | - Leverages the [Qt Resource System](https://doc.qt.io/qt-6/resources.html) to compile resources in `data`, `i18n`, or
13 | `qml` into a Python file:
14 | - `data` accessible at `:/data` or `qrc:/data`
15 | - `i18n` accessible at `:/i18n` or `qrc:/i18n`
16 | - `qml` accessible at `:/qt/qml` or `qrc:/qt/qml`
17 | - Final build consists solely of Python files
18 | - Preconfigured testing (Python + QML)
19 | - CI setup included
20 | - Client-side window decorations implemented
21 | - No need for Qt Creator; use your preferred text editor
22 |
23 | ## Development Setup
24 |
25 | 1. **Install these tools**
26 |
27 | - [Compatible Python version](https://www.python.org/downloads)
28 | - [uv](https://github.com/astral-sh/uv)
29 | - [just](https://github.com/casey/just)
30 | - **Windows users also need**
31 | - [Git Bash](https://git-scm.com/downloads)
32 | - Be sure to run `just` inside Git Bash
33 |
34 | 2. **Clone the repository**
35 |
36 | 3. **Open a terminal** where you cloned it
37 |
38 | 4. **Initialize the environment**:
39 |
40 | ```shell
41 | just init
42 | ```
43 |
44 | ## Workflow
45 |
46 | Whenever you change files in the `data`, `i18n`, or `qml` directories, run:
47 |
48 | ```shell
49 | just build-develop
50 | ```
51 |
52 | This compiles them into a Python file in the myapp folder, so the app recognizes them on startup.
53 |
54 | To start the app, run:
55 |
56 | ```shell
57 | uv run main.py
58 | ```
59 |
60 | **Tip:** Configure your IDE to run the `build-develop` recipe before launching the application.
61 |
62 | ## Just recipes
63 |
64 | ```just
65 | $ just --list
66 | Available recipes:
67 | [build]
68 | build # Build full project into build/release
69 | build-develop # Build and compile resources into source directory
70 | clean # Remove ALL generated files
71 | init ARGS='--group dev' # Initialize repository
72 |
73 | [i18n]
74 | add-translation locale # Add new language
75 | update-translations # Update *.ts files by traversing the source code
76 |
77 | [test]
78 | test # Run Python and QML tests
79 | test-python # Run Python tests
80 | test-qml # Run QML tests
81 | ```
82 |
83 | ## Internationalization
84 |
85 | - Instructions for adding new languages can be found [here](docs/internationalization.md).
86 |
87 | ## Read Further
88 |
89 | - Qt6: https://doc.qt.io
90 | - Python: https://www.python.org
91 | - PySide6: https://doc.qt.io/qtforpython/contents.html
92 | - Examples for Qt, QtQuick & Python: https://pypi.org/project/PySide6-Examples/
93 | - QML Coding Conventions: https://doc.qt.io/qt-6/qml-codingconventions.html
94 | - Python & QML: https://doc.qt.io/qtforpython/PySide6/QtQml/index.html
95 | - Scripting: https://doc.qt.io/qt-6/topics-scripting.html
96 | - Importing JavaScript Resources in QML: https://doc.qt.io/qt-6/qtqml-javascript-imports.html
97 | - Packaging on Linux: https://github.com/andyholmes/flatter
98 |
99 | # Dependencies
100 |
101 | - PySide6: https://pypi.org/project/PySide6
102 | - PyTest: https://pypi.org/project/pytest
103 | - Just: https://github.com/casey/just
104 | - App Icon: https://commons.wikimedia.org/wiki/File:Qt_logo_2016.svg
105 | - Material Icons: https://fonts.google.com/icons?selected=Material+Icons
106 |
107 | # Apps Made with This Template
108 |
109 | - mpvQC (https://mpvqc.github.io)
110 |
111 | Create a Pull Request to add your app to the list 😊
112 |
113 | # FAQ
114 |
115 | - Is it exclusively **PySide6**? Can **PyQt6** be used instead of PySide6?
116 | > Yes, it should be possible but may require additional work.
117 |
--------------------------------------------------------------------------------
/build-aux/generate-lupdate-project-file.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | #
3 | # Copyright
4 | #
5 | # This program is free software: you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation, either version 3 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 |
18 |
19 | import argparse
20 | import json
21 | import sys
22 | from pathlib import Path
23 |
24 |
25 | class ArgumentValidator:
26 | _errors = []
27 |
28 | def validate_directory(self, directory: Path, *, name: str):
29 | if not directory.exists():
30 | self._errors.append(f"{name.capitalize()} {directory} does not exist")
31 | elif not directory.is_dir():
32 | self._errors.append(f"{name.capitalize()} {directory} is not a directory")
33 |
34 | def break_on_errors(self):
35 | if errors := self._errors:
36 | for error in errors:
37 | print(error, file=sys.stderr)
38 | sys.exit(1)
39 |
40 |
41 | class ProjectFileGenerator:
42 | _extensions_ignored = {".pyc"}
43 | _extensions_translation = ".ts"
44 | _files = []
45 |
46 | def __init__(self, root_dir: Path):
47 | self._root_dir = root_dir
48 |
49 | def glob_files(self):
50 | self._files = [path for path in self._root_dir.rglob("*") if path.is_file()]
51 |
52 | def make_files_relative(self):
53 | self._files = [path.relative_to(self._root_dir) for path in self._files]
54 |
55 | def remove_irrelevant_files(self):
56 | self._files = [path for path in self._files if path.suffix not in self._extensions_ignored]
57 |
58 | def sort_files(self):
59 | self._files = sorted(self._files)
60 |
61 | def generate_project_file(self, file: Path):
62 | files = [str(path) for path in self._files if path.suffix != self._extensions_translation]
63 | translations = [str(path) for path in self._files if path.suffix == self._extensions_translation]
64 | structure = {
65 | "excluded": [],
66 | "includePaths": [],
67 | "projectFile": "",
68 | "sources": files,
69 | "translations": translations,
70 | }
71 | data = json.dumps([structure], indent=2, sort_keys=True)
72 | file.write_text(data, encoding="utf-8")
73 |
74 |
75 | def main():
76 | parser = argparse.ArgumentParser(description="Create a json project file")
77 | parser.add_argument("--relative-to", type=str, required=True,
78 | help="Root directory to look for files")
79 | parser.add_argument("--out-file", type=str, required=True,
80 | help="Path of the json project file to generate")
81 | run(parser.parse_args())
82 |
83 |
84 | def run(args):
85 | root_dir = Path(args.relative_to).absolute()
86 | out_file = Path(args.out_file)
87 |
88 | validator = ArgumentValidator()
89 | validator.validate_directory(root_dir, name="Root directory")
90 | validator.break_on_errors()
91 |
92 | generator = ProjectFileGenerator(root_dir=root_dir)
93 | generator.glob_files()
94 | generator.make_files_relative()
95 | generator.remove_irrelevant_files()
96 | generator.sort_files()
97 | generator.generate_project_file(file=out_file)
98 |
99 |
100 | if __name__ == "__main__":
101 | main()
102 |
--------------------------------------------------------------------------------
/build-aux/generate-qt-creator-project-file.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | #
3 | # Copyright
4 | #
5 | # This program is free software: you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation, either version 3 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 |
18 |
19 | import argparse
20 | import json
21 | import sys
22 | from pathlib import Path
23 |
24 |
25 | class ArgumentValidator:
26 | _errors = []
27 |
28 | def validate_directory(self, directory: Path):
29 | if not directory.exists():
30 | self._errors.append(f"Directory {directory} does not exist")
31 | elif not directory.is_dir():
32 | self._errors.append(f"Directory {directory} is not a directory")
33 |
34 | def validate_directories(self, directories: list[Path]):
35 | for directory in directories:
36 | self.validate_directory(directory)
37 |
38 | def validate_files(self, files: list[Path]):
39 | for file in files:
40 | self._validate_file(file)
41 |
42 | def _validate_file(self, file: Path):
43 | if not file.exists():
44 | self._errors.append(f"File {file} does not exist")
45 | elif not file.is_file():
46 | self._errors.append(f"File {file} is not a file")
47 |
48 | def break_on_errors(self):
49 | if errors := self._errors:
50 | for error in errors:
51 | print(error, file=sys.stderr)
52 | sys.exit(1)
53 |
54 |
55 | class ProjectFileGenerator:
56 | _extensions_ignored = {".pyc"}
57 | _files = []
58 |
59 | def __init__(self, root_dir: Path):
60 | self._root_dir = root_dir
61 |
62 | def add(self, directories: list[Path], files: list[Path]):
63 | for directory in directories:
64 | for path in directory.rglob("*"):
65 | if path.is_file():
66 | self._files.append(path)
67 | self._files.extend(files)
68 |
69 | def remove_irrelevant_files(self):
70 | self._files = [path for path in self._files if path.suffix not in self._extensions_ignored]
71 |
72 | def make_files_relative(self):
73 | self._files = [path.relative_to(self._root_dir) for path in self._files]
74 |
75 | def sort_files(self):
76 | self._files = sorted(self._files)
77 |
78 | def generate_project_file(self, output: Path):
79 | structure = {"files": [str(file) for file in self._files]}
80 | data = json.dumps(structure, indent=2, sort_keys=True)
81 | output.write_text(data, encoding="utf-8")
82 |
83 |
84 | def main():
85 | parser = argparse.ArgumentParser(description="Create a pyproject file")
86 | parser.add_argument("--relative-to", type=str, required=True,
87 | help="Root directory to make files relative to")
88 | parser.add_argument("--include-directory", type=str, action="append", default=[],
89 | help="Directory to include. Can be used multiple times")
90 | parser.add_argument("--include-file", type=str, action="append", default=[],
91 | help="File to include. Can be used multiple times")
92 | parser.add_argument("--out-file", type=str, required=True,
93 | help="Path of the pyproject file to generate")
94 | run(parser.parse_args())
95 |
96 |
97 | def run(args):
98 | root_dir = Path(args.relative_to).absolute()
99 | out_file = Path(args.out_file)
100 | directories = [Path(path).absolute() for path in args.include_directory]
101 | files = [Path(path).absolute() for path in args.include_file]
102 |
103 | validator = ArgumentValidator()
104 | validator.validate_directory(root_dir)
105 | validator.validate_directories(directories)
106 | validator.validate_files(files)
107 | validator.break_on_errors()
108 |
109 | generator = ProjectFileGenerator(root_dir)
110 | generator.add(directories, files)
111 | generator.remove_irrelevant_files()
112 | generator.make_files_relative()
113 | generator.sort_files()
114 | generator.generate_project_file(output=out_file)
115 |
116 |
117 | if __name__ == "__main__":
118 | main()
119 |
--------------------------------------------------------------------------------
/build-aux/icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trin94/PySide6-project-template/8f49bb412776148f8868b225096e9e4b7faeb429/build-aux/icon.ico
--------------------------------------------------------------------------------
/data/app-icon.svg:
--------------------------------------------------------------------------------
1 |
2 |
68 |
--------------------------------------------------------------------------------
/data/icons/close_black_24dp.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/data/icons/close_fullscreen_black_24dp.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/data/icons/minimize_black_24dp.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/data/icons/open_in_full_black_24dp.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/data/qtquickcontrols2.conf:
--------------------------------------------------------------------------------
1 | [Controls]
2 | Style=Material
3 |
4 | [Material]
5 | Variant=Dense
6 | Accent=LightGreen
7 | Theme=Dark
8 |
--------------------------------------------------------------------------------
/docs/internationalization.md:
--------------------------------------------------------------------------------
1 | # Adding Languages
2 |
3 | - Checkout repository
4 | - Make sure development environment is set up correctly for your OS
5 | - Create a new translation file by running
6 | ```shell
7 | just add-translation # just add-translation fr_FR
8 | ```
9 | - New `.ts` file appears in the `i18n` directory
10 | - Translate the `ts` file using Qt Linguist 6
11 | - To test the translation:
12 | - Add a new entry in the `MyAppLanguageModel.qml` file
13 | - Run
14 | ```shell
15 | just build-develop
16 | ```
17 |
--------------------------------------------------------------------------------
/docs/picture.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trin94/PySide6-project-template/8f49bb412776148f8868b225096e9e4b7faeb429/docs/picture.png
--------------------------------------------------------------------------------
/i18n/de_DE.ts:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | HeaderBar
6 |
7 | &Help
8 |
9 |
10 |
11 | &Action 1
12 |
13 |
14 |
15 | &Action 2
16 |
17 |
18 |
19 | &Action 3
20 |
21 |
22 |
23 | &Menu 1
24 |
25 |
26 |
27 | &Action 4
28 |
29 |
30 |
31 | &Action 5
32 |
33 |
34 |
35 | &Menu 2
36 |
37 |
38 |
39 | &Options
40 |
41 |
42 |
43 | &Language
44 |
45 |
46 |
47 | Showcase translated Qt internal strings
48 |
49 |
50 |
51 |
52 | Languages
53 |
54 | English
55 | Englisch
56 |
57 |
58 | German
59 | Deutsch
60 |
61 |
62 | Hebrew
63 | Hebräisch
64 |
65 |
66 |
67 | MainPage
68 |
69 | Have fun!
70 | Viel Spaß!
71 |
72 |
73 | Exposed from Python: '%1'
74 |
75 |
76 |
77 |
78 | MessageBoxes
79 |
80 | Title
81 |
82 |
83 |
84 | Change the language and look at the 'Yes' and 'Cancel' buttons
85 |
86 |
87 |
88 |
89 |
--------------------------------------------------------------------------------
/i18n/he_IL.ts:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | HeaderBar
6 |
7 | &Help
8 |
9 |
10 |
11 | &Action 1
12 |
13 |
14 |
15 | &Action 2
16 |
17 |
18 |
19 | &Action 3
20 |
21 |
22 |
23 | &Menu 1
24 |
25 |
26 |
27 | &Action 4
28 |
29 |
30 |
31 | &Action 5
32 |
33 |
34 |
35 | &Menu 2
36 |
37 |
38 |
39 | &Options
40 |
41 |
42 |
43 | &Language
44 |
45 |
46 |
47 | Showcase translated Qt internal strings
48 |
49 |
50 |
51 |
52 | Languages
53 |
54 | English
55 | אנגלית
56 |
57 |
58 | German
59 | גֶרמָנִיָת
60 |
61 |
62 | Hebrew
63 | עִברִית
64 |
65 |
66 |
67 | MainPage
68 |
69 | Have fun!
70 | תעשה חיים!
71 |
72 |
73 | Exposed from Python: '%1'
74 |
75 |
76 |
77 |
78 | MessageBoxes
79 |
80 | Title
81 |
82 |
83 |
84 | Change the language and look at the 'Yes' and 'Cancel' buttons
85 |
86 |
87 |
88 |
89 |
--------------------------------------------------------------------------------
/main.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 |
3 |
4 | def main():
5 | from myapp.startup import perform_startup
6 |
7 | perform_startup()
8 |
9 |
10 | if __name__ == "__main__":
11 | main()
12 |
--------------------------------------------------------------------------------
/myapp/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
--------------------------------------------------------------------------------
/myapp/application.py:
--------------------------------------------------------------------------------
1 | # Copyright
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 |
17 | import platform
18 | import sys
19 |
20 | from PySide6.QtCore import QLibraryInfo, QLocale, QTranslator, QUrl
21 | from PySide6.QtGui import QGuiApplication, QIcon
22 | from PySide6.QtQml import QQmlApplicationEngine
23 |
24 |
25 | class MyApplication(QGuiApplication):
26 |
27 | def __init__(self, args):
28 | super().__init__(args)
29 | self._engine = QQmlApplicationEngine()
30 | self._translator_myapp = QTranslator()
31 | self._translator_qt = QTranslator()
32 |
33 | self._event_filter = None
34 | self._effects = None
35 |
36 | def set_window_icon(self):
37 | icon = QIcon(":/data/app-icon.svg")
38 | self.setWindowIcon(icon)
39 |
40 | def set_up_signals(self):
41 | self.aboutToQuit.connect(self._on_quit)
42 | self._engine.uiLanguageChanged.connect(self._retranslate)
43 |
44 | def _on_quit(self) -> None:
45 | del self._engine
46 |
47 | def _retranslate(self):
48 | locale = QLocale(self._engine.uiLanguage())
49 |
50 | self.removeTranslator(self._translator_qt)
51 | self.removeTranslator(self._translator_myapp)
52 |
53 | self._translator_qt.load(locale, "qtbase", "_", QLibraryInfo.location(QLibraryInfo.LibraryPath.TranslationsPath))
54 | self._translator_myapp.load(f":/i18n/{locale.name()}.qm")
55 |
56 | self.installTranslator(self._translator_qt)
57 | self.installTranslator(self._translator_myapp)
58 |
59 | self.setLayoutDirection(locale.textDirection())
60 |
61 | def set_up_window_event_filter(self):
62 | if platform.system() == "Windows":
63 | from myapp.framelesswindow.win import WindowsEventFilter
64 | self._event_filter = WindowsEventFilter(border_width=5)
65 | self.installNativeEventFilter(self._event_filter)
66 | elif platform.system() == "Linux":
67 | from myapp.framelesswindow.linux import LinuxEventFilter
68 | self._event_filter = LinuxEventFilter(border_width=5)
69 | self.installEventFilter(self._event_filter)
70 |
71 | def start_engine(self):
72 | self._engine.load(QUrl.fromLocalFile(":/qt/qml/main.qml"))
73 |
74 | def set_up_window_effects(self):
75 | if sys.platform == "win32":
76 | hwnd = self.topLevelWindows()[0].winId()
77 | from myapp.framelesswindow.win import WindowsWindowEffect
78 | self._effects = WindowsWindowEffect()
79 | self._effects.addShadowEffect(hwnd)
80 | self._effects.addWindowAnimation(hwnd)
81 |
82 | def verify(self):
83 | if not self._engine.rootObjects():
84 | sys.exit(-1)
85 |
--------------------------------------------------------------------------------
/myapp/framelesswindow/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
--------------------------------------------------------------------------------
/myapp/framelesswindow/linux/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | from .event import LinuxEventFilter
17 |
--------------------------------------------------------------------------------
/myapp/framelesswindow/linux/event.py:
--------------------------------------------------------------------------------
1 | # Copyright
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, version 3.
6 | #
7 | # This program is distributed in the hope that it will be useful, but
8 | # WITHOUT ANY WARRANTY; without even the implied warranty of
9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10 | # General Public License for more details.
11 | #
12 | # You should have received a copy of the GNU General Public License
13 | # along with this program. If not, see .
14 |
15 | # Inspired and based on:
16 | # - https://github.com/zhiyiYo/PyQt-Frameless-Window
17 | # - https://gitee.com/Virace/pyside6-qml-frameless-window/tree/main
18 |
19 |
20 | from typing import Optional
21 |
22 | from PySide6.QtCore import QCoreApplication, QEvent, QObject, Qt
23 | from PySide6.QtGui import QCursor, QGuiApplication, QWindow
24 |
25 |
26 | class LinuxEventFilter(QObject):
27 |
28 | def __init__(self, border_width=None) -> None:
29 | super().__init__()
30 | self.border_width = border_width
31 |
32 | self._app: QGuiApplication = QCoreApplication.instance()
33 | self._window: Optional[QWindow] = None
34 |
35 | def eventFilter(self, obj, event):
36 | if event.type() != QEvent.Type.MouseButtonPress and event.type() != QEvent.Type.MouseMove:
37 | return False
38 |
39 | if self._window is None:
40 | self._window = self._app.topLevelWindows()[0]
41 |
42 | pos = QCursor.pos() - self._window.position()
43 | edges = Qt.Edge(0)
44 | if pos.x() < self.border_width:
45 | edges |= Qt.Edge.LeftEdge
46 | if pos.x() >= self._window.width() - self.border_width:
47 | edges |= Qt.Edge.RightEdge
48 | if pos.y() < self.border_width:
49 | edges |= Qt.Edge.TopEdge
50 | if pos.y() >= self._window.height() - self.border_width:
51 | edges |= Qt.Edge.BottomEdge
52 |
53 | if event.type() == QEvent.Type.MouseMove and self._window.windowState() == Qt.WindowState.WindowNoState:
54 | if edges in (Qt.Edge.LeftEdge | Qt.Edge.TopEdge, Qt.Edge.RightEdge | Qt.Edge.BottomEdge):
55 | self._app.setOverrideCursor(Qt.CursorShape.SizeFDiagCursor)
56 | elif edges in (Qt.Edge.RightEdge | Qt.Edge.TopEdge, Qt.Edge.LeftEdge | Qt.Edge.BottomEdge):
57 | self._app.setOverrideCursor(Qt.CursorShape.SizeBDiagCursor)
58 | elif edges in (Qt.Edge.TopEdge, Qt.Edge.BottomEdge):
59 | self._app.setOverrideCursor(Qt.CursorShape.SizeVerCursor)
60 | elif edges in (Qt.Edge.LeftEdge, Qt.Edge.RightEdge):
61 | self._app.setOverrideCursor(Qt.CursorShape.SizeHorCursor)
62 | else:
63 | self._app.restoreOverrideCursor()
64 |
65 | if event.type() == QEvent.Type.MouseButtonPress and edges:
66 | self._window.startSystemResize(edges)
67 | return True
68 |
69 | return super().eventFilter(obj, event)
70 |
--------------------------------------------------------------------------------
/myapp/framelesswindow/win/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | # Inspired and based on:
17 | # - https://github.com/zhiyiYo/PyQt-Frameless-Window
18 | # - https://gitee.com/Virace/pyside6-qml-frameless-window/tree/main
19 |
20 |
21 | from .effect import WindowsWindowEffect
22 | from .event import WindowsEventFilter
23 |
--------------------------------------------------------------------------------
/myapp/framelesswindow/win/c_structures.py:
--------------------------------------------------------------------------------
1 | # Copyright
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, version 3.
6 | #
7 | # This program is distributed in the hope that it will be useful, but
8 | # WITHOUT ANY WARRANTY; without even the implied warranty of
9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10 | # General Public License for more details.
11 | #
12 | # You should have received a copy of the GNU General Public License
13 | # along with this program. If not, see .
14 |
15 |
16 | # Inspired and based on:
17 | # - https://github.com/zhiyiYo/PyQt-Frameless-Window
18 | # - https://gitee.com/Virace/pyside6-qml-frameless-window/tree/main
19 |
20 |
21 | from ctypes import POINTER, Structure, c_int
22 | from ctypes.wintypes import BOOL, DWORD, HRGN, HWND, POINT, RECT, UINT, ULONG
23 | from enum import Enum
24 |
25 |
26 | class WINDOWCOMPOSITIONATTRIB(Enum):
27 | WCA_UNDEFINED = 0
28 | WCA_NCRENDERING_ENABLED = 1
29 | WCA_NCRENDERING_POLICY = 2
30 | WCA_TRANSITIONS_FORCEDISABLED = 3
31 | WCA_ALLOW_NCPAINT = 4
32 | WCA_CAPTION_BUTTON_BOUNDS = 5
33 | WCA_NONCLIENT_RTL_LAYOUT = 6
34 | WCA_FORCE_ICONIC_REPRESENTATION = 7
35 | WCA_EXTENDED_FRAME_BOUNDS = 8
36 | WCA_HAS_ICONIC_BITMAP = 9
37 | WCA_THEME_ATTRIBUTES = 10
38 | WCA_NCRENDERING_EXILED = 11
39 | WCA_NCADORNMENTINFO = 12
40 | WCA_EXCLUDED_FROM_LIVEPREVIEW = 13
41 | WCA_VIDEO_OVERLAY_ACTIVE = 14
42 | WCA_FORCE_ACTIVEWINDOW_APPEARANCE = 15
43 | WCA_DISALLOW_PEEK = 16
44 | WCA_CLOAK = 17
45 | WCA_CLOAKED = 18
46 | WCA_ACCENT_POLICY = 19
47 | WCA_FREEZE_REPRESENTATION = 20
48 | WCA_EVER_UNCLOAKED = 21
49 | WCA_VISUAL_OWNER = 22
50 | WCA_HOLOGRAPHIC = 23
51 | WCA_EXCLUDED_FROM_DDA = 24
52 | WCA_PASSIVEUPDATEMODE = 25
53 | WCA_USEDARKMODECOLORS = 26
54 | WCA_CORNER_STYLE = 27
55 | WCA_PART_COLOR = 28
56 | WCA_DISABLE_MOVESIZE_FEEDBACK = 29
57 | WCA_LAST = 30
58 |
59 |
60 | class ACCENT_STATE(Enum):
61 | """ Client area status enumeration class """
62 | ACCENT_DISABLED = 0
63 | ACCENT_ENABLE_GRADIENT = 1
64 | ACCENT_ENABLE_TRANSPARENTGRADIENT = 2
65 | ACCENT_ENABLE_BLURBEHIND = 3 # Aero effect
66 | ACCENT_ENABLE_ACRYLICBLURBEHIND = 4 # Acrylic effect
67 | ACCENT_ENABLE_HOSTBACKDROP = 5 # Mica effect
68 | ACCENT_INVALID_STATE = 6
69 |
70 |
71 | class ACCENT_POLICY(Structure):
72 | """ Specific attributes of client area """
73 |
74 | _fields_ = [
75 | ("AccentState", DWORD),
76 | ("AccentFlags", DWORD),
77 | ("GradientColor", DWORD),
78 | ("AnimationId", DWORD),
79 | ]
80 |
81 |
82 | class WINDOWCOMPOSITIONATTRIBDATA(Structure):
83 | _fields_ = [
84 | ("Attribute", DWORD),
85 | # Pointer() receives any ctypes type and returns a pointer type
86 | ("Data", POINTER(ACCENT_POLICY)),
87 | ("SizeOfData", ULONG),
88 | ]
89 |
90 |
91 | class DWMNCRENDERINGPOLICY(Enum):
92 | DWMNCRP_USEWINDOWSTYLE = 0
93 | DWMNCRP_DISABLED = 1
94 | DWMNCRP_ENABLED = 2
95 | DWMNCRP_LAS = 3
96 |
97 |
98 | class DWMWINDOWATTRIBUTE(Enum):
99 | DWMWA_NCRENDERING_ENABLED = 1
100 | DWMWA_NCRENDERING_POLICY = 2
101 | DWMWA_TRANSITIONS_FORCEDISABLED = 3
102 | DWMWA_ALLOW_NCPAINT = 4
103 | DWMWA_CAPTION_BUTTON_BOUNDS = 5
104 | DWMWA_NONCLIENT_RTL_LAYOUT = 6
105 | DWMWA_FORCE_ICONIC_REPRESENTATION = 7
106 | DWMWA_FLIP3D_POLICY = 8
107 | DWMWA_EXTENDED_FRAME_BOUNDS = 9
108 | DWMWA_HAS_ICONIC_BITMAP = 10
109 | DWMWA_DISALLOW_PEEK = 11
110 | DWMWA_EXCLUDED_FROM_PEEK = 12
111 | DWMWA_CLOAK = 13
112 | DWMWA_CLOAKED = 14
113 | DWMWA_FREEZE_REPRESENTATION = 15
114 | DWMWA_PASSIVE_UPDATE_MODE = 16
115 | DWMWA_USE_HOSTBACKDROPBRUSH = 17
116 | DWMWA_USE_IMMERSIVE_DARK_MODE = 18
117 | DWMWA_WINDOW_CORNER_PREFERENCE = 19
118 | DWMWA_BORDER_COLOR = 20
119 | DWMWA_CAPTION_COLOR = 21
120 | DWMWA_TEXT_COLOR = 22
121 | DWMWA_VISIBLE_FRAME_BORDER_THICKNESS = 23
122 | DWMWA_LAST = 24
123 |
124 |
125 | class MARGINS(Structure):
126 | _fields_ = [
127 | ("cxLeftWidth", c_int),
128 | ("cxRightWidth", c_int),
129 | ("cyTopHeight", c_int),
130 | ("cyBottomHeight", c_int),
131 | ]
132 |
133 |
134 | class MINMAXINFO(Structure):
135 | _fields_ = [
136 | ("ptReserved", POINT),
137 | ("ptMaxSize", POINT),
138 | ("ptMaxPosition", POINT),
139 | ("ptMinTrackSize", POINT),
140 | ("ptMaxTrackSize", POINT),
141 | ]
142 |
143 |
144 | class PWINDOWPOS(Structure):
145 | _fields_ = [
146 | ("hWnd", HWND),
147 | ("hwndInsertAfter", HWND),
148 | ("x", c_int),
149 | ("y", c_int),
150 | ("cx", c_int),
151 | ("cy", c_int),
152 | ("flags", UINT)
153 | ]
154 |
155 |
156 | class NCCALCSIZE_PARAMS(Structure):
157 | _fields_ = [
158 | ("rgrc", RECT * 3),
159 | ("lppos", POINTER(PWINDOWPOS))
160 | ]
161 |
162 |
163 | LPNCCALCSIZE_PARAMS = POINTER(NCCALCSIZE_PARAMS)
164 |
165 |
166 | class DWM_BLURBEHIND(Structure):
167 | _fields_ = [
168 | ("dwFlags", DWORD),
169 | ("fEnable", BOOL),
170 | ("hRgnBlur", HRGN),
171 | ("fTransitionOnMaximized", BOOL),
172 | ]
173 |
--------------------------------------------------------------------------------
/myapp/framelesswindow/win/effect.py:
--------------------------------------------------------------------------------
1 | # Copyright
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, version 3.
6 | #
7 | # This program is distributed in the hope that it will be useful, but
8 | # WITHOUT ANY WARRANTY; without even the implied warranty of
9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10 | # General Public License for more details.
11 | #
12 | # You should have received a copy of the GNU General Public License
13 | # along with this program. If not, see .
14 |
15 |
16 | # Inspired and based on:
17 | # - https://github.com/zhiyiYo/PyQt-Frameless-Window
18 | # - https://gitee.com/Virace/pyside6-qml-frameless-window/tree/main
19 |
20 |
21 | from ctypes import POINTER, WinDLL, byref, c_bool, c_int, pointer, sizeof, windll
22 | from ctypes.wintypes import DWORD, LONG, LPCVOID
23 |
24 | import win32con
25 | import win32gui
26 |
27 | from .c_structures import (
28 | ACCENT_POLICY,
29 | DWM_BLURBEHIND,
30 | MARGINS,
31 | WINDOWCOMPOSITIONATTRIB,
32 | WINDOWCOMPOSITIONATTRIBDATA,
33 | )
34 |
35 |
36 | class WindowsWindowEffect:
37 |
38 | def __init__(self):
39 | self.user32 = WinDLL("user32")
40 | self.dwmapi = WinDLL("dwmapi")
41 | self.SetWindowCompositionAttribute = self.user32.SetWindowCompositionAttribute
42 | self.DwmExtendFrameIntoClientArea = self.dwmapi.DwmExtendFrameIntoClientArea
43 | self.DwmEnableBlurBehindWindow = self.dwmapi.DwmEnableBlurBehindWindow
44 | self.DwmSetWindowAttribute = self.dwmapi.DwmSetWindowAttribute
45 |
46 | self.SetWindowCompositionAttribute.restype = c_bool
47 | self.DwmExtendFrameIntoClientArea.restype = LONG
48 | self.DwmEnableBlurBehindWindow.restype = LONG
49 | self.DwmSetWindowAttribute.restype = LONG
50 |
51 | self.SetWindowCompositionAttribute.argtypes = [
52 | c_int,
53 | POINTER(WINDOWCOMPOSITIONATTRIBDATA),
54 | ]
55 | self.DwmSetWindowAttribute.argtypes = [c_int, DWORD, LPCVOID, DWORD]
56 | self.DwmExtendFrameIntoClientArea.argtypes = [c_int, POINTER(MARGINS)]
57 | self.DwmEnableBlurBehindWindow.argtypes = [c_int, POINTER(DWM_BLURBEHIND)]
58 |
59 | # Initialize structure
60 | self.accentPolicy = ACCENT_POLICY()
61 | self.winCompAttrData = WINDOWCOMPOSITIONATTRIBDATA()
62 | self.winCompAttrData.Attribute = WINDOWCOMPOSITIONATTRIB.WCA_ACCENT_POLICY.value
63 | self.winCompAttrData.SizeOfData = sizeof(self.accentPolicy)
64 | self.winCompAttrData.Data = pointer(self.accentPolicy)
65 |
66 | def addShadowEffect(self, hWnd):
67 | if not self._isDwmCompositionEnabled():
68 | return
69 | hWnd = int(hWnd)
70 | margins = MARGINS(-1, -1, -1, -1)
71 | self.DwmExtendFrameIntoClientArea(hWnd, byref(margins))
72 |
73 | @staticmethod
74 | def _isDwmCompositionEnabled():
75 | bResult = c_int(0)
76 | windll.dwmapi.DwmIsCompositionEnabled(byref(bResult))
77 | return bool(bResult.value)
78 |
79 | @staticmethod
80 | def addWindowAnimation(hWnd):
81 | hWnd = int(hWnd)
82 | style = win32gui.GetWindowLong(hWnd, win32con.GWL_STYLE)
83 | win32gui.SetWindowLong(
84 | hWnd,
85 | win32con.GWL_STYLE,
86 | style
87 | | win32con.WS_MINIMIZEBOX
88 | | win32con.WS_MAXIMIZEBOX
89 | | win32con.WS_CAPTION
90 | | win32con.CS_DBLCLKS
91 | | win32con.WS_THICKFRAME,
92 | )
93 |
--------------------------------------------------------------------------------
/myapp/framelesswindow/win/event.py:
--------------------------------------------------------------------------------
1 | # Copyright
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, version 3.
6 | #
7 | # This program is distributed in the hope that it will be useful, but
8 | # WITHOUT ANY WARRANTY; without even the implied warranty of
9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10 | # General Public License for more details.
11 | #
12 | # You should have received a copy of the GNU General Public License
13 | # along with this program. If not, see .
14 |
15 |
16 | # Inspired and based on:
17 | # - https://github.com/zhiyiYo/PyQt-Frameless-Window
18 | # - https://gitee.com/Virace/pyside6-qml-frameless-window/tree/main
19 |
20 |
21 | import ctypes.wintypes
22 |
23 | import PySide6.QtCore
24 | import win32api
25 | import win32con
26 | import win32gui
27 |
28 | from .c_structures import MINMAXINFO, NCCALCSIZE_PARAMS
29 |
30 |
31 | class WindowsEventFilter(PySide6.QtCore.QAbstractNativeEventFilter):
32 | def __init__(self, border_width=None) -> None:
33 | super().__init__()
34 | self.border_width = border_width
35 | self.monitor_info = None
36 |
37 | def nativeEventFilter(self, eventType, message):
38 | msg = ctypes.wintypes.MSG.from_address(message.__int__())
39 |
40 | if not msg.hWnd:
41 | return False, 0
42 |
43 | if msg.message == win32con.WM_NCHITTEST and (self.border_width is not None):
44 |
45 | x, y, w, h = self.get_window_size(msg.hWnd)
46 | x_pos = (win32api.LOWORD(msg.lParam) - x) % 65536
47 | y_pos = win32api.HIWORD(msg.lParam) - y
48 |
49 | lx = x_pos < self.border_width
50 | rx = x_pos + 9 > w - self.border_width
51 | ty = y_pos < self.border_width
52 | by = y_pos > h - self.border_width
53 |
54 | if lx and ty:
55 | return True, win32con.HTTOPLEFT
56 | elif rx and by:
57 | return True, win32con.HTBOTTOMRIGHT
58 | elif rx and ty:
59 | return True, win32con.HTTOPRIGHT
60 | elif lx and by:
61 | return True, win32con.HTBOTTOMLEFT
62 | elif ty:
63 | return True, win32con.HTTOP
64 | elif by:
65 | return True, win32con.HTBOTTOM
66 | elif lx:
67 | return True, win32con.HTLEFT
68 | elif rx:
69 | return True, win32con.HTRIGHT
70 | elif msg.message == win32con.WM_NCCALCSIZE:
71 | if self.isWindowMaximized(msg.hWnd):
72 | self.monitorNCCALCSIZE(msg)
73 | return True, 0
74 | elif msg.message == win32con.WM_GETMINMAXINFO:
75 | if self.isWindowMaximized(msg.hWnd):
76 | window_rect = win32gui.GetWindowRect(msg.hWnd)
77 | if not window_rect:
78 | return False, 0
79 |
80 | # get the monitor handle
81 | monitor = win32api.MonitorFromRect(window_rect)
82 | if not monitor:
83 | return False, 0
84 |
85 | # get the monitor info
86 | self.monitor_info = win32api.GetMonitorInfo(monitor)
87 | monitor_rect = self.monitor_info["Monitor"]
88 | work_area = self.monitor_info["Work"]
89 |
90 | # convert lParam to MINMAXINFO pointer
91 | info = ctypes.cast(msg.lParam, ctypes.POINTER(MINMAXINFO)).contents
92 |
93 | # adjust the size of window
94 | info.ptMaxSize.x = work_area[2] - work_area[0]
95 | info.ptMaxSize.y = work_area[3] - work_area[1]
96 | info.ptMaxTrackSize.x = info.ptMaxSize.x
97 | info.ptMaxTrackSize.y = info.ptMaxSize.y
98 |
99 | # modify the upper left coordinate
100 | info.ptMaxPosition.x = abs(window_rect[0] - monitor_rect[0])
101 | info.ptMaxPosition.y = abs(window_rect[1] - monitor_rect[1])
102 | return True, 1
103 | return False, 0
104 |
105 | @classmethod
106 | def get_window_size(cls, hwnd):
107 | left, top, right, bottom = win32gui.GetWindowRect(hwnd)
108 |
109 | width = right - left
110 | height = bottom - top
111 | return left, top, width, height
112 |
113 | def monitorNCCALCSIZE(self, msg: ctypes.wintypes.MSG):
114 | monitor = win32api.MonitorFromWindow(msg.hWnd)
115 | if monitor is None and not self.monitor_info:
116 | return
117 | elif monitor is not None:
118 | self.monitor_info = win32api.GetMonitorInfo(monitor)
119 | params = ctypes.cast(msg.lParam,
120 | ctypes.POINTER(NCCALCSIZE_PARAMS)).contents
121 | params.rgrc[0].left = self.monitor_info["Work"][0]
122 | params.rgrc[0].top = self.monitor_info["Work"][1]
123 | params.rgrc[0].right = self.monitor_info["Work"][2]
124 | params.rgrc[0].bottom = self.monitor_info["Work"][3]
125 |
126 | @classmethod
127 | def isWindowMaximized(cls, hwnd) -> bool:
128 | windowPlacement = win32gui.GetWindowPlacement(hwnd)
129 | if not windowPlacement:
130 | return False
131 | return windowPlacement[1] == win32con.SW_MAXIMIZE
132 |
--------------------------------------------------------------------------------
/myapp/pyobjects/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 |
17 | from .example_singleton import SingletonPyObject
18 |
--------------------------------------------------------------------------------
/myapp/pyobjects/example_singleton.py:
--------------------------------------------------------------------------------
1 | # Copyright
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 |
17 | from PySide6.QtCore import Property, QObject, Signal
18 | from PySide6.QtQml import QmlElement, QmlSingleton
19 |
20 | QML_IMPORT_NAME = "pyobjects"
21 | QML_IMPORT_MAJOR_VERSION = 1
22 |
23 |
24 | @QmlElement
25 | @QmlSingleton
26 | class SingletonPyObject(QObject):
27 |
28 | def get_exposed_property(self) -> str:
29 | return "py property"
30 |
31 | exposed_property_changed = Signal(str)
32 | exposed_property = Property(str, get_exposed_property, notify=exposed_property_changed)
33 |
--------------------------------------------------------------------------------
/myapp/startup.py:
--------------------------------------------------------------------------------
1 | # Copyright
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 |
17 | import os
18 | import sys
19 |
20 |
21 | class StartUp:
22 | """Necessary steps for environment, Python and Qt"""
23 |
24 | @staticmethod
25 | def configure_qt_application_data():
26 | from PySide6.QtCore import QCoreApplication
27 | QCoreApplication.setApplicationName("my app name")
28 | QCoreApplication.setOrganizationName("my org name")
29 | QCoreApplication.setApplicationVersion("my app version")
30 |
31 | @staticmethod
32 | def configure_environment_variables():
33 | # Qt expects "qtquickcontrols2.conf" at root level, but the way we handle resources does not allow that.
34 | # So we need to override the path here
35 | os.environ["QT_QUICK_CONTROLS_CONF"] = ":/data/qtquickcontrols2.conf"
36 |
37 | @staticmethod
38 | def import_resources():
39 | import myapp.generated_resources # noqa: F401
40 |
41 | @staticmethod
42 | def import_bindings():
43 | import myapp.pyobjects # noqa: F401
44 |
45 | @staticmethod
46 | def start_application():
47 | from myapp.application import MyApplication
48 | app = MyApplication(sys.argv)
49 |
50 | app.set_window_icon()
51 | app.set_up_signals()
52 | app.set_up_window_event_filter()
53 | app.start_engine()
54 | app.set_up_window_effects()
55 | app.verify()
56 |
57 | sys.exit(app.exec())
58 |
59 |
60 | def perform_startup():
61 | we = StartUp()
62 |
63 | we.configure_qt_application_data()
64 | we.configure_environment_variables()
65 |
66 | we.import_resources()
67 | we.import_bindings()
68 |
69 | we.start_application()
70 |
--------------------------------------------------------------------------------
/pyproject.toml:
--------------------------------------------------------------------------------
1 | [project]
2 | name = "PySide6-project-template"
3 | version = "0.1.0"
4 | description = "An unofficial and opinionated project template designed for a quick start with PySide6 and QtQuick."
5 | readme = "README.MD"
6 | requires-python = ">=3.9"
7 | classifiers = [
8 | "Development Status :: 5 - Production/Stable",
9 | "License :: OSI Approved :: GNU General Public License v3",
10 | "Programming Language :: Python :: 3.9",
11 | "Programming Language :: Python :: 3.10",
12 | "Programming Language :: Python :: 3.11",
13 | "Programming Language :: Python :: 3.12",
14 | "Programming Language :: Python :: 3.13",
15 | "Private :: Do Not Upload",
16 | ]
17 | dependencies = [
18 | "pyside6-essentials==6.9.1",
19 | "pywin32>=310; sys_platform == 'win32'",
20 | ]
21 |
22 | [dependency-groups]
23 | dev = [
24 | "pytest>=8.4.0",
25 | ]
26 |
27 | [project.urls]
28 | Homepage = "https://github.com/trin94/PySide6-project-template"
29 | Repository = "https://github.com/trin94/PySide6-project-template"
30 | Issues = "https://github.com/trin94/PySide6-project-template/issues"
31 |
--------------------------------------------------------------------------------
/qml/app/MyAppMainPage.qml:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | import QtQuick
19 | import QtQuick.Controls
20 | import QtQuick.Layouts
21 |
22 | import pyobjects
23 |
24 | import "../header"
25 |
26 |
27 | Page {
28 | id: root
29 |
30 | required property var appWindow
31 |
32 | anchors {
33 | fill: root
34 | }
35 |
36 | header: MyAppHeader {
37 | appWindow: root.appWindow
38 | }
39 |
40 | ColumnLayout {
41 | spacing: 8
42 | width: root.width
43 |
44 | Image {
45 | source: "qrc:/data/app-icon.svg"
46 | asynchronous: true
47 |
48 | Layout.alignment: Qt.AlignHCenter
49 | Layout.preferredWidth: 308
50 | Layout.preferredHeight: 226
51 | Layout.topMargin: 30
52 | }
53 |
54 | Label {
55 | text: Qt.application.name + ' (' + Qt.application.version + ')'
56 |
57 | font {
58 | bold: true
59 | pixelSize: Qt.application.font.pixelSize * 1.5
60 | }
61 |
62 | Layout.alignment: Qt.AlignHCenter
63 | Layout.topMargin: 45
64 | }
65 |
66 | Label {
67 | text: 'Running on ' + Qt.platform.os
68 |
69 | font {
70 | bold: true
71 | pixelSize: Qt.application.font.pixelSize * 1.5
72 | }
73 |
74 | Layout.alignment: Qt.AlignHCenter
75 | }
76 |
77 | Label {
78 | text: qsTranslate("MainPage", "Have fun!")
79 | color: Material.accent
80 |
81 | font {
82 | bold: true
83 | pixelSize: Qt.application.font.pixelSize * 1.5
84 | }
85 |
86 | Layout.alignment: Qt.AlignHCenter
87 | Layout.topMargin: 45
88 | }
89 |
90 | Label {
91 | text: qsTranslate("MainPage", "Exposed from Python: '%1'").arg(SingletonPyObject.exposed_property)
92 |
93 | Layout.alignment: Qt.AlignHCenter
94 | Layout.topMargin: 45
95 | }
96 | }
97 |
98 | }
99 |
--------------------------------------------------------------------------------
/qml/app/qmldir:
--------------------------------------------------------------------------------
1 | qmldir app
2 | MyAppMainPage MyAppMainPage.qml
3 |
--------------------------------------------------------------------------------
/qml/header/MyAppHeader.qml:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | import QtQuick
19 |
20 |
21 | Item {
22 | id: root
23 |
24 | required property var appWindow
25 |
26 | width: parent.width
27 | height: headerBar.height
28 |
29 | TapHandler {
30 | gesturePolicy: TapHandler.DragThreshold
31 |
32 | onTapped: {
33 | if (tapCount === 2) {
34 | if (root.appWindow.visibility === Window.Maximized) {
35 | root.appWindow.showNormal()
36 | } else {
37 | root.appWindow.showMaximized()
38 | }
39 | }
40 | }
41 | }
42 |
43 | DragHandler {
44 | target: null
45 | grabPermissions: TapHandler.CanTakeOverFromAnything
46 |
47 | onActiveChanged: {
48 | if (active) {
49 | root.appWindow.startSystemMove()
50 | }
51 | }
52 | }
53 |
54 | MyAppHeaderContent {
55 | id: headerBar
56 |
57 | appWindow: root.appWindow
58 | }
59 |
60 | }
61 |
--------------------------------------------------------------------------------
/qml/header/MyAppHeaderContent.qml:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | import QtQuick
19 | import QtQuick.Controls
20 |
21 |
22 | Item {
23 | id: root
24 |
25 | required property var appWindow
26 |
27 | width: parent.width
28 | height: menuBar.height
29 |
30 | Row {
31 | width: root.width
32 | spacing: 0
33 |
34 | MenuBar {
35 | id: menuBar
36 |
37 | background: Rectangle {
38 | color: "transparent"
39 | }
40 |
41 | MyAppMenu1 {}
42 | MyAppMenu2 {}
43 | MyAppOptionsMenu {}
44 | MyAppHelpMenu {}
45 | }
46 |
47 | Label {
48 | text: Qt.application.name
49 | horizontalAlignment: Text.AlignHCenter
50 | verticalAlignment: Text.AlignVCenter
51 | width: root.width - menuBar.width * 2
52 | height: menuBar.height
53 | elide: LayoutMirroring.enabled ? Text.ElideLeft : Text.ElideRight
54 | }
55 |
56 | Item {
57 | id: buttonWrapper
58 |
59 | width: menuBar.width
60 | height: menuBar.height
61 |
62 | ToolButton {
63 | objectName: 'minimizeButton'
64 |
65 | height: buttonWrapper.height
66 | focusPolicy: Qt.NoFocus
67 |
68 | icon {
69 | source: "qrc:/data/icons/minimize_black_24dp.svg"
70 | width: 18
71 | height: 18
72 | }
73 |
74 | anchors {
75 | right: maximizeButton.left
76 | }
77 |
78 | onClicked: {
79 | root.appWindow.showMinimized()
80 | }
81 | }
82 |
83 | ToolButton {
84 | id: maximizeButton
85 |
86 | focusPolicy: Qt.NoFocus
87 | height: buttonWrapper.height
88 |
89 | icon {
90 | property bool maximized: root.appWindow.visibility === Window.Maximized
91 | property url iconMaximize: "qrc:/data/icons/open_in_full_black_24dp.svg"
92 | property url iconNormalize: "qrc:/data/icons/close_fullscreen_black_24dp.svg"
93 |
94 | source: maximized ? iconNormalize : iconMaximize
95 | width: 18
96 | height: 18
97 | }
98 |
99 | anchors {
100 | right: closeButton.left
101 | }
102 |
103 | onClicked: {
104 | if (root.appWindow.visibility === Window.Maximized) {
105 | root.appWindow.showNormal()
106 | } else {
107 | root.appWindow.showMaximized()
108 | }
109 | }
110 | }
111 |
112 | ToolButton {
113 | id: closeButton
114 |
115 | height: buttonWrapper.height
116 | focusPolicy: Qt.NoFocus
117 |
118 | icon {
119 | source: "qrc:/data/icons/close_black_24dp.svg"
120 | width: 18
121 | height: 18
122 | }
123 |
124 | anchors {
125 | right: buttonWrapper.right
126 | }
127 |
128 | onClicked: {
129 | root.appWindow.close()
130 | }
131 | }
132 | }
133 | }
134 |
135 | }
136 |
--------------------------------------------------------------------------------
/qml/header/MyAppHelpMenu.qml:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | import QtQuick.Controls
19 |
20 | import "../shared"
21 |
22 |
23 | MyAppAutoWidthMenu {
24 | title: qsTranslate("HeaderBar", "&Help")
25 |
26 | Action {
27 | text: qsTranslate("HeaderBar", "&Action 1")
28 | shortcut: "CTRL+N"
29 |
30 | onTriggered: {
31 | console.log("Action 1 pressed")
32 | }
33 | }
34 |
35 | Action {
36 | text: qsTranslate("HeaderBar", "&Action 2")
37 |
38 | onTriggered: {
39 | console.log("Action 2 pressed")
40 | }
41 | }
42 |
43 | MenuSeparator { }
44 |
45 | Action {
46 | text: qsTranslate("HeaderBar", "&Action 3")
47 |
48 | onTriggered: {
49 | console.log("Action 3 pressed")
50 | }
51 | }
52 |
53 | }
54 |
--------------------------------------------------------------------------------
/qml/header/MyAppMenu1.qml:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | import QtQuick.Controls
19 |
20 | import "../shared"
21 |
22 |
23 | MyAppAutoWidthMenu {
24 | title: qsTranslate("HeaderBar", "&Menu 1")
25 |
26 | Action {
27 | text: qsTranslate("HeaderBar", "&Action 1")
28 | shortcut: "CTRL+N"
29 |
30 | onTriggered: {
31 | console.log("Action 1 pressed")
32 | }
33 | }
34 |
35 | Action {
36 | text: qsTranslate("HeaderBar", "&Action 2")
37 |
38 | onTriggered: {
39 | console.log("Action 2 pressed")
40 | }
41 | }
42 |
43 | Action {
44 | text: qsTranslate("HeaderBar", "&Action 3")
45 |
46 | onTriggered: {
47 | console.log("Action 3 pressed")
48 | }
49 | }
50 |
51 | Action {
52 | text: qsTranslate("HeaderBar", "&Action 4")
53 |
54 | onTriggered: {
55 | console.log("Action 4 pressed")
56 | }
57 | }
58 |
59 | MenuSeparator { }
60 |
61 | Action {
62 | text: qsTranslate("HeaderBar", "&Action 5")
63 |
64 | onTriggered: {
65 | console.log("Action 5 pressed")
66 | }
67 | }
68 |
69 | }
70 |
--------------------------------------------------------------------------------
/qml/header/MyAppMenu2.qml:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | import QtQuick.Controls
19 |
20 | import "../shared"
21 |
22 |
23 | MyAppAutoWidthMenu {
24 | title: qsTranslate("HeaderBar", "&Menu 2")
25 |
26 | Action {
27 | text: qsTranslate("HeaderBar", "&Action 1")
28 | shortcut: "CTRL+N"
29 |
30 | onTriggered: {
31 | console.log("Action 1 pressed")
32 | }
33 | }
34 |
35 | Action {
36 | text: qsTranslate("HeaderBar", "&Action 2")
37 |
38 | onTriggered: {
39 | console.log("Action 2 pressed")
40 | }
41 | }
42 |
43 | MenuSeparator { }
44 |
45 | Action {
46 | text: qsTranslate("HeaderBar", "&Action 3")
47 |
48 | onTriggered: {
49 | console.log("Action 3 pressed")
50 | }
51 | }
52 |
53 | }
54 |
--------------------------------------------------------------------------------
/qml/header/MyAppOptionsMenu.qml:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | import QtQuick
19 | import QtQuick.Controls
20 | import QtQuick.Dialogs
21 |
22 | import "../shared"
23 | import "../models"
24 |
25 |
26 | MyAppAutoWidthMenu {
27 | id: root
28 |
29 | title: qsTranslate("HeaderBar", "&Options")
30 |
31 | MyAppAutoWidthMenu {
32 | title: qsTranslate("HeaderBar", "&Language")
33 |
34 | Repeater {
35 | model: MyAppLanguageModel {}
36 |
37 | MenuItem {
38 | id: _itemDelegate
39 |
40 | required property string language // from model
41 | required property string abbrev // from model
42 |
43 | text: qsTranslate("Languages", _itemDelegate.language)
44 |
45 | onTriggered: {
46 | animationDelayTimer.start()
47 | }
48 |
49 | Timer {
50 | id: animationDelayTimer
51 |
52 | interval: 125
53 |
54 | onTriggered: {
55 | Qt.uiLanguage = _itemDelegate.abbrev
56 | }
57 | }
58 | }
59 | }
60 | }
61 |
62 | MenuSeparator {
63 | }
64 |
65 | Action {
66 | text: qsTranslate("HeaderBar", "Showcase translated Qt internal strings")
67 |
68 | property var factory: Component
69 | {
70 | MessageDialog {
71 | title: qsTranslate("MessageBoxes", "Title")
72 | text: qsTranslate("MessageBoxes", "Change the language and look at the 'Yes' and 'Cancel' buttons")
73 | buttons: MessageDialog.Yes | MessageDialog.Cancel
74 | visible: true
75 | }
76 | }
77 |
78 | onTriggered: {
79 | const dialog = factory.createObject(root)
80 | dialog.closed.connect(dialog.destroy)
81 | dialog.open()
82 | }
83 | }
84 |
85 | }
86 |
--------------------------------------------------------------------------------
/qml/header/qmldir:
--------------------------------------------------------------------------------
1 | module header
2 | MyAppHeader MyAppHeader.qml
3 |
--------------------------------------------------------------------------------
/qml/main.qml:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | import QtQuick
19 | import QtQuick.Controls
20 |
21 | import "app"
22 |
23 |
24 | ApplicationWindow {
25 | id: root
26 |
27 | width: 1280
28 | height: 720
29 | flags: Qt.FramelessWindowHint | Qt.Window
30 | visible: true
31 |
32 | LayoutMirroring.enabled: Qt.application.layoutDirection === Qt.RightToLeft
33 | LayoutMirroring.childrenInherit: true
34 |
35 | MyAppMainPage {
36 | appWindow: _shared
37 |
38 | anchors {
39 | fill: root.contentItem
40 | margins: _private.windowBorder
41 | }
42 | }
43 |
44 | Component.onCompleted: {
45 | // load language from settings
46 | // Qt.uiLanguage = ...
47 | }
48 |
49 | QtObject {
50 | id: _private // Implementation details not exposed to child items
51 |
52 | readonly property bool maximized: root.visibility === Window.Maximized
53 | readonly property bool fullscreen: root.visibility === Window.FullScreen
54 | readonly property int windowBorder: fullscreen || maximized ? 0 : 1
55 | }
56 |
57 | QtObject {
58 | id: _shared // Properties and functions exposed to child items
59 |
60 | readonly property var visibility: root.visibility
61 |
62 | function startSystemMove() {
63 | root.startSystemMove()
64 | }
65 |
66 | function showMinimized() {
67 | root.showMinimized()
68 | }
69 |
70 | function showMaximized() {
71 | root.showMaximized()
72 | }
73 |
74 | function showNormal() {
75 | root.showNormal()
76 | }
77 |
78 | function close() {
79 | root.close()
80 | }
81 | }
82 |
83 | }
84 |
--------------------------------------------------------------------------------
/qml/models/MyAppLanguageModel.qml:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | import QtQuick
19 |
20 |
21 | ListModel {
22 | readonly property var languagesForTranslationTool: [
23 | qsTranslate("Languages", "English"),
24 | qsTranslate("Languages", "German"),
25 | qsTranslate("Languages", "Hebrew"),
26 | ]
27 |
28 | ListElement {
29 | language: "English"
30 | abbrev: "en_US"
31 | }
32 | ListElement {
33 | language: "German"
34 | abbrev: "de_DE"
35 | }
36 | ListElement {
37 | language: "Hebrew"
38 | abbrev: "he_IL"
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/qml/models/qmldir:
--------------------------------------------------------------------------------
1 | module models
2 | MyAppLanguageModel MyAppLanguageModel.qml
3 |
--------------------------------------------------------------------------------
/qml/models/tst_MyAppLanguageModel.qml:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | import QtQuick
19 | import QtTest
20 |
21 |
22 | TestCase {
23 | id: testCase
24 |
25 | name: "MyAppLanguageModelTest"
26 |
27 | Component {
28 | id: objectUnderTest
29 |
30 | MyAppLanguageModel {}
31 | }
32 |
33 | function extractLanguagesFrom(model: MyAppLanguageModel): Array {
34 | const languages = []
35 | for (let i = 0; i < model.count; i++) {
36 | languages.push(model.get(i).abbrev)
37 | }
38 | return languages
39 | }
40 |
41 | function test_languageExists_data() {
42 | return [
43 | {tag: 'de_DE', abbrev: 'de_DE'},
44 | {tag: 'en_US', abbrev: 'en_US'},
45 | {tag: 'he_IL', abbrev: 'he_IL'},
46 | ]
47 | }
48 |
49 | function test_languageExists(data) {
50 | const control = createTemporaryObject(objectUnderTest, testCase)
51 | verify(control)
52 |
53 | const languages = extractLanguagesFrom(control)
54 | verify(languages.includes(data.abbrev))
55 | }
56 |
57 | function test_languageDoesNotExist() {
58 | const control = createTemporaryObject(objectUnderTest, testCase)
59 | verify(control)
60 |
61 | const languages = extractLanguagesFrom(control)
62 | verify(!languages.includes('something-else'))
63 | }
64 |
65 | }
66 |
--------------------------------------------------------------------------------
/qml/shared/MyAppAutoWidthMenu.qml:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | import QtQuick
19 | import QtQuick.Controls
20 |
21 |
22 | Menu {
23 | id: root
24 |
25 | /*
26 | Taken and adapted from:
27 | https://martin.rpdev.net/2018/03/13/qt-quick-controls-2-automatically-set-the-width-of-menus.html
28 | */
29 |
30 | readonly property bool mMirrored: count > 0 && itemAt(0).mirrored
31 |
32 | x: mMirrored ? -width + parent.width : 0
33 |
34 | width: {
35 | let result = 0
36 | let padding = 0
37 | for (let i = 0; i < root.count; ++i) {
38 | let item = root.itemAt(i)
39 |
40 | if (!isMenuSeparator(item)) {
41 | result = Math.max(item.contentItem.implicitWidth, result)
42 | padding = Math.max(item.padding, padding)
43 | }
44 | }
45 | return result + padding * 2
46 | }
47 |
48 | function isMenuSeparator(item) {
49 | return item instanceof MenuSeparator
50 | }
51 |
52 | }
53 |
--------------------------------------------------------------------------------
/qml/shared/qmldir:
--------------------------------------------------------------------------------
1 | module shared
2 | MyAppAutoWidthMenu MyAppAutoWidthMenu.qml
3 |
--------------------------------------------------------------------------------
/test/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, version 3.
6 | #
7 | # This program is distributed in the hope that it will be useful, but
8 | # WITHOUT ANY WARRANTY; without even the implied warranty of
9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10 | # General Public License for more details.
11 | #
12 | # You should have received a copy of the GNU General Public License
13 | # along with this program. If not, see .
14 |
15 |
16 | try:
17 | import test.generated_resources # noqa: F401
18 | except ImportError:
19 | import sys
20 |
21 | print("Can not find resource module \"test.generated_resources\"", file=sys.stderr)
22 | print("To execute individual tests, please run \"just test\" once before", file=sys.stderr)
23 | sys.exit(1)
24 |
--------------------------------------------------------------------------------
/test/services/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, version 3.
6 | #
7 | # This program is distributed in the hope that it will be useful, but
8 | # WITHOUT ANY WARRANTY; without even the implied warranty of
9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10 | # General Public License for more details.
11 | #
12 | # You should have received a copy of the GNU General Public License
13 | # along with this program. If not, see .
14 |
--------------------------------------------------------------------------------
/test/services/test_resource_availability.py:
--------------------------------------------------------------------------------
1 | # Copyright
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 |
17 | import pytest
18 | from PySide6.QtCore import QFile
19 |
20 |
21 | @pytest.mark.parametrize("file_path", [
22 | ":/data/app-icon.svg",
23 | ":/i18n/de_DE.qm",
24 | ":/i18n/he_IL.qm",
25 | ])
26 | def test_resource_exist(file_path):
27 | file = QFile(file_path)
28 | assert file.exists()
29 |
30 |
31 | def test_resource_does_not_exist():
32 | file = QFile(":/random/file/which/not.exists")
33 | assert not file.exists()
34 |
--------------------------------------------------------------------------------
/uv.lock:
--------------------------------------------------------------------------------
1 | version = 1
2 | revision = 2
3 | requires-python = ">=3.9"
4 |
5 | [[package]]
6 | name = "colorama"
7 | version = "0.4.6"
8 | source = { registry = "https://pypi.org/simple" }
9 | sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697, upload-time = "2022-10-25T02:36:22.414Z" }
10 | wheels = [
11 | { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" },
12 | ]
13 |
14 | [[package]]
15 | name = "exceptiongroup"
16 | version = "1.3.0"
17 | source = { registry = "https://pypi.org/simple" }
18 | dependencies = [
19 | { name = "typing-extensions", marker = "python_full_version < '3.13'" },
20 | ]
21 | sdist = { url = "https://files.pythonhosted.org/packages/0b/9f/a65090624ecf468cdca03533906e7c69ed7588582240cfe7cc9e770b50eb/exceptiongroup-1.3.0.tar.gz", hash = "sha256:b241f5885f560bc56a59ee63ca4c6a8bfa46ae4ad651af316d4e81817bb9fd88", size = 29749, upload-time = "2025-05-10T17:42:51.123Z" }
22 | wheels = [
23 | { url = "https://files.pythonhosted.org/packages/36/f4/c6e662dade71f56cd2f3735141b265c3c79293c109549c1e6933b0651ffc/exceptiongroup-1.3.0-py3-none-any.whl", hash = "sha256:4d111e6e0c13d0644cad6ddaa7ed0261a0b36971f6d23e7ec9b4b9097da78a10", size = 16674, upload-time = "2025-05-10T17:42:49.33Z" },
24 | ]
25 |
26 | [[package]]
27 | name = "iniconfig"
28 | version = "2.1.0"
29 | source = { registry = "https://pypi.org/simple" }
30 | sdist = { url = "https://files.pythonhosted.org/packages/f2/97/ebf4da567aa6827c909642694d71c9fcf53e5b504f2d96afea02718862f3/iniconfig-2.1.0.tar.gz", hash = "sha256:3abbd2e30b36733fee78f9c7f7308f2d0050e88f0087fd25c2645f63c773e1c7", size = 4793, upload-time = "2025-03-19T20:09:59.721Z" }
31 | wheels = [
32 | { url = "https://files.pythonhosted.org/packages/2c/e1/e6716421ea10d38022b952c159d5161ca1193197fb744506875fbb87ea7b/iniconfig-2.1.0-py3-none-any.whl", hash = "sha256:9deba5723312380e77435581c6bf4935c94cbfab9b1ed33ef8d238ea168eb760", size = 6050, upload-time = "2025-03-19T20:10:01.071Z" },
33 | ]
34 |
35 | [[package]]
36 | name = "packaging"
37 | version = "25.0"
38 | source = { registry = "https://pypi.org/simple" }
39 | sdist = { url = "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz", hash = "sha256:d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f", size = 165727, upload-time = "2025-04-19T11:48:59.673Z" }
40 | wheels = [
41 | { url = "https://files.pythonhosted.org/packages/20/12/38679034af332785aac8774540895e234f4d07f7545804097de4b666afd8/packaging-25.0-py3-none-any.whl", hash = "sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484", size = 66469, upload-time = "2025-04-19T11:48:57.875Z" },
42 | ]
43 |
44 | [[package]]
45 | name = "pluggy"
46 | version = "1.6.0"
47 | source = { registry = "https://pypi.org/simple" }
48 | sdist = { url = "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz", hash = "sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3", size = 69412, upload-time = "2025-05-15T12:30:07.975Z" }
49 | wheels = [
50 | { url = "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746", size = 20538, upload-time = "2025-05-15T12:30:06.134Z" },
51 | ]
52 |
53 | [[package]]
54 | name = "pygments"
55 | version = "2.19.1"
56 | source = { registry = "https://pypi.org/simple" }
57 | sdist = { url = "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz", hash = "sha256:61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f", size = 4968581, upload-time = "2025-01-06T17:26:30.443Z" }
58 | wheels = [
59 | { url = "https://files.pythonhosted.org/packages/8a/0b/9fcc47d19c48b59121088dd6da2488a49d5f72dacf8262e2790a1d2c7d15/pygments-2.19.1-py3-none-any.whl", hash = "sha256:9ea1544ad55cecf4b8242fab6dd35a93bbce657034b0611ee383099054ab6d8c", size = 1225293, upload-time = "2025-01-06T17:26:25.553Z" },
60 | ]
61 |
62 | [[package]]
63 | name = "pyside6-essentials"
64 | version = "6.9.1"
65 | source = { registry = "https://pypi.org/simple" }
66 | dependencies = [
67 | { name = "shiboken6" },
68 | ]
69 | wheels = [
70 | { url = "https://files.pythonhosted.org/packages/8a/59/714874db9ef3bbbbda654fd3223248969bea02ec1a5bfdd1c941c4e97749/PySide6_Essentials-6.9.1-cp39-abi3-macosx_12_0_universal2.whl", hash = "sha256:ed43435a70e018e1c22efcaf34a9430b83cfcad716dba661b03de21c13322fab", size = 132957077, upload-time = "2025-06-03T13:11:52.629Z" },
71 | { url = "https://files.pythonhosted.org/packages/59/6a/ea0db68d40a1c487fd255634896f4e37b6560e3ef1f57ca5139bf6509b1f/PySide6_Essentials-6.9.1-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:e5da48883f006c6206ef85874db74ddebcdf69b0281bd4f1642b1c5ac1d54aea", size = 96416183, upload-time = "2025-06-03T13:12:48.945Z" },
72 | { url = "https://files.pythonhosted.org/packages/5b/2f/4243630d1733522638c4967d36018c38719d8b84f5246bf3d4c010e0aa9d/PySide6_Essentials-6.9.1-cp39-abi3-manylinux_2_39_aarch64.whl", hash = "sha256:e46a2801c9c6098025515fd0af6c594b9e9c951842f68b8f6f3da9858b9b26c2", size = 94171343, upload-time = "2025-06-03T13:12:59.426Z" },
73 | { url = "https://files.pythonhosted.org/packages/0d/a9/a8e0209ba9116f2c2db990cfb79f2edbd5a3a428013be2df1f1cddd660a9/PySide6_Essentials-6.9.1-cp39-abi3-win_amd64.whl", hash = "sha256:ad1ac94011492dba33051bc33db1c76a7d6f815a81c01422cb6220273b369145", size = 72435676, upload-time = "2025-06-03T13:13:08.805Z" },
74 | { url = "https://files.pythonhosted.org/packages/d0/e4/23268c57e775a1a4d2843d288a9583a47f2e4b3977a9ae93cb9ded1a4ea5/PySide6_Essentials-6.9.1-cp39-abi3-win_arm64.whl", hash = "sha256:35c2c2bb4a88db74d11e638cf917524ff35785883f10b439ead07960a5733aa4", size = 49483707, upload-time = "2025-06-03T13:13:16.399Z" },
75 | ]
76 |
77 | [[package]]
78 | name = "pyside6-project-template"
79 | version = "0.1.0"
80 | source = { virtual = "." }
81 | dependencies = [
82 | { name = "pyside6-essentials" },
83 | { name = "pywin32", marker = "sys_platform == 'win32'" },
84 | ]
85 |
86 | [package.dev-dependencies]
87 | dev = [
88 | { name = "pytest" },
89 | ]
90 |
91 | [package.metadata]
92 | requires-dist = [
93 | { name = "pyside6-essentials", specifier = "==6.9.1" },
94 | { name = "pywin32", marker = "sys_platform == 'win32'", specifier = ">=310" },
95 | ]
96 |
97 | [package.metadata.requires-dev]
98 | dev = [{ name = "pytest", specifier = ">=8.4.0" }]
99 |
100 | [[package]]
101 | name = "pytest"
102 | version = "8.4.0"
103 | source = { registry = "https://pypi.org/simple" }
104 | dependencies = [
105 | { name = "colorama", marker = "sys_platform == 'win32'" },
106 | { name = "exceptiongroup", marker = "python_full_version < '3.11'" },
107 | { name = "iniconfig" },
108 | { name = "packaging" },
109 | { name = "pluggy" },
110 | { name = "pygments" },
111 | { name = "tomli", marker = "python_full_version < '3.11'" },
112 | ]
113 | sdist = { url = "https://files.pythonhosted.org/packages/fb/aa/405082ce2749be5398045152251ac69c0f3578c7077efc53431303af97ce/pytest-8.4.0.tar.gz", hash = "sha256:14d920b48472ea0dbf68e45b96cd1ffda4705f33307dcc86c676c1b5104838a6", size = 1515232, upload-time = "2025-06-02T17:36:30.03Z" }
114 | wheels = [
115 | { url = "https://files.pythonhosted.org/packages/2f/de/afa024cbe022b1b318a3d224125aa24939e99b4ff6f22e0ba639a2eaee47/pytest-8.4.0-py3-none-any.whl", hash = "sha256:f40f825768ad76c0977cbacdf1fd37c6f7a468e460ea6a0636078f8972d4517e", size = 363797, upload-time = "2025-06-02T17:36:27.859Z" },
116 | ]
117 |
118 | [[package]]
119 | name = "pywin32"
120 | version = "310"
121 | source = { registry = "https://pypi.org/simple" }
122 | wheels = [
123 | { url = "https://files.pythonhosted.org/packages/95/da/a5f38fffbba2fb99aa4aa905480ac4b8e83ca486659ac8c95bce47fb5276/pywin32-310-cp310-cp310-win32.whl", hash = "sha256:6dd97011efc8bf51d6793a82292419eba2c71cf8e7250cfac03bba284454abc1", size = 8848240, upload-time = "2025-03-17T00:55:46.783Z" },
124 | { url = "https://files.pythonhosted.org/packages/aa/fe/d873a773324fa565619ba555a82c9dabd677301720f3660a731a5d07e49a/pywin32-310-cp310-cp310-win_amd64.whl", hash = "sha256:c3e78706e4229b915a0821941a84e7ef420bf2b77e08c9dae3c76fd03fd2ae3d", size = 9601854, upload-time = "2025-03-17T00:55:48.783Z" },
125 | { url = "https://files.pythonhosted.org/packages/3c/84/1a8e3d7a15490d28a5d816efa229ecb4999cdc51a7c30dd8914f669093b8/pywin32-310-cp310-cp310-win_arm64.whl", hash = "sha256:33babed0cf0c92a6f94cc6cc13546ab24ee13e3e800e61ed87609ab91e4c8213", size = 8522963, upload-time = "2025-03-17T00:55:50.969Z" },
126 | { url = "https://files.pythonhosted.org/packages/f7/b1/68aa2986129fb1011dabbe95f0136f44509afaf072b12b8f815905a39f33/pywin32-310-cp311-cp311-win32.whl", hash = "sha256:1e765f9564e83011a63321bb9d27ec456a0ed90d3732c4b2e312b855365ed8bd", size = 8784284, upload-time = "2025-03-17T00:55:53.124Z" },
127 | { url = "https://files.pythonhosted.org/packages/b3/bd/d1592635992dd8db5bb8ace0551bc3a769de1ac8850200cfa517e72739fb/pywin32-310-cp311-cp311-win_amd64.whl", hash = "sha256:126298077a9d7c95c53823934f000599f66ec9296b09167810eb24875f32689c", size = 9520748, upload-time = "2025-03-17T00:55:55.203Z" },
128 | { url = "https://files.pythonhosted.org/packages/90/b1/ac8b1ffce6603849eb45a91cf126c0fa5431f186c2e768bf56889c46f51c/pywin32-310-cp311-cp311-win_arm64.whl", hash = "sha256:19ec5fc9b1d51c4350be7bb00760ffce46e6c95eaf2f0b2f1150657b1a43c582", size = 8455941, upload-time = "2025-03-17T00:55:57.048Z" },
129 | { url = "https://files.pythonhosted.org/packages/6b/ec/4fdbe47932f671d6e348474ea35ed94227fb5df56a7c30cbbb42cd396ed0/pywin32-310-cp312-cp312-win32.whl", hash = "sha256:8a75a5cc3893e83a108c05d82198880704c44bbaee4d06e442e471d3c9ea4f3d", size = 8796239, upload-time = "2025-03-17T00:55:58.807Z" },
130 | { url = "https://files.pythonhosted.org/packages/e3/e5/b0627f8bb84e06991bea89ad8153a9e50ace40b2e1195d68e9dff6b03d0f/pywin32-310-cp312-cp312-win_amd64.whl", hash = "sha256:bf5c397c9a9a19a6f62f3fb821fbf36cac08f03770056711f765ec1503972060", size = 9503839, upload-time = "2025-03-17T00:56:00.8Z" },
131 | { url = "https://files.pythonhosted.org/packages/1f/32/9ccf53748df72301a89713936645a664ec001abd35ecc8578beda593d37d/pywin32-310-cp312-cp312-win_arm64.whl", hash = "sha256:2349cc906eae872d0663d4d6290d13b90621eaf78964bb1578632ff20e152966", size = 8459470, upload-time = "2025-03-17T00:56:02.601Z" },
132 | { url = "https://files.pythonhosted.org/packages/1c/09/9c1b978ffc4ae53999e89c19c77ba882d9fce476729f23ef55211ea1c034/pywin32-310-cp313-cp313-win32.whl", hash = "sha256:5d241a659c496ada3253cd01cfaa779b048e90ce4b2b38cd44168ad555ce74ab", size = 8794384, upload-time = "2025-03-17T00:56:04.383Z" },
133 | { url = "https://files.pythonhosted.org/packages/45/3c/b4640f740ffebadd5d34df35fecba0e1cfef8fde9f3e594df91c28ad9b50/pywin32-310-cp313-cp313-win_amd64.whl", hash = "sha256:667827eb3a90208ddbdcc9e860c81bde63a135710e21e4cb3348968e4bd5249e", size = 9503039, upload-time = "2025-03-17T00:56:06.207Z" },
134 | { url = "https://files.pythonhosted.org/packages/b4/f4/f785020090fb050e7fb6d34b780f2231f302609dc964672f72bfaeb59a28/pywin32-310-cp313-cp313-win_arm64.whl", hash = "sha256:e308f831de771482b7cf692a1f308f8fca701b2d8f9dde6cc440c7da17e47b33", size = 8458152, upload-time = "2025-03-17T00:56:07.819Z" },
135 | { url = "https://files.pythonhosted.org/packages/a2/cd/d09d434630edb6a0c44ad5079611279a67530296cfe0451e003de7f449ff/pywin32-310-cp39-cp39-win32.whl", hash = "sha256:851c8d927af0d879221e616ae1f66145253537bbdd321a77e8ef701b443a9a1a", size = 8848099, upload-time = "2025-03-17T00:55:42.415Z" },
136 | { url = "https://files.pythonhosted.org/packages/93/ff/2a8c10315ffbdee7b3883ac0d1667e267ca8b3f6f640d81d43b87a82c0c7/pywin32-310-cp39-cp39-win_amd64.whl", hash = "sha256:96867217335559ac619f00ad70e513c0fcf84b8a3af9fc2bba3b59b97da70475", size = 9602031, upload-time = "2025-03-17T00:55:44.512Z" },
137 | ]
138 |
139 | [[package]]
140 | name = "shiboken6"
141 | version = "6.9.1"
142 | source = { registry = "https://pypi.org/simple" }
143 | wheels = [
144 | { url = "https://files.pythonhosted.org/packages/98/98/34d4d25b79055959b171420d47fcc10121aefcbb261c91d5491252830e31/shiboken6-6.9.1-cp39-abi3-macosx_12_0_universal2.whl", hash = "sha256:40e92afc88da06b5100c56b761e59837ff282166e9531268f3d910b6128e621e", size = 406159, upload-time = "2025-06-03T13:16:45.104Z" },
145 | { url = "https://files.pythonhosted.org/packages/5a/07/53b2532ecd42ff925feb06b7bb16917f5f99f9c3470f0815c256789d818b/shiboken6-6.9.1-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:efcdfa8655d34aaf8d7a0c7724def3440bd46db02f5ad3b1785db5f6ccb0a8ff", size = 206756, upload-time = "2025-06-03T13:16:46.528Z" },
146 | { url = "https://files.pythonhosted.org/packages/5e/b0/75b86ee3f7b044e6a87fbe7abefd1948ca4ae5fcde8321f4986a1d9eaa5e/shiboken6-6.9.1-cp39-abi3-manylinux_2_39_aarch64.whl", hash = "sha256:efcf75d48a29ae072d0bf54b3cd5a59ae91bb6b3ab7459e17c769355486c2e0b", size = 203233, upload-time = "2025-06-03T13:16:48.264Z" },
147 | { url = "https://files.pythonhosted.org/packages/30/56/00af281275aab4c79e22e0ea65feede0a5c6da3b84e86b21a4a0071e0744/shiboken6-6.9.1-cp39-abi3-win_amd64.whl", hash = "sha256:209ccf02c135bd70321143dcbc5023ae0c056aa4850a845955dd2f9b2ff280a9", size = 1153587, upload-time = "2025-06-03T13:16:50.454Z" },
148 | { url = "https://files.pythonhosted.org/packages/de/ce/6ccd382fbe1a96926c5514afa6f2c42da3a9a8482e61f8dfc6068a9ca64f/shiboken6-6.9.1-cp39-abi3-win_arm64.whl", hash = "sha256:2a39997ce275ced7853defc89d3a1f19a11c90991ac6eef3435a69bb0b7ff1de", size = 1831623, upload-time = "2025-06-03T13:16:52.468Z" },
149 | ]
150 |
151 | [[package]]
152 | name = "tomli"
153 | version = "2.2.1"
154 | source = { registry = "https://pypi.org/simple" }
155 | sdist = { url = "https://files.pythonhosted.org/packages/18/87/302344fed471e44a87289cf4967697d07e532f2421fdaf868a303cbae4ff/tomli-2.2.1.tar.gz", hash = "sha256:cd45e1dc79c835ce60f7404ec8119f2eb06d38b1deba146f07ced3bbc44505ff", size = 17175, upload-time = "2024-11-27T22:38:36.873Z" }
156 | wheels = [
157 | { url = "https://files.pythonhosted.org/packages/43/ca/75707e6efa2b37c77dadb324ae7d9571cb424e61ea73fad7c56c2d14527f/tomli-2.2.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:678e4fa69e4575eb77d103de3df8a895e1591b48e740211bd1067378c69e8249", size = 131077, upload-time = "2024-11-27T22:37:54.956Z" },
158 | { url = "https://files.pythonhosted.org/packages/c7/16/51ae563a8615d472fdbffc43a3f3d46588c264ac4f024f63f01283becfbb/tomli-2.2.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:023aa114dd824ade0100497eb2318602af309e5a55595f76b626d6d9f3b7b0a6", size = 123429, upload-time = "2024-11-27T22:37:56.698Z" },
159 | { url = "https://files.pythonhosted.org/packages/f1/dd/4f6cd1e7b160041db83c694abc78e100473c15d54620083dbd5aae7b990e/tomli-2.2.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ece47d672db52ac607a3d9599a9d48dcb2f2f735c6c2d1f34130085bb12b112a", size = 226067, upload-time = "2024-11-27T22:37:57.63Z" },
160 | { url = "https://files.pythonhosted.org/packages/a9/6b/c54ede5dc70d648cc6361eaf429304b02f2871a345bbdd51e993d6cdf550/tomli-2.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6972ca9c9cc9f0acaa56a8ca1ff51e7af152a9f87fb64623e31d5c83700080ee", size = 236030, upload-time = "2024-11-27T22:37:59.344Z" },
161 | { url = "https://files.pythonhosted.org/packages/1f/47/999514fa49cfaf7a92c805a86c3c43f4215621855d151b61c602abb38091/tomli-2.2.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c954d2250168d28797dd4e3ac5cf812a406cd5a92674ee4c8f123c889786aa8e", size = 240898, upload-time = "2024-11-27T22:38:00.429Z" },
162 | { url = "https://files.pythonhosted.org/packages/73/41/0a01279a7ae09ee1573b423318e7934674ce06eb33f50936655071d81a24/tomli-2.2.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:8dd28b3e155b80f4d54beb40a441d366adcfe740969820caf156c019fb5c7ec4", size = 229894, upload-time = "2024-11-27T22:38:02.094Z" },
163 | { url = "https://files.pythonhosted.org/packages/55/18/5d8bc5b0a0362311ce4d18830a5d28943667599a60d20118074ea1b01bb7/tomli-2.2.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:e59e304978767a54663af13c07b3d1af22ddee3bb2fb0618ca1593e4f593a106", size = 245319, upload-time = "2024-11-27T22:38:03.206Z" },
164 | { url = "https://files.pythonhosted.org/packages/92/a3/7ade0576d17f3cdf5ff44d61390d4b3febb8a9fc2b480c75c47ea048c646/tomli-2.2.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:33580bccab0338d00994d7f16f4c4ec25b776af3ffaac1ed74e0b3fc95e885a8", size = 238273, upload-time = "2024-11-27T22:38:04.217Z" },
165 | { url = "https://files.pythonhosted.org/packages/72/6f/fa64ef058ac1446a1e51110c375339b3ec6be245af9d14c87c4a6412dd32/tomli-2.2.1-cp311-cp311-win32.whl", hash = "sha256:465af0e0875402f1d226519c9904f37254b3045fc5084697cefb9bdde1ff99ff", size = 98310, upload-time = "2024-11-27T22:38:05.908Z" },
166 | { url = "https://files.pythonhosted.org/packages/6a/1c/4a2dcde4a51b81be3530565e92eda625d94dafb46dbeb15069df4caffc34/tomli-2.2.1-cp311-cp311-win_amd64.whl", hash = "sha256:2d0f2fdd22b02c6d81637a3c95f8cd77f995846af7414c5c4b8d0545afa1bc4b", size = 108309, upload-time = "2024-11-27T22:38:06.812Z" },
167 | { url = "https://files.pythonhosted.org/packages/52/e1/f8af4c2fcde17500422858155aeb0d7e93477a0d59a98e56cbfe75070fd0/tomli-2.2.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:4a8f6e44de52d5e6c657c9fe83b562f5f4256d8ebbfe4ff922c495620a7f6cea", size = 132762, upload-time = "2024-11-27T22:38:07.731Z" },
168 | { url = "https://files.pythonhosted.org/packages/03/b8/152c68bb84fc00396b83e7bbddd5ec0bd3dd409db4195e2a9b3e398ad2e3/tomli-2.2.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8d57ca8095a641b8237d5b079147646153d22552f1c637fd3ba7f4b0b29167a8", size = 123453, upload-time = "2024-11-27T22:38:09.384Z" },
169 | { url = "https://files.pythonhosted.org/packages/c8/d6/fc9267af9166f79ac528ff7e8c55c8181ded34eb4b0e93daa767b8841573/tomli-2.2.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4e340144ad7ae1533cb897d406382b4b6fede8890a03738ff1683af800d54192", size = 233486, upload-time = "2024-11-27T22:38:10.329Z" },
170 | { url = "https://files.pythonhosted.org/packages/5c/51/51c3f2884d7bab89af25f678447ea7d297b53b5a3b5730a7cb2ef6069f07/tomli-2.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:db2b95f9de79181805df90bedc5a5ab4c165e6ec3fe99f970d0e302f384ad222", size = 242349, upload-time = "2024-11-27T22:38:11.443Z" },
171 | { url = "https://files.pythonhosted.org/packages/ab/df/bfa89627d13a5cc22402e441e8a931ef2108403db390ff3345c05253935e/tomli-2.2.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:40741994320b232529c802f8bc86da4e1aa9f413db394617b9a256ae0f9a7f77", size = 252159, upload-time = "2024-11-27T22:38:13.099Z" },
172 | { url = "https://files.pythonhosted.org/packages/9e/6e/fa2b916dced65763a5168c6ccb91066f7639bdc88b48adda990db10c8c0b/tomli-2.2.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:400e720fe168c0f8521520190686ef8ef033fb19fc493da09779e592861b78c6", size = 237243, upload-time = "2024-11-27T22:38:14.766Z" },
173 | { url = "https://files.pythonhosted.org/packages/b4/04/885d3b1f650e1153cbb93a6a9782c58a972b94ea4483ae4ac5cedd5e4a09/tomli-2.2.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:02abe224de6ae62c19f090f68da4e27b10af2b93213d36cf44e6e1c5abd19fdd", size = 259645, upload-time = "2024-11-27T22:38:15.843Z" },
174 | { url = "https://files.pythonhosted.org/packages/9c/de/6b432d66e986e501586da298e28ebeefd3edc2c780f3ad73d22566034239/tomli-2.2.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b82ebccc8c8a36f2094e969560a1b836758481f3dc360ce9a3277c65f374285e", size = 244584, upload-time = "2024-11-27T22:38:17.645Z" },
175 | { url = "https://files.pythonhosted.org/packages/1c/9a/47c0449b98e6e7d1be6cbac02f93dd79003234ddc4aaab6ba07a9a7482e2/tomli-2.2.1-cp312-cp312-win32.whl", hash = "sha256:889f80ef92701b9dbb224e49ec87c645ce5df3fa2cc548664eb8a25e03127a98", size = 98875, upload-time = "2024-11-27T22:38:19.159Z" },
176 | { url = "https://files.pythonhosted.org/packages/ef/60/9b9638f081c6f1261e2688bd487625cd1e660d0a85bd469e91d8db969734/tomli-2.2.1-cp312-cp312-win_amd64.whl", hash = "sha256:7fc04e92e1d624a4a63c76474610238576942d6b8950a2d7f908a340494e67e4", size = 109418, upload-time = "2024-11-27T22:38:20.064Z" },
177 | { url = "https://files.pythonhosted.org/packages/04/90/2ee5f2e0362cb8a0b6499dc44f4d7d48f8fff06d28ba46e6f1eaa61a1388/tomli-2.2.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f4039b9cbc3048b2416cc57ab3bda989a6fcf9b36cf8937f01a6e731b64f80d7", size = 132708, upload-time = "2024-11-27T22:38:21.659Z" },
178 | { url = "https://files.pythonhosted.org/packages/c0/ec/46b4108816de6b385141f082ba99e315501ccd0a2ea23db4a100dd3990ea/tomli-2.2.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:286f0ca2ffeeb5b9bd4fcc8d6c330534323ec51b2f52da063b11c502da16f30c", size = 123582, upload-time = "2024-11-27T22:38:22.693Z" },
179 | { url = "https://files.pythonhosted.org/packages/a0/bd/b470466d0137b37b68d24556c38a0cc819e8febe392d5b199dcd7f578365/tomli-2.2.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a92ef1a44547e894e2a17d24e7557a5e85a9e1d0048b0b5e7541f76c5032cb13", size = 232543, upload-time = "2024-11-27T22:38:24.367Z" },
180 | { url = "https://files.pythonhosted.org/packages/d9/e5/82e80ff3b751373f7cead2815bcbe2d51c895b3c990686741a8e56ec42ab/tomli-2.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9316dc65bed1684c9a98ee68759ceaed29d229e985297003e494aa825ebb0281", size = 241691, upload-time = "2024-11-27T22:38:26.081Z" },
181 | { url = "https://files.pythonhosted.org/packages/05/7e/2a110bc2713557d6a1bfb06af23dd01e7dde52b6ee7dadc589868f9abfac/tomli-2.2.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e85e99945e688e32d5a35c1ff38ed0b3f41f43fad8df0bdf79f72b2ba7bc5272", size = 251170, upload-time = "2024-11-27T22:38:27.921Z" },
182 | { url = "https://files.pythonhosted.org/packages/64/7b/22d713946efe00e0adbcdfd6d1aa119ae03fd0b60ebed51ebb3fa9f5a2e5/tomli-2.2.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ac065718db92ca818f8d6141b5f66369833d4a80a9d74435a268c52bdfa73140", size = 236530, upload-time = "2024-11-27T22:38:29.591Z" },
183 | { url = "https://files.pythonhosted.org/packages/38/31/3a76f67da4b0cf37b742ca76beaf819dca0ebef26d78fc794a576e08accf/tomli-2.2.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:d920f33822747519673ee656a4b6ac33e382eca9d331c87770faa3eef562aeb2", size = 258666, upload-time = "2024-11-27T22:38:30.639Z" },
184 | { url = "https://files.pythonhosted.org/packages/07/10/5af1293da642aded87e8a988753945d0cf7e00a9452d3911dd3bb354c9e2/tomli-2.2.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:a198f10c4d1b1375d7687bc25294306e551bf1abfa4eace6650070a5c1ae2744", size = 243954, upload-time = "2024-11-27T22:38:31.702Z" },
185 | { url = "https://files.pythonhosted.org/packages/5b/b9/1ed31d167be802da0fc95020d04cd27b7d7065cc6fbefdd2f9186f60d7bd/tomli-2.2.1-cp313-cp313-win32.whl", hash = "sha256:d3f5614314d758649ab2ab3a62d4f2004c825922f9e370b29416484086b264ec", size = 98724, upload-time = "2024-11-27T22:38:32.837Z" },
186 | { url = "https://files.pythonhosted.org/packages/c7/32/b0963458706accd9afcfeb867c0f9175a741bf7b19cd424230714d722198/tomli-2.2.1-cp313-cp313-win_amd64.whl", hash = "sha256:a38aa0308e754b0e3c67e344754dff64999ff9b513e691d0e786265c93583c69", size = 109383, upload-time = "2024-11-27T22:38:34.455Z" },
187 | { url = "https://files.pythonhosted.org/packages/6e/c2/61d3e0f47e2b74ef40a68b9e6ad5984f6241a942f7cd3bbfbdbd03861ea9/tomli-2.2.1-py3-none-any.whl", hash = "sha256:cb55c73c5f4408779d0cf3eef9f762b9c9f147a77de7b258bef0a5628adc85cc", size = 14257, upload-time = "2024-11-27T22:38:35.385Z" },
188 | ]
189 |
190 | [[package]]
191 | name = "typing-extensions"
192 | version = "4.14.0"
193 | source = { registry = "https://pypi.org/simple" }
194 | sdist = { url = "https://files.pythonhosted.org/packages/d1/bc/51647cd02527e87d05cb083ccc402f93e441606ff1f01739a62c8ad09ba5/typing_extensions-4.14.0.tar.gz", hash = "sha256:8676b788e32f02ab42d9e7c61324048ae4c6d844a399eebace3d4979d75ceef4", size = 107423, upload-time = "2025-06-02T14:52:11.399Z" }
195 | wheels = [
196 | { url = "https://files.pythonhosted.org/packages/69/e0/552843e0d356fbb5256d21449fa957fa4eff3bbc135a74a691ee70c7c5da/typing_extensions-4.14.0-py3-none-any.whl", hash = "sha256:a1514509136dd0b477638fc68d6a91497af5076466ad0fa6c338e44e359944af", size = 43839, upload-time = "2025-06-02T14:52:10.026Z" },
197 | ]
198 |
--------------------------------------------------------------------------------