qpuiq 0.16__py3-none-any.whl → 0.17__py3-none-any.whl

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.

Potentially problematic release.


This version of qpuiq might be problematic. Click here for more details.

PUI/PySide6/canvas.py CHANGED
@@ -73,15 +73,24 @@ class PUIQtCanvas(QtWidgets.QWidget):
73
73
 
74
74
  node.width = self.geometry().width()
75
75
  node.height = self.geometry().height()
76
- node.painter(node, *node.args)
77
-
76
+ immediate = node.painter(node, *node.args)
78
77
  node.qpainter.end()
79
78
  node.qpainter = None
79
+ if immediate:
80
+ self.update()
80
81
 
81
82
  class ImageResource():
82
- def scale(self, width, height):
83
+ def crop(self, x, y, width, height):
84
+ ir = ImageResource()
85
+ ir.qimage = self.qimage.copy(x, y, width, height)
86
+ return ir
87
+
88
+ def scale(self, width, height, keepAspectRatio=True, quality=0):
83
89
  ir = ImageResource()
84
- ir.qimage = self.qimage.scaled(width, height)
90
+ method = {
91
+ 0: QtCore.Qt.TransformationMode.FastTransformation
92
+ }.get(quality, QtCore.Qt.TransformationMode.SmoothTransformation)
93
+ ir.qimage = self.qimage.scaled(width, height, QtCore.Qt.AspectRatioMode.KeepAspectRatio if keepAspectRatio else QtCore.Qt.IgnoreAspectRatio, method)
85
94
  return ir
86
95
 
87
96
  class Canvas(QtBaseWidget):
PUI/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
- __version__ = "0.16"
1
+ __version__ = "0.17"
2
2
 
3
3
  from .node import *
4
4
  from .view import *
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: qpuiq
3
- Version: 0.16
3
+ Version: 0.17
4
4
  Summary: "PUI" Python Declarative UI Framework
5
5
  Home-page: https://github.com/buganini/PUI
6
6
  Author: Buganini Chiu
@@ -1,4 +1,4 @@
1
- PUI/__init__.py,sha256=3BShn__8Wpr8flOXyM3C8xPyT7q-6XN_X1TTWZYNKyw,966
1
+ PUI/__init__.py,sha256=aR2JMZVOEJKYm0DSrzHM35XqpSEE9ReRHh_mJlma-nk,966
2
2
  PUI/common.py,sha256=fUJmHOu5lSCeiOhFDF6YqulJxFqWmsneqnDZ2kZFFmM,581
3
3
  PUI/decorator.py,sha256=BN3POYv69QCDomoHENN-UA-d4wY_vfARIb5RJ2qEnS8,483
4
4
  PUI/dom.py,sha256=RgdDyv6vSFgkCoj9G2cjzQQOiymG8DwmmSoAZfxYvJM,10141
@@ -12,7 +12,7 @@ PUI/PySide6/__init__.py,sha256=z895ldBVUaEqfGQW4CvYhWh2F6L0qGQA1MXUHVMf9Ms,1110
12
12
  PUI/PySide6/application.py,sha256=OsIE47efST4I13txD-7rS1cTWAGhynckl45Wdb1bafk,1471
13
13
  PUI/PySide6/base.py,sha256=zhRrm5vDkieIXTEKpBRkVjSxfm0yBW-yMrqoMDw0Gvg,8564
14
14
  PUI/PySide6/button.py,sha256=mHfcH98dABYgksuT58fK0amSwtCM9aaYwr7Y2EArEJA,561
15
- PUI/PySide6/canvas.py,sha256=NpfyW0YpRQ9wWpWwKuMKRDPWBDXVdCIAg7QJcXPoNaM,10657
15
+ PUI/PySide6/canvas.py,sha256=8sBsxs7qu63xbalCeem6hWLk3s7QPHOoX738N5Gqxaw,11155
16
16
  PUI/PySide6/checkbox.py,sha256=Rsns0BleE4g9yTDdlsD8IADU3qcQkVO2VsFVvYlNL88,900
17
17
  PUI/PySide6/combobox.py,sha256=4FvMt8D9MSyGk_oNHZ0jDuop7A-dkrxEesUXMdKghuw,2503
18
18
  PUI/PySide6/dialog.py,sha256=4rAyLMqd47ALDxrBGLFHS5FD75SP1I8tkMSKBdaPkv0,2364
@@ -96,8 +96,8 @@ PUI/wx/scroll.py,sha256=pvRmt04XEgObpIgwl9i52Kf1wI9ubUfZM77fPHGW9zU,1494
96
96
  PUI/wx/text.py,sha256=YeIyDyHH0xBcD_iXbYSTtvL25YDtug1QJNVPvCSAqEk,544
97
97
  PUI/wx/textfield.py,sha256=v3cSnmsyBix_G8xFXgZZrNLydlLTA6gQQPpkTdJ29hk,2086
98
98
  PUI/wx/window.py,sha256=HBiWRpuhjSS89pjbdlbstjQmfR0mSECTsOPLu7ymLjo,2017
99
- qpuiq-0.16.dist-info/licenses/LICENSE.txt,sha256=1Xwik2AmLNGoIYhAPzvNC28M08Q3EvkOe4TtlQuSd_E,1072
100
- qpuiq-0.16.dist-info/METADATA,sha256=FD9q5IlhlI9XqZX3ov-S568x9CRaPNHw2zv5rAyKtYQ,5994
101
- qpuiq-0.16.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
102
- qpuiq-0.16.dist-info/top_level.txt,sha256=zMudhifPite0CEVGYvdi-5W3P_dpum71xjU7_g-ZHS0,4
103
- qpuiq-0.16.dist-info/RECORD,,
99
+ qpuiq-0.17.dist-info/licenses/LICENSE.txt,sha256=1Xwik2AmLNGoIYhAPzvNC28M08Q3EvkOe4TtlQuSd_E,1072
100
+ qpuiq-0.17.dist-info/METADATA,sha256=VXDMh8zCK84F5_hoCM002RaUHfLdJacO1qa2St3BUnA,5994
101
+ qpuiq-0.17.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
102
+ qpuiq-0.17.dist-info/top_level.txt,sha256=zMudhifPite0CEVGYvdi-5W3P_dpum71xjU7_g-ZHS0,4
103
+ qpuiq-0.17.dist-info/RECORD,,
File without changes