qpuiq 0.20__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 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.node = node
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.node._dblclicked(e)
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.node._mousedown(e)
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.node._mouseup(e)
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.node._mousemove(e)
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.node._wheel(e)
59
+ self.puinode._wheel(e)
60
60
 
61
61
  def paintEvent(self, event):
62
- node = self.node.get_node()
63
- node.qpainter = QPainter()
64
- node.qpainter.begin(self)
65
- node.qpainter.setRenderHints(QtGui.QPainter.Antialiasing, True)
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 node.style_bgcolor is None:
67
+ if not puinode.style_bgcolor is None:
68
68
  bgBrush = QtGui.QBrush()
69
- bgBrush.setColor(QtGui.QColor(node.style_bgcolor))
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
- node.qpainter.fillRect(rect, bgBrush)
72
+ puinode.qpainter.fillRect(rect, bgBrush)
73
73
 
74
- node.width = self.geometry().width()
75
- node.height = self.geometry().height()
76
- immediate = node.painter(node, *node.args)
77
- node.qpainter.end()
78
- node.qpainter = None
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
 
@@ -114,7 +114,6 @@ class Canvas(QtBaseWidget):
114
114
  self.ui.height = self.layout_height or 0
115
115
  else:
116
116
  self.ui = PUIQtCanvas(self, self.layout_width or 0, self.layout_height or 0)
117
- self.ui.node = self
118
117
  self.ui.setMouseTracking(bool(self._onMouseMove))
119
118
  self.ui.update()
120
119
  super().update(prev)
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.node._keypress(e)
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.node = self
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.node = self
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
@@ -1,4 +1,4 @@
1
- __version__ = "0.20"
1
+ __version__ = "0.21"
2
2
 
3
3
  from .node import *
4
4
  from .view import *
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: qpuiq
3
- Version: 0.20
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
@@ -1,4 +1,4 @@
1
- PUI/__init__.py,sha256=9zX_A_F6favOFVh6zt69u9uIKJCAtmECaTQDS_1OcBE,966
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
@@ -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=7ryrj2kqPF33b_VfLjUIz761Bfhx3qbFmIja2rQPXaw,11262
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=T8eXTW5ABPWbyOV5ioKXbBNE1CdoPmQ9IRmb2x12tqI,5857
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=8_Y1DV_KobKeh5TS4VP9MV1hluz7pJr8jNakTVyrQlM,2845
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.20.dist-info/LICENSE.txt,sha256=1Xwik2AmLNGoIYhAPzvNC28M08Q3EvkOe4TtlQuSd_E,1072
101
- qpuiq-0.20.dist-info/METADATA,sha256=5js0DzMtyz02TLGYzhhWDXul0XSH52_0dlDdP7kk2LY,5671
102
- qpuiq-0.20.dist-info/WHEEL,sha256=Z4pYXqR_rTB7OWNDYFOm1qRk0RX6GFP2o8LgvP453Hk,91
103
- qpuiq-0.20.dist-info/top_level.txt,sha256=zMudhifPite0CEVGYvdi-5W3P_dpum71xjU7_g-ZHS0,4
104
- qpuiq-0.20.dist-info/RECORD,,
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