vsview-nativeres 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,219 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[codz]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py.cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ # Pipfile.lock
96
+
97
+ # UV
98
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ # uv.lock
102
+
103
+ # poetry
104
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
105
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
106
+ # commonly ignored for libraries.
107
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108
+ # poetry.lock
109
+ # poetry.toml
110
+
111
+ # pdm
112
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
113
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
114
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
115
+ # pdm.lock
116
+ # pdm.toml
117
+ .pdm-python
118
+ .pdm-build/
119
+
120
+ # pixi
121
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
122
+ # pixi.lock
123
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
124
+ # in the .venv directory. It is recommended not to include this directory in version control.
125
+ .pixi
126
+
127
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
128
+ __pypackages__/
129
+
130
+ # Celery stuff
131
+ celerybeat-schedule
132
+ celerybeat.pid
133
+
134
+ # Redis
135
+ *.rdb
136
+ *.aof
137
+ *.pid
138
+
139
+ # RabbitMQ
140
+ mnesia/
141
+ rabbitmq/
142
+ rabbitmq-data/
143
+
144
+ # ActiveMQ
145
+ activemq-data/
146
+
147
+ # SageMath parsed files
148
+ *.sage.py
149
+
150
+ # Environments
151
+ .env
152
+ .envrc
153
+ .venv
154
+ env/
155
+ venv/
156
+ ENV/
157
+ env.bak/
158
+ venv.bak/
159
+
160
+ # Spyder project settings
161
+ .spyderproject
162
+ .spyproject
163
+
164
+ # Rope project settings
165
+ .ropeproject
166
+
167
+ # mkdocs documentation
168
+ /site
169
+
170
+ # mypy
171
+ .mypy_cache/
172
+ .dmypy.json
173
+ dmypy.json
174
+
175
+ # Pyre type checker
176
+ .pyre/
177
+
178
+ # pytype static type analyzer
179
+ .pytype/
180
+
181
+ # Cython debug symbols
182
+ cython_debug/
183
+
184
+ # PyCharm
185
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
186
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
187
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
188
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
189
+ # .idea/
190
+
191
+ # Abstra
192
+ # Abstra is an AI-powered process automation framework.
193
+ # Ignore directories containing user credentials, local state, and settings.
194
+ # Learn more at https://abstra.io/docs
195
+ .abstra/
196
+
197
+ # Visual Studio Code
198
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
199
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
200
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
201
+ # you could uncomment the following to ignore the entire vscode folder
202
+ # .vscode/
203
+
204
+ # Ruff stuff:
205
+ .ruff_cache/
206
+
207
+ # PyPI configuration file
208
+ .pypirc
209
+
210
+ # Marimo
211
+ marimo/_static/
212
+ marimo/_lsp/
213
+ __marimo__/
214
+
215
+ # Streamlit
216
+ .streamlit/secrets.toml
217
+
218
+ # vsjet files
219
+ .vsjet
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Jaded Encoding Thaumaturgy
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,149 @@
1
+ Metadata-Version: 2.4
2
+ Name: vsview-nativeres
3
+ Version: 0.1.0
4
+ Summary: A vsview plugin for analyzing and determining the native resolution of video content
5
+ Project-URL: Documentation, https://github.com/Jaded-Encoding-Thaumaturgy/nativeres/blob/master/src/plugin/README.md
6
+ Project-URL: Source Code, https://github.com/Jaded-Encoding-Thaumaturgy/nativeres/tree/master/src/plugin
7
+ Project-URL: Bug Tracker, https://github.com/Jaded-Encoding-Thaumaturgy/nativeres/issues
8
+ Project-URL: Contact, https://discord.gg/XTpc6Fa9eB
9
+ Author-email: Vardë <ichunjo.le.terrible@gmail.com>
10
+ Maintainer-email: Vardë <ichunjo.le.terrible@gmail.com>
11
+ License: MIT License
12
+
13
+ Copyright (c) 2025 Jaded Encoding Thaumaturgy
14
+
15
+ Permission is hereby granted, free of charge, to any person obtaining a copy
16
+ of this software and associated documentation files (the "Software"), to deal
17
+ in the Software without restriction, including without limitation the rights
18
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
19
+ copies of the Software, and to permit persons to whom the Software is
20
+ furnished to do so, subject to the following conditions:
21
+
22
+ The above copyright notice and this permission notice shall be included in all
23
+ copies or substantial portions of the Software.
24
+
25
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
28
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
30
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
31
+ SOFTWARE.
32
+ License-File: LICENSE
33
+ Classifier: License :: OSI Approved :: MIT License
34
+ Classifier: Operating System :: OS Independent
35
+ Classifier: Programming Language :: Python :: 3
36
+ Classifier: Programming Language :: Python :: 3.12
37
+ Classifier: Programming Language :: Python :: 3.13
38
+ Classifier: Programming Language :: Python :: 3.14
39
+ Classifier: Typing :: Typed
40
+ Requires-Python: >=3.12
41
+ Requires-Dist: nativeres
42
+ Requires-Dist: vsview>=0.1.0b5
43
+ Description-Content-Type: text/markdown
44
+
45
+ # vsview-nativeres
46
+
47
+ `vsview-nativeres` is the [VSView](https://github.com/Jaded-Encoding-Thaumaturgy/vs-view) frontend for [`nativeres`](https://github.com/Jaded-Encoding-Thaumaturgy/nativeres).
48
+
49
+ It adds an interactive `Native Resolution` tool to VSView so you can run descale analysis directly on the current output and frame instead of switching back to the CLI.
50
+
51
+ ## Features
52
+
53
+ - `Get Native` tab for plotting descale error across a width or height range
54
+ - `Get Scaler` tab for ranking kernels against a chosen target dimension
55
+ - `Get Frequencies` tab for DCT-based frequency inspection on the current frame
56
+ - Global plugin settings for kernel presets and chart styling
57
+ - Import support for previously exported `getnative` JSON and CSV result files
58
+ - Automatic CSV dumps for computed `Get Native` plots in VSView local storage
59
+
60
+ ## Installation
61
+
62
+ Install the plugin package directly:
63
+
64
+ ```bash
65
+ pip install vsview-nativeres
66
+ ```
67
+
68
+ Or install it through the main package extras:
69
+
70
+ ```bash
71
+ pip install nativeres[plugin]
72
+ ```
73
+
74
+ The plugin registers both as a VSView tool panel and tool dock under `Native Resolution`.
75
+
76
+ ## Usage
77
+
78
+ Open VSView, load a source or VapourSynth script, and open the `Native Resolution` tool.
79
+
80
+ The plugin always works on the currently selected VSView output and displayed frame.
81
+
82
+ ### Get Native
83
+
84
+ This tab is the interactive version of `nativeres getnative`.
85
+
86
+ You can:
87
+
88
+ - Analyze either `Width` or `Height`
89
+ - Choose a min/max range and fractional step size
90
+ - Select the descale kernel to test
91
+ - Choose the error metric (`MAE`, `MSE`, or `RMSE`)
92
+
93
+ Computed results are shown as an interactive plot. Each plot is also added to a history list:
94
+
95
+ - Single-click switches back to that plot
96
+ - Double-click also seeks VSView back to the frame used for that computation
97
+ - Right-click opens the plot context menu, including `Reset Zoom` and copy/export actions
98
+
99
+ The tab can also import saved results from `JSON` and `CSV` files.
100
+
101
+ When a calculation finishes, the plugin writes the plot data as CSV into VSView local storage if that storage path is available.
102
+
103
+ ### Get Scaler
104
+
105
+ This tab is the interactive version of `nativeres getscaler`.
106
+
107
+ You can:
108
+
109
+ - Test either a target `Width` or `Height`
110
+ - Compare all kernels from the global plugin settings
111
+ - Choose the error metric (`MAE`, `MSE`, or `RMSE`)
112
+ - Optionally apply an edge-detection mask to reduce noise influence
113
+
114
+ Results are shown as a sorted comparison table with:
115
+
116
+ - Kernel name
117
+ - Relative error percentage against the best match
118
+ - Raw error value
119
+
120
+ ### Get Frequencies
121
+
122
+ This tab is the interactive version of `nativeres getfreq`.
123
+
124
+ You can:
125
+
126
+ - Compute horizontal and vertical DCT distributions
127
+ - Adjust the `Cull Rate` to focus analysis more toward the image center
128
+ - Adjust the spike detection `Radius`
129
+ - Right-click the plot for `Reset Zoom` and copy/export actions
130
+
131
+ ## Settings
132
+
133
+ ### Global settings
134
+
135
+ Global settings affect all sessions:
136
+
137
+ - Chart theme
138
+ - Frequency plot colors (Only for the default theme)
139
+ - Kernel list used by `Get Native` and `Get Scaler`
140
+
141
+ ### Local settings
142
+
143
+ Local settings persist recent UI choices for `Get Native` and `Get Scaler`.
144
+
145
+ ## Notes
146
+
147
+ - `Get Native` warns before launching very large scans with more than 2000 tested dimensions.
148
+ - Plot context menus support `Reset Zoom` plus copy/export actions for `PNG`, `SVG`, `JSON`, and `CSV`.
149
+ - As with the CLI tools, results should be validated across multiple frames before deciding on a descale setup.
@@ -0,0 +1,105 @@
1
+ # vsview-nativeres
2
+
3
+ `vsview-nativeres` is the [VSView](https://github.com/Jaded-Encoding-Thaumaturgy/vs-view) frontend for [`nativeres`](https://github.com/Jaded-Encoding-Thaumaturgy/nativeres).
4
+
5
+ It adds an interactive `Native Resolution` tool to VSView so you can run descale analysis directly on the current output and frame instead of switching back to the CLI.
6
+
7
+ ## Features
8
+
9
+ - `Get Native` tab for plotting descale error across a width or height range
10
+ - `Get Scaler` tab for ranking kernels against a chosen target dimension
11
+ - `Get Frequencies` tab for DCT-based frequency inspection on the current frame
12
+ - Global plugin settings for kernel presets and chart styling
13
+ - Import support for previously exported `getnative` JSON and CSV result files
14
+ - Automatic CSV dumps for computed `Get Native` plots in VSView local storage
15
+
16
+ ## Installation
17
+
18
+ Install the plugin package directly:
19
+
20
+ ```bash
21
+ pip install vsview-nativeres
22
+ ```
23
+
24
+ Or install it through the main package extras:
25
+
26
+ ```bash
27
+ pip install nativeres[plugin]
28
+ ```
29
+
30
+ The plugin registers both as a VSView tool panel and tool dock under `Native Resolution`.
31
+
32
+ ## Usage
33
+
34
+ Open VSView, load a source or VapourSynth script, and open the `Native Resolution` tool.
35
+
36
+ The plugin always works on the currently selected VSView output and displayed frame.
37
+
38
+ ### Get Native
39
+
40
+ This tab is the interactive version of `nativeres getnative`.
41
+
42
+ You can:
43
+
44
+ - Analyze either `Width` or `Height`
45
+ - Choose a min/max range and fractional step size
46
+ - Select the descale kernel to test
47
+ - Choose the error metric (`MAE`, `MSE`, or `RMSE`)
48
+
49
+ Computed results are shown as an interactive plot. Each plot is also added to a history list:
50
+
51
+ - Single-click switches back to that plot
52
+ - Double-click also seeks VSView back to the frame used for that computation
53
+ - Right-click opens the plot context menu, including `Reset Zoom` and copy/export actions
54
+
55
+ The tab can also import saved results from `JSON` and `CSV` files.
56
+
57
+ When a calculation finishes, the plugin writes the plot data as CSV into VSView local storage if that storage path is available.
58
+
59
+ ### Get Scaler
60
+
61
+ This tab is the interactive version of `nativeres getscaler`.
62
+
63
+ You can:
64
+
65
+ - Test either a target `Width` or `Height`
66
+ - Compare all kernels from the global plugin settings
67
+ - Choose the error metric (`MAE`, `MSE`, or `RMSE`)
68
+ - Optionally apply an edge-detection mask to reduce noise influence
69
+
70
+ Results are shown as a sorted comparison table with:
71
+
72
+ - Kernel name
73
+ - Relative error percentage against the best match
74
+ - Raw error value
75
+
76
+ ### Get Frequencies
77
+
78
+ This tab is the interactive version of `nativeres getfreq`.
79
+
80
+ You can:
81
+
82
+ - Compute horizontal and vertical DCT distributions
83
+ - Adjust the `Cull Rate` to focus analysis more toward the image center
84
+ - Adjust the spike detection `Radius`
85
+ - Right-click the plot for `Reset Zoom` and copy/export actions
86
+
87
+ ## Settings
88
+
89
+ ### Global settings
90
+
91
+ Global settings affect all sessions:
92
+
93
+ - Chart theme
94
+ - Frequency plot colors (Only for the default theme)
95
+ - Kernel list used by `Get Native` and `Get Scaler`
96
+
97
+ ### Local settings
98
+
99
+ Local settings persist recent UI choices for `Get Native` and `Get Scaler`.
100
+
101
+ ## Notes
102
+
103
+ - `Get Native` warns before launching very large scans with more than 2000 tested dimensions.
104
+ - Plot context menus support `Reset Zoom` plus copy/export actions for `PNG`, `SVG`, `JSON`, and `CSV`.
105
+ - As with the CLI tools, results should be validated across multiple frames before deciding on a descale setup.
@@ -0,0 +1,48 @@
1
+ [build-system]
2
+ requires = ["hatchling", "versioningit"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "vsview-nativeres"
7
+ description = "A vsview plugin for analyzing and determining the native resolution of video content"
8
+ readme = "README.md"
9
+ license = { file = "LICENSE" }
10
+ requires-python = ">=3.12"
11
+ authors = [{ name = "Vardë", email = "ichunjo.le.terrible@gmail.com" }]
12
+ maintainers = [{ name = "Vardë", email = "ichunjo.le.terrible@gmail.com" }]
13
+ classifiers = [
14
+ "License :: OSI Approved :: MIT License",
15
+ "Programming Language :: Python :: 3",
16
+ "Programming Language :: Python :: 3.12",
17
+ "Programming Language :: Python :: 3.13",
18
+ "Programming Language :: Python :: 3.14",
19
+ "Operating System :: OS Independent",
20
+ "Typing :: Typed",
21
+ ]
22
+ dependencies = ["vsview>=0.1.0b5", "nativeres"]
23
+ dynamic = ["version"]
24
+
25
+ [project.entry-points.vsview]
26
+ vsview_nativeres = "vsview_nativeres"
27
+
28
+ [project.urls]
29
+ "Documentation" = "https://github.com/Jaded-Encoding-Thaumaturgy/nativeres/blob/master/src/plugin/README.md"
30
+ "Source Code" = "https://github.com/Jaded-Encoding-Thaumaturgy/nativeres/tree/master/src/plugin"
31
+ "Bug Tracker" = "https://github.com/Jaded-Encoding-Thaumaturgy/nativeres/issues"
32
+ "Contact" = "https://discord.gg/XTpc6Fa9eB"
33
+
34
+ [tool.hatch.version]
35
+ source = "versioningit"
36
+
37
+ [tool.versioningit.vcs]
38
+ match = ["vsview-nativeres/v*"]
39
+ default-tag = "vsview-nativeres/v0.0.0"
40
+
41
+ [tool.versioningit.tag2version]
42
+ rmprefix = "vsview-nativeres/v"
43
+
44
+ [tool.hatch.build.targets.wheel]
45
+ packages = ["src/vsview_nativeres"]
46
+
47
+ [tool.uv.sources]
48
+ nativeres = { workspace = true }
@@ -0,0 +1,15 @@
1
+ from typing import Any
2
+
3
+ from vsview.api import WidgetPluginBase, hookimpl
4
+
5
+ from .main import NativeResPlugin
6
+
7
+
8
+ @hookimpl
9
+ def vsview_register_toolpanel() -> type[WidgetPluginBase[Any, Any]]:
10
+ return NativeResPlugin
11
+
12
+
13
+ @hookimpl
14
+ def vsview_register_tooldock() -> type[WidgetPluginBase[Any, Any]]:
15
+ return NativeResPlugin
@@ -0,0 +1,80 @@
1
+ from PySide6.QtCore import QSize
2
+ from PySide6.QtGui import Qt
3
+ from PySide6.QtWidgets import QLabel, QLayout, QListWidget, QProgressBar, QScrollArea, QVBoxLayout, QWidget
4
+ from vsview.api import run_in_loop
5
+
6
+
7
+ class TabContainer(QScrollArea):
8
+ def __init__(self, parent: QWidget | None = None) -> None:
9
+ super().__init__(parent)
10
+
11
+ self.setWidgetResizable(True)
12
+ self.setHorizontalScrollBarPolicy(Qt.ScrollBarPolicy.ScrollBarAlwaysOff)
13
+ self.setFrameShape(QScrollArea.Shape.NoFrame)
14
+
15
+ self.container = QWidget(self)
16
+ self.container_layout = QVBoxLayout(self.container)
17
+ self.container_layout.setContentsMargins(8, 8, 8, 8)
18
+ self.container_layout.setSpacing(8)
19
+
20
+ self.setWidget(self.container)
21
+
22
+ def add_section(self, section: QWidget | QLayout, stretch: int = 0) -> None:
23
+ if isinstance(section, QLayout):
24
+ self.container_layout.addLayout(section, stretch)
25
+ else:
26
+ self.container_layout.addWidget(section, stretch)
27
+
28
+ def finalize(self) -> None:
29
+ self.container_layout.addStretch(1)
30
+
31
+ @staticmethod
32
+ def make_vgroup(title: str, *widgets: QWidget, parent: QWidget, stretch: bool = True) -> QVBoxLayout:
33
+ vbox = QVBoxLayout()
34
+ vbox.setContentsMargins(0, 0, 0, 0)
35
+ vbox.setSpacing(8)
36
+
37
+ if title:
38
+ vbox.addWidget(QLabel(title, parent))
39
+ for w in widgets:
40
+ vbox.addWidget(w)
41
+ if stretch:
42
+ vbox.addStretch()
43
+
44
+ return vbox
45
+
46
+
47
+ class GetNativeImportList(QListWidget):
48
+ def sizeHint(self) -> QSize:
49
+ return QSize(256, 0)
50
+
51
+
52
+ class ProgressBar(QProgressBar):
53
+ def __init__(self, parent: QWidget | None = None) -> None:
54
+ super().__init__(parent)
55
+ self.setMinimumHeight(24)
56
+ self.setRange(0, 100)
57
+ self.setTextVisible(True)
58
+
59
+ @run_in_loop(return_future=False)
60
+ def update_progress(
61
+ self,
62
+ *,
63
+ value: int | None = None,
64
+ range: tuple[int, int] | None = None,
65
+ fmt: str | None = None,
66
+ increment: int | None = None,
67
+ ) -> None:
68
+ if range:
69
+ self.setRange(*range)
70
+ if fmt:
71
+ self.setFormat(fmt)
72
+ if value is not None:
73
+ self.setValue(value)
74
+ if increment is not None:
75
+ self.setValue(self.value() + increment)
76
+
77
+ @run_in_loop(return_future=False)
78
+ def reset_progress(self) -> None:
79
+ self.reset()
80
+ self.setFormat("%p%")