bec-widgets 0.77.0__py3-none-any.whl → 0.78.0__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.
CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## v0.78.0 (2024-07-02)
4
+
5
+ ### Feature
6
+
7
+ * feat(color_button): patched ColorButton from pyqtgraph to be able to be opened in another QDialog ([`c36bb80`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/c36bb80d6a4939802a4a1c8e5452c7b94bac185e))
8
+
3
9
  ## v0.77.0 (2024-07-02)
4
10
 
5
11
  ### Feature
@@ -143,13 +149,3 @@
143
149
  ### Fix
144
150
 
145
151
  * fix: renamed spiral progress bar to ring progress bar; closes #235 ([`e5c0087`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/e5c0087c9aed831edbe1c172746325a772a3bafa))
146
-
147
- ### Test
148
-
149
- * test: bugfix to prohibit leackage of mock ([`4348ed1`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/4348ed1bb2182da6bdecaf372d6db85279e60af8))
150
-
151
- ## v0.72.0 (2024-06-24)
152
-
153
- ### Feature
154
-
155
- * feat(connector): added threadpool wrapper ([`4ca1efe`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/4ca1efeeb8955604069f7b98374c7f82e1a8da67))
PKG-INFO CHANGED
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: bec_widgets
3
- Version: 0.77.0
3
+ Version: 0.78.0
4
4
  Summary: BEC Widgets
5
5
  Project-URL: Bug Tracker, https://gitlab.psi.ch/bec/bec_widgets/issues
6
6
  Project-URL: Homepage, https://gitlab.psi.ch/bec/bec_widgets
File without changes
@@ -0,0 +1,17 @@
1
+ import pyqtgraph as pg
2
+
3
+
4
+ class ColorButton(pg.ColorButton):
5
+ """
6
+ A ColorButton that opens a dialog to select a color. Inherits from pyqtgraph.ColorButton.
7
+ Patches event loop of the ColorDialog, if opened in another QDialog.
8
+ """
9
+
10
+ def __init__(self, *args, **kwargs):
11
+ super().__init__(*args, **kwargs)
12
+
13
+ def selectColor(self):
14
+ self.origColor = self.color()
15
+ self.colorDialog.setCurrentColor(self.color())
16
+ self.colorDialog.open()
17
+ self.colorDialog.exec()
@@ -0,0 +1 @@
1
+ {'files': ['color_button.py']}
@@ -0,0 +1,55 @@
1
+ import os
2
+
3
+ from qtpy.QtDesigner import QDesignerCustomWidgetInterface
4
+ from qtpy.QtGui import QIcon
5
+
6
+ from bec_widgets.widgets.buttons.color_button.color_button import ColorButton
7
+
8
+ DOM_XML = """
9
+ <ui language='c++'>
10
+ <widget class='ColorButton' name='color_button'>
11
+ </widget>
12
+ </ui>
13
+ """
14
+
15
+
16
+ class ColorButtonPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
17
+ def __init__(self):
18
+ super().__init__()
19
+ self._form_editor = None
20
+
21
+ def createWidget(self, parent):
22
+ t = ColorButton(parent)
23
+ return t
24
+
25
+ def domXml(self):
26
+ return DOM_XML
27
+
28
+ def group(self):
29
+ return "BEC Buttons"
30
+
31
+ def icon(self):
32
+ current_path = os.path.dirname(__file__)
33
+ icon_path = os.path.join(current_path, "assets", "color_button.png")
34
+ return QIcon(icon_path)
35
+
36
+ def includeFile(self):
37
+ return "color_button"
38
+
39
+ def initialize(self, form_editor):
40
+ self._form_editor = form_editor
41
+
42
+ def isContainer(self):
43
+ return False
44
+
45
+ def isInitialized(self):
46
+ return self._form_editor is not None
47
+
48
+ def name(self):
49
+ return "ColorButton"
50
+
51
+ def toolTip(self):
52
+ return "ColorButton which opens a color dialog."
53
+
54
+ def whatsThis(self):
55
+ return self.toolTip()
@@ -0,0 +1,15 @@
1
+ def main(): # pragma: no cover
2
+ from qtpy import PYSIDE6
3
+
4
+ if not PYSIDE6:
5
+ print("PYSIDE6 is not available in the environment. Cannot patch designer.")
6
+ return
7
+ from PySide6.QtDesigner import QPyDesignerCustomWidgetCollection
8
+
9
+ from bec_widgets.widgets.buttons.color_button.color_button_plugin import ColorButtonPlugin
10
+
11
+ QPyDesignerCustomWidgetCollection.addCustomWidget(ColorButtonPlugin())
12
+
13
+
14
+ if __name__ == "__main__": # pragma: no cover
15
+ main()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: bec_widgets
3
- Version: 0.77.0
3
+ Version: 0.78.0
4
4
  Summary: BEC Widgets
5
5
  Project-URL: Bug Tracker, https://gitlab.psi.ch/bec/bec_widgets/issues
6
6
  Project-URL: Homepage, https://gitlab.psi.ch/bec/bec_widgets
@@ -2,11 +2,11 @@
2
2
  .gitlab-ci.yml,sha256=RnYDz4zKXjlqltTryprlB1s5vLXxI2-seW-Vb70NNF0,8162
3
3
  .pylintrc,sha256=OstrgmEyP0smNFBKoIN5_26-UmNZgMHnbjvAWX0UrLs,18535
4
4
  .readthedocs.yaml,sha256=aSOc277LqXcsTI6lgvm_JY80lMlr69GbPKgivua2cS0,603
5
- CHANGELOG.md,sha256=5NFzG6tfisXzHM6jj-he3x3_HPgPdKKyt1oWkUH-bMw,7010
5
+ CHANGELOG.md,sha256=UPWdy8tasKSaIJVVPDH74FoLl9Nk1XvHwDoFoB75s0I,6908
6
6
  LICENSE,sha256=YRKe85CBRyP7UpEAWwU8_qSIyuy5-l_9C-HKg5Qm8MQ,1511
7
- PKG-INFO,sha256=61Ifh7zaMqLXKnkSGQ_8azx2be2G1eA947Z7kKfuzjQ,1427
7
+ PKG-INFO,sha256=5VhEBUc1_LSMn6P3wb6sgVGwVY9u9a0DUHSBzPsLc8U,1427
8
8
  README.md,sha256=y4jB6wvArS7N8_iTbKWnSM_oRAqLA2GqgzUR-FMh5sU,2645
9
- pyproject.toml,sha256=SlNgLZnAPXNh5bnWqZGqsG3ymviFuwjWuW2v0MgQnb4,2403
9
+ pyproject.toml,sha256=EeSFHPo4DvrbouaUUV5TDOdhBs3afzabcEePkzHV4HM,2403
10
10
  .git_hooks/pre-commit,sha256=n3RofIZHJl8zfJJIUomcMyYGFi_rwq4CC19z0snz3FI,286
11
11
  .gitlab/issue_templates/bug_report_template.md,sha256=gAuyEwl7XlnebBrkiJ9AqffSNOywmr8vygUFWKTuQeI,386
12
12
  .gitlab/issue_templates/documentation_update_template.md,sha256=FHLdb3TS_D9aL4CYZCjyXSulbaW5mrN2CmwTaeLPbNw,860
@@ -67,6 +67,12 @@ bec_widgets/widgets/bec_status_box/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQe
67
67
  bec_widgets/widgets/bec_status_box/bec_status_box.py,sha256=twWugYlGVSl9ziSbjeB75BZwuruXFszRoOlN0d79Gnk,14523
68
68
  bec_widgets/widgets/bec_status_box/status_item.py,sha256=wPkDm0GCGNXXpy3rR_Ljaxy0ZHeiiYcrWFqEntZnz4E,5869
69
69
  bec_widgets/widgets/buttons/__init__.py,sha256=74ucIRU6-anoqQ-zT7wbrysmxhg_3_04xGhN_kllNUI,48
70
+ bec_widgets/widgets/buttons/color_button/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
71
+ bec_widgets/widgets/buttons/color_button/color_button.py,sha256=AJUMOQVLd4H39wzW2MJLhGAww7a1NtjivTkfexVhHHo,512
72
+ bec_widgets/widgets/buttons/color_button/color_button.pyproject,sha256=LUYF4VkDOB4ttVe7YfvLh64K-XZg0-xaVT06BqCT3UA,30
73
+ bec_widgets/widgets/buttons/color_button/color_button_plugin.py,sha256=4phedgYl94PAn2VL-_IPIU3rKq6dwDGgHXyk5c2HcgU,1264
74
+ bec_widgets/widgets/buttons/color_button/register_color_button.py,sha256=PqsqOMNcdBL956mRIRFau4emb0bExuEtI9_l1l6rf88,483
75
+ bec_widgets/widgets/buttons/color_button/assets/color_button.png,sha256=dkjgGHSdxu98nM68O16fGpxBjxkkeLN8iu9M_8i5-NY,5618
70
76
  bec_widgets/widgets/buttons/stop_button/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
71
77
  bec_widgets/widgets/buttons/stop_button/stop_button.py,sha256=x4a7RvlMkHzOd05zKOGYkyTmBza7Me7jgOL9WIgA_c4,906
72
78
  bec_widgets/widgets/console/console.py,sha256=EgKYlbW3NrRPoQwIr8x739sLd1IRBWkEy286VDQw0gA,17838
@@ -223,8 +229,8 @@ tests/unit_tests/test_configs/config_device_no_entry.yaml,sha256=hdvue9KLc_kfNzG
223
229
  tests/unit_tests/test_configs/config_scan.yaml,sha256=vo484BbWOjA_e-h6bTjSV9k7QaQHrlAvx-z8wtY-P4E,1915
224
230
  tests/unit_tests/test_msgs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
225
231
  tests/unit_tests/test_msgs/available_scans_message.py,sha256=m_z97hIrjHXXMa2Ex-UvsPmTxOYXfjxyJaGkIY6StTY,46532
226
- bec_widgets-0.77.0.dist-info/METADATA,sha256=61Ifh7zaMqLXKnkSGQ_8azx2be2G1eA947Z7kKfuzjQ,1427
227
- bec_widgets-0.77.0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
228
- bec_widgets-0.77.0.dist-info/entry_points.txt,sha256=3otEkCdDB9LZJuBLzG4pFLK5Di0CVybN_12IsZrQ-58,166
229
- bec_widgets-0.77.0.dist-info/licenses/LICENSE,sha256=YRKe85CBRyP7UpEAWwU8_qSIyuy5-l_9C-HKg5Qm8MQ,1511
230
- bec_widgets-0.77.0.dist-info/RECORD,,
232
+ bec_widgets-0.78.0.dist-info/METADATA,sha256=5VhEBUc1_LSMn6P3wb6sgVGwVY9u9a0DUHSBzPsLc8U,1427
233
+ bec_widgets-0.78.0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
234
+ bec_widgets-0.78.0.dist-info/entry_points.txt,sha256=3otEkCdDB9LZJuBLzG4pFLK5Di0CVybN_12IsZrQ-58,166
235
+ bec_widgets-0.78.0.dist-info/licenses/LICENSE,sha256=YRKe85CBRyP7UpEAWwU8_qSIyuy5-l_9C-HKg5Qm8MQ,1511
236
+ bec_widgets-0.78.0.dist-info/RECORD,,
pyproject.toml CHANGED
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "bec_widgets"
7
- version = "0.77.0"
7
+ version = "0.78.0"
8
8
  description = "BEC Widgets"
9
9
  requires-python = ">=3.10"
10
10
  classifiers = [