qpuiq 0.19__py3-none-any.whl → 0.21__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.
- PUI/PySide6/canvas.py +18 -18
- PUI/PySide6/scroll.py +3 -1
- PUI/PySide6/window.py +3 -3
- PUI/__init__.py +1 -1
- PUI/state.py +2 -2
- {qpuiq-0.19.dist-info → qpuiq-0.21.dist-info}/METADATA +2 -9
- {qpuiq-0.19.dist-info → qpuiq-0.21.dist-info}/RECORD +10 -10
- {qpuiq-0.19.dist-info → qpuiq-0.21.dist-info}/WHEEL +1 -1
- {qpuiq-0.19.dist-info/licenses → qpuiq-0.21.dist-info}/LICENSE.txt +0 -0
- {qpuiq-0.19.dist-info → qpuiq-0.21.dist-info}/top_level.txt +0 -0
PUI/PySide6/canvas.py
CHANGED
|
@@ -6,7 +6,7 @@ from PySide6.QtGui import QPainter, QColor, QPainterPath, QImage
|
|
|
6
6
|
|
|
7
7
|
class PUIQtCanvas(QtWidgets.QWidget):
|
|
8
8
|
def __init__(self, node, width=None, height=None):
|
|
9
|
-
self.
|
|
9
|
+
self.puinode = node
|
|
10
10
|
self.width = width
|
|
11
11
|
self.height = height
|
|
12
12
|
super().__init__()
|
|
@@ -18,25 +18,25 @@ class PUIQtCanvas(QtWidgets.QWidget):
|
|
|
18
18
|
e = PUIEvent()
|
|
19
19
|
e.button = event.button().value
|
|
20
20
|
e.x, e.y = event.position().toPoint().toTuple()
|
|
21
|
-
self.
|
|
21
|
+
self.puinode._dblclicked(e)
|
|
22
22
|
|
|
23
23
|
def mousePressEvent(self, event):
|
|
24
24
|
e = PUIEvent()
|
|
25
25
|
e.button = event.button().value
|
|
26
26
|
e.x, e.y = event.position().toPoint().toTuple()
|
|
27
|
-
self.
|
|
27
|
+
self.puinode._mousedown(e)
|
|
28
28
|
|
|
29
29
|
def mouseReleaseEvent(self, event):
|
|
30
30
|
e = PUIEvent()
|
|
31
31
|
e.button = event.button().value
|
|
32
32
|
e.x, e.y = event.position().toPoint().toTuple()
|
|
33
|
-
self.
|
|
33
|
+
self.puinode._mouseup(e)
|
|
34
34
|
|
|
35
35
|
def mouseMoveEvent(self, event):
|
|
36
36
|
e = PUIEvent()
|
|
37
37
|
e.button = event.button().value
|
|
38
38
|
e.x, e.y = event.position().toPoint().toTuple()
|
|
39
|
-
self.
|
|
39
|
+
self.puinode._mousemove(e)
|
|
40
40
|
|
|
41
41
|
def wheelEvent(self, event):
|
|
42
42
|
e = PUIEvent()
|
|
@@ -56,26 +56,26 @@ class PUIQtCanvas(QtWidgets.QWidget):
|
|
|
56
56
|
if emodifiers & QtCore.Qt.MetaModifier:
|
|
57
57
|
modifier |= KeyModifier.META
|
|
58
58
|
e.modifiers = modifier
|
|
59
|
-
self.
|
|
59
|
+
self.puinode._wheel(e)
|
|
60
60
|
|
|
61
61
|
def paintEvent(self, event):
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
62
|
+
puinode = self.puinode.get_node()
|
|
63
|
+
puinode.qpainter = QPainter()
|
|
64
|
+
puinode.qpainter.begin(self)
|
|
65
|
+
puinode.qpainter.setRenderHints(QtGui.QPainter.Antialiasing, True)
|
|
66
66
|
|
|
67
|
-
if not
|
|
67
|
+
if not puinode.style_bgcolor is None:
|
|
68
68
|
bgBrush = QtGui.QBrush()
|
|
69
|
-
bgBrush.setColor(QtGui.QColor(
|
|
69
|
+
bgBrush.setColor(QtGui.QColor(puinode.style_bgcolor))
|
|
70
70
|
bgBrush.setStyle(QtCore.Qt.SolidPattern)
|
|
71
71
|
rect = QtCore.QRect(0, 0, self.width or self.geometry().width(), self.height or self.geometry().height())
|
|
72
|
-
|
|
72
|
+
puinode.qpainter.fillRect(rect, bgBrush)
|
|
73
73
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
immediate =
|
|
77
|
-
|
|
78
|
-
|
|
74
|
+
puinode.width = self.geometry().width()
|
|
75
|
+
puinode.height = self.geometry().height()
|
|
76
|
+
immediate = puinode.painter(puinode, *puinode.args)
|
|
77
|
+
puinode.qpainter.end()
|
|
78
|
+
puinode.qpainter = None
|
|
79
79
|
if immediate:
|
|
80
80
|
self.update()
|
|
81
81
|
|
PUI/PySide6/scroll.py
CHANGED
|
@@ -75,7 +75,6 @@ class Scroll(QtBaseWidget):
|
|
|
75
75
|
if node.destroyed:
|
|
76
76
|
return
|
|
77
77
|
node.children[0].outer.origResizeEvent(event)
|
|
78
|
-
node.children[0].outer.resizeEvent = self.onUiResized
|
|
79
78
|
if node.horizontal is False:
|
|
80
79
|
if isinstance(node.children[0], QtBaseLayout):
|
|
81
80
|
node.outer.setMinimumWidth(node.children[0].outer.sizeHint().width())
|
|
@@ -88,6 +87,9 @@ class Scroll(QtBaseWidget):
|
|
|
88
87
|
elif isinstance(node.children[0], QtBaseWidget):
|
|
89
88
|
node.outer.setMinimumHeight(node.children[0].outer.sizeHint().height())
|
|
90
89
|
|
|
90
|
+
def postSync(self):
|
|
91
|
+
self.children[0].outer.resizeEvent = self.onUiResized
|
|
92
|
+
|
|
91
93
|
def scrollX(self, pos=0):
|
|
92
94
|
if math.copysign(1, pos) >= 0:
|
|
93
95
|
self.align_x = 0
|
PUI/PySide6/window.py
CHANGED
|
@@ -9,7 +9,7 @@ class QMainWindow(QtWidgets.QMainWindow):
|
|
|
9
9
|
def keyPressEvent(self, event):
|
|
10
10
|
e = PUIEvent()
|
|
11
11
|
e.text = event.text()
|
|
12
|
-
self.
|
|
12
|
+
self.puinode._keypress(e)
|
|
13
13
|
|
|
14
14
|
def mousePressEvent(self, event):
|
|
15
15
|
focused_widget = QtWidgets.QApplication.focusWidget()
|
|
@@ -34,13 +34,13 @@ class Window(QtBaseWidget):
|
|
|
34
34
|
def update(self, prev=None):
|
|
35
35
|
if prev and prev.ui:
|
|
36
36
|
self.ui = prev.ui
|
|
37
|
-
self.ui.
|
|
37
|
+
self.ui.puinode = self
|
|
38
38
|
self.curr_size = prev.curr_size
|
|
39
39
|
self.curr_maximize = prev.curr_maximize
|
|
40
40
|
self.curr_fullscreen = prev.curr_fullscreen
|
|
41
41
|
else:
|
|
42
42
|
self.ui = QMainWindow()
|
|
43
|
-
self.ui.
|
|
43
|
+
self.ui.puinode = self
|
|
44
44
|
self.ui.show()
|
|
45
45
|
self.curr_size = Prop()
|
|
46
46
|
self.curr_maximize = Prop()
|
PUI/__init__.py
CHANGED
PUI/state.py
CHANGED
|
@@ -230,9 +230,9 @@ class StateObject(BaseState):
|
|
|
230
230
|
if self.__binders.get(key):
|
|
231
231
|
self.__binders[key][1](value)
|
|
232
232
|
|
|
233
|
-
if
|
|
233
|
+
if isinstance(value, list):
|
|
234
234
|
value = StateList(value)
|
|
235
|
-
elif
|
|
235
|
+
elif isinstance(value, dict):
|
|
236
236
|
value = StateDict(value)
|
|
237
237
|
if not hasattr(self.__values, key) or getattr(self.__values, key) != value:
|
|
238
238
|
setattr(self.__values, key, value)
|
|
@@ -1,19 +1,12 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
2
|
Name: qpuiq
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.21
|
|
4
4
|
Summary: "PUI" Python Declarative UI Framework
|
|
5
5
|
Home-page: https://github.com/buganini/PUI
|
|
6
6
|
Author: Buganini Chiu
|
|
7
7
|
Author-email: buganini@b612.tw
|
|
8
8
|
Description-Content-Type: text/markdown
|
|
9
9
|
License-File: LICENSE.txt
|
|
10
|
-
Dynamic: author
|
|
11
|
-
Dynamic: author-email
|
|
12
|
-
Dynamic: description
|
|
13
|
-
Dynamic: description-content-type
|
|
14
|
-
Dynamic: home-page
|
|
15
|
-
Dynamic: license-file
|
|
16
|
-
Dynamic: summary
|
|
17
10
|
|
|
18
11
|
# What is PUI
|
|
19
12
|
PUI is a reactive/declarative UI framework with two-way data binding.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
PUI/__init__.py,sha256=
|
|
1
|
+
PUI/__init__.py,sha256=lgczhErzRuT5bNMWtgVHBC9M1ZQpgz90MweYzfeJXx0,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=a1D4_1RJiPvw11eJZrkik9NQzL3brRuGHvs6Y6xoeAg,11238
|
|
5
5
|
PUI/interfaces.py,sha256=rGUciM3S6ICEVgVoahkva8yXUGpweqy1kAzhUQut40E,2182
|
|
6
6
|
PUI/node.py,sha256=DqsDQpQwMYql0gU21BiF-gn50WXxzxgAW8UuMWnAyrY,13348
|
|
7
|
-
PUI/state.py,sha256=
|
|
7
|
+
PUI/state.py,sha256=xez7-AmgrH1PUoXjhjWNX4JjyXt_4wLtSynyllG9Dmo,20209
|
|
8
8
|
PUI/timeline.py,sha256=-mO1TLqxp2_3dk-EvdBE9wBkQf5RIPrPazTPXDzWSN0,940
|
|
9
9
|
PUI/utils.py,sha256=canb7_Uz0sQ1UZDzyDuIsfAVXzEfZCkc9F81sMY4rTE,505
|
|
10
10
|
PUI/view.py,sha256=Oe6sXLHD554GnlLlO5QpY7kegngkzrmMEYRHrdzGZUQ,4623
|
|
@@ -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=GmfT10tewYkGW95tVczXBkQTTUEo3k2svFkk4vsODpw,8649
|
|
14
14
|
PUI/PySide6/button.py,sha256=mHfcH98dABYgksuT58fK0amSwtCM9aaYwr7Y2EArEJA,561
|
|
15
|
-
PUI/PySide6/canvas.py,sha256=
|
|
15
|
+
PUI/PySide6/canvas.py,sha256=Cu1CKCTTphsIqYP667uwCSM_qngTaRWFt79u-j2LVNQ,11297
|
|
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
|
|
@@ -26,7 +26,7 @@ PUI/PySide6/menu.py,sha256=Qbw_0WX56vzC2vkvn-4DXzYX0vZ-4Rq6tW1Kj_M-Qb8,2806
|
|
|
26
26
|
PUI/PySide6/modal.py,sha256=PfF21YRQu4NYMANlfKqllMLcei78Cn9Cv9MsU_XNrK4,4266
|
|
27
27
|
PUI/PySide6/progressbar.py,sha256=u55YFofqobF_j5k77CGT7dOAMgtNeWmLwXI5Ht3Go8U,479
|
|
28
28
|
PUI/PySide6/radiobutton.py,sha256=Qe5jjVkGSx8Pf3deAm-9c0cbYsrWl15W9UxrwrWuOo4,797
|
|
29
|
-
PUI/PySide6/scroll.py,sha256=
|
|
29
|
+
PUI/PySide6/scroll.py,sha256=za2_PkoukhBRAUHKFGgsR4hH4dqgQnKr4MiEMBBNW2k,5882
|
|
30
30
|
PUI/PySide6/splitter.py,sha256=ObjcC8UgkAL7o-xXhi4XIkDEKhC4s5Ukk7tKMNa023Q,797
|
|
31
31
|
PUI/PySide6/tab.py,sha256=tMkhEfD4Wb_7Hs4-u4nOzm87GSHqmehcnwcFm24qRIg,953
|
|
32
32
|
PUI/PySide6/table.py,sha256=TTCMf_YNKmkFiqs_qLqw3qbvFsxoBNnz9VMObx_2l3s,4800
|
|
@@ -34,7 +34,7 @@ PUI/PySide6/text.py,sha256=4kRRZiuH-bLLJMNZ6hK9zAWOorsG-l4uujHbG6I5S20,1069
|
|
|
34
34
|
PUI/PySide6/textfield.py,sha256=mjaQErUTqJ1VUeWXLfzoInTbCuKICX5o-tXAAQQS04s,2112
|
|
35
35
|
PUI/PySide6/toolbar.py,sha256=NPkn99D5xK4RLBA0vxLD7EqYu5eh9ucCL2y1vSJWQl4,1800
|
|
36
36
|
PUI/PySide6/tree.py,sha256=skMsCykh8kWXFTg4Yv--PevJ58fqEeZV566ICjBVO4E,9324
|
|
37
|
-
PUI/PySide6/window.py,sha256=
|
|
37
|
+
PUI/PySide6/window.py,sha256=zNPbAu9R-PTmdoI7tTH5_TNTcdBoOzvOFHofBhKxMeQ,2854
|
|
38
38
|
PUI/flet/__init__.py,sha256=9gIKHEEfBKBtSwstGKqmwc_bL4WNsVdxp5net0WAqcQ,461
|
|
39
39
|
PUI/flet/application.py,sha256=3ZGZrAngSEkVK-WseOV-n_6ljhd86ZKBgO6Jp2PmsJA,937
|
|
40
40
|
PUI/flet/base.py,sha256=PWfjJpWUsBPKM44T2j2euowrLmH0ZLoo-o64S_yy2xs,895
|
|
@@ -97,8 +97,8 @@ PUI/wx/scroll.py,sha256=pvRmt04XEgObpIgwl9i52Kf1wI9ubUfZM77fPHGW9zU,1494
|
|
|
97
97
|
PUI/wx/text.py,sha256=YeIyDyHH0xBcD_iXbYSTtvL25YDtug1QJNVPvCSAqEk,544
|
|
98
98
|
PUI/wx/textfield.py,sha256=v3cSnmsyBix_G8xFXgZZrNLydlLTA6gQQPpkTdJ29hk,2086
|
|
99
99
|
PUI/wx/window.py,sha256=HBiWRpuhjSS89pjbdlbstjQmfR0mSECTsOPLu7ymLjo,2017
|
|
100
|
-
qpuiq-0.
|
|
101
|
-
qpuiq-0.
|
|
102
|
-
qpuiq-0.
|
|
103
|
-
qpuiq-0.
|
|
104
|
-
qpuiq-0.
|
|
100
|
+
qpuiq-0.21.dist-info/LICENSE.txt,sha256=1Xwik2AmLNGoIYhAPzvNC28M08Q3EvkOe4TtlQuSd_E,1072
|
|
101
|
+
qpuiq-0.21.dist-info/METADATA,sha256=ACL0-cmYzvWmI6WtohKSpPYHezlVzSbTrrxHDARK4oM,5671
|
|
102
|
+
qpuiq-0.21.dist-info/WHEEL,sha256=Z4pYXqR_rTB7OWNDYFOm1qRk0RX6GFP2o8LgvP453Hk,91
|
|
103
|
+
qpuiq-0.21.dist-info/top_level.txt,sha256=zMudhifPite0CEVGYvdi-5W3P_dpum71xjU7_g-ZHS0,4
|
|
104
|
+
qpuiq-0.21.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|