bec-widgets 0.91.0__py3-none-any.whl → 0.92.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 +14 -16
- PKG-INFO +1 -1
- bec_widgets/assets/app_icons/BEC-Dark.png +0 -0
- bec_widgets/examples/general_app/__init__.py +0 -0
- bec_widgets/examples/general_app/general_app.py +92 -0
- bec_widgets/examples/general_app/general_app.ui +262 -0
- bec_widgets/examples/general_app/web_links.py +15 -0
- bec_widgets/widgets/device_combobox/device_combobox.py +1 -1
- bec_widgets/widgets/dock/dock.py +63 -2
- {bec_widgets-0.91.0.dist-info → bec_widgets-0.92.0.dist-info}/METADATA +1 -1
- {bec_widgets-0.91.0.dist-info → bec_widgets-0.92.0.dist-info}/RECORD +15 -10
- pyproject.toml +1 -1
- {bec_widgets-0.91.0.dist-info → bec_widgets-0.92.0.dist-info}/WHEEL +0 -0
- {bec_widgets-0.91.0.dist-info → bec_widgets-0.92.0.dist-info}/entry_points.txt +0 -0
- {bec_widgets-0.91.0.dist-info → bec_widgets-0.92.0.dist-info}/licenses/LICENSE +0 -0
CHANGELOG.md
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## v0.92.0 (2024-07-24)
|
4
|
+
|
5
|
+
### Feature
|
6
|
+
|
7
|
+
* feat(dock): dock style sheets updated ([`8ca60d5`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/8ca60d54b3cfa621172ce097fc1ba514c47ebac7))
|
8
|
+
|
9
|
+
* feat(general_gui): general gui added ([`5696c99`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/5696c993dc1c0da40ff3e99f754c246cc017ea32))
|
10
|
+
|
11
|
+
### Fix
|
12
|
+
|
13
|
+
* fix(dock): custom label can be created closable ([`4457ef2`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/4457ef2147e21b856c9dcaf63c81ba98002dcaf1))
|
14
|
+
|
15
|
+
* fix(device_combobox): set minimum size to 125px ([`1206e15`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/1206e153094cd8505badf69a1461572a76b4c5ad))
|
16
|
+
|
3
17
|
## v0.91.0 (2024-07-23)
|
4
18
|
|
5
19
|
### Feature
|
@@ -100,8 +114,6 @@ This reverts commit 3798714369adf4023f833b7749d2f46a0ec74eee ([`fd6ae91`](https:
|
|
100
114
|
|
101
115
|
* feat(waveform_widget): BECWaveformWidget toolbar added import/export config ([`fa9b171`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/fa9b17191ddbb4043a658dae9aa0801e1dc22b84))
|
102
116
|
|
103
|
-
* feat(waveform_widget): BECWaveformWidget added with toolbar ([`755b394`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/755b394c1c4d7c443c442d89c630d08ce5415554))
|
104
|
-
|
105
117
|
### Fix
|
106
118
|
|
107
119
|
* fix(waveform_widget): plot API unified with BECFigure ([`2c8764a`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/2c8764a27de89b39b717032b58465e120ec57fbc))
|
@@ -133,17 +145,3 @@ curve Dialog colormap WIP ([`33495cf`](https://gitlab.psi.ch/bec/bec_widgets/-/c
|
|
133
145
|
### Test
|
134
146
|
|
135
147
|
* test(waveform_widget): test added ([`8d764e2`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/8d764e2d46a1e017dadc3c4630648c1ca708afc2))
|
136
|
-
|
137
|
-
## v0.87.1 (2024-07-18)
|
138
|
-
|
139
|
-
### Fix
|
140
|
-
|
141
|
-
* fix(dock): added hasattr to cleanup method for widgets ([`d75c55b`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/d75c55b2b1ccf156fb789c7813f1c5bdf256f860))
|
142
|
-
|
143
|
-
* fix: add missing close() call, ensure jupyter console client.shutdown() is called in closeEvent ([`e52ee26`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/e52ee2604cb35096f1bd833ca9516d8a34197d35))
|
144
|
-
|
145
|
-
### Refactor
|
146
|
-
|
147
|
-
* refactor: BECWidget is a mixin based on BECConnector, for each QWidget in BEC
|
148
|
-
|
149
|
-
Handles closeEvent() and RPC registering/unregistering ([`c7feb69`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/c7feb6952d590b569f7b0cba3b019a9af0ce0c93))
|
PKG-INFO
CHANGED
Binary file
|
File without changes
|
@@ -0,0 +1,92 @@
|
|
1
|
+
import os
|
2
|
+
import sys
|
3
|
+
|
4
|
+
from qtpy.QtCore import QSize
|
5
|
+
from qtpy.QtGui import QActionGroup, QIcon
|
6
|
+
from qtpy.QtWidgets import QApplication, QMainWindow, QStyle
|
7
|
+
|
8
|
+
import bec_widgets
|
9
|
+
from bec_widgets.examples.general_app.web_links import BECWebLinksMixin
|
10
|
+
from bec_widgets.utils.colors import apply_theme
|
11
|
+
from bec_widgets.utils.ui_loader import UILoader
|
12
|
+
|
13
|
+
MODULE_PATH = os.path.dirname(bec_widgets.__file__)
|
14
|
+
|
15
|
+
|
16
|
+
class BECGeneralApp(QMainWindow):
|
17
|
+
def __init__(self, parent=None):
|
18
|
+
super(BECGeneralApp, self).__init__(parent)
|
19
|
+
ui_file_path = os.path.join(os.path.dirname(__file__), "general_app.ui")
|
20
|
+
self.load_ui(ui_file_path)
|
21
|
+
|
22
|
+
self.resize(1280, 720)
|
23
|
+
|
24
|
+
self.ini_ui()
|
25
|
+
|
26
|
+
def ini_ui(self):
|
27
|
+
self._setup_icons()
|
28
|
+
self._hook_menubar_docs()
|
29
|
+
self._hook_theme_bar()
|
30
|
+
|
31
|
+
def load_ui(self, ui_file):
|
32
|
+
loader = UILoader(self)
|
33
|
+
self.ui = loader.loader(ui_file)
|
34
|
+
self.setCentralWidget(self.ui)
|
35
|
+
|
36
|
+
def _hook_menubar_docs(self):
|
37
|
+
# BEC Docs
|
38
|
+
self.ui.action_BEC_docs.triggered.connect(BECWebLinksMixin.open_bec_docs)
|
39
|
+
# BEC Widgets Docs
|
40
|
+
self.ui.action_BEC_widgets_docs.triggered.connect(BECWebLinksMixin.open_bec_widgets_docs)
|
41
|
+
# Bug report
|
42
|
+
self.ui.action_bug_report.triggered.connect(BECWebLinksMixin.open_bec_bug_report)
|
43
|
+
|
44
|
+
def change_theme(self, theme):
|
45
|
+
apply_theme(theme)
|
46
|
+
|
47
|
+
def _setup_icons(self):
|
48
|
+
help_icon = QApplication.style().standardIcon(QStyle.SP_MessageBoxQuestion)
|
49
|
+
bug_icon = QApplication.style().standardIcon(QStyle.SP_MessageBoxInformation)
|
50
|
+
computer_icon = QIcon.fromTheme("computer")
|
51
|
+
widget_icon = QIcon(os.path.join(MODULE_PATH, "assets", "designer_icons", "dock_area.png"))
|
52
|
+
|
53
|
+
self.ui.action_BEC_docs.setIcon(help_icon)
|
54
|
+
self.ui.action_BEC_widgets_docs.setIcon(help_icon)
|
55
|
+
self.ui.action_bug_report.setIcon(bug_icon)
|
56
|
+
|
57
|
+
self.ui.central_tab.setTabIcon(0, widget_icon)
|
58
|
+
self.ui.central_tab.setTabIcon(1, computer_icon)
|
59
|
+
|
60
|
+
def _hook_theme_bar(self):
|
61
|
+
self.ui.action_light.setCheckable(True)
|
62
|
+
self.ui.action_dark.setCheckable(True)
|
63
|
+
|
64
|
+
# Create an action group to make sure only one can be checked at a time
|
65
|
+
theme_group = QActionGroup(self)
|
66
|
+
theme_group.addAction(self.ui.action_light)
|
67
|
+
theme_group.addAction(self.ui.action_dark)
|
68
|
+
theme_group.setExclusive(True)
|
69
|
+
|
70
|
+
# Connect the actions to the theme change method
|
71
|
+
|
72
|
+
self.ui.action_light.triggered.connect(lambda: self.change_theme("light"))
|
73
|
+
self.ui.action_dark.triggered.connect(lambda: self.change_theme("dark"))
|
74
|
+
|
75
|
+
self.ui.action_dark.trigger()
|
76
|
+
|
77
|
+
|
78
|
+
def main(): # pragma: no cover
|
79
|
+
|
80
|
+
app = QApplication(sys.argv)
|
81
|
+
icon = QIcon()
|
82
|
+
icon.addFile(
|
83
|
+
os.path.join(MODULE_PATH, "assets", "app_icons", "BEC-Dark.png"), size=QSize(48, 48)
|
84
|
+
)
|
85
|
+
app.setWindowIcon(icon)
|
86
|
+
main_window = BECGeneralApp()
|
87
|
+
main_window.show()
|
88
|
+
sys.exit(app.exec_())
|
89
|
+
|
90
|
+
|
91
|
+
if __name__ == "__main__": # pragma: no cover
|
92
|
+
main()
|
@@ -0,0 +1,262 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<ui version="4.0">
|
3
|
+
<class>MainWindow</class>
|
4
|
+
<widget class="QMainWindow" name="MainWindow">
|
5
|
+
<property name="geometry">
|
6
|
+
<rect>
|
7
|
+
<x>0</x>
|
8
|
+
<y>0</y>
|
9
|
+
<width>1718</width>
|
10
|
+
<height>1139</height>
|
11
|
+
</rect>
|
12
|
+
</property>
|
13
|
+
<property name="windowTitle">
|
14
|
+
<string>MainWindow</string>
|
15
|
+
</property>
|
16
|
+
<property name="tabShape">
|
17
|
+
<enum>QTabWidget::TabShape::Rounded</enum>
|
18
|
+
</property>
|
19
|
+
<widget class="QWidget" name="centralwidget">
|
20
|
+
<layout class="QVBoxLayout" name="verticalLayout_3">
|
21
|
+
<item>
|
22
|
+
<widget class="QTabWidget" name="central_tab">
|
23
|
+
<property name="currentIndex">
|
24
|
+
<number>0</number>
|
25
|
+
</property>
|
26
|
+
<widget class="QWidget" name="dock_area_tab">
|
27
|
+
<attribute name="title">
|
28
|
+
<string>Dock Area</string>
|
29
|
+
</attribute>
|
30
|
+
<layout class="QVBoxLayout" name="verticalLayout">
|
31
|
+
<property name="leftMargin">
|
32
|
+
<number>2</number>
|
33
|
+
</property>
|
34
|
+
<property name="topMargin">
|
35
|
+
<number>1</number>
|
36
|
+
</property>
|
37
|
+
<property name="rightMargin">
|
38
|
+
<number>2</number>
|
39
|
+
</property>
|
40
|
+
<property name="bottomMargin">
|
41
|
+
<number>2</number>
|
42
|
+
</property>
|
43
|
+
<item>
|
44
|
+
<widget class="BECDockArea" name="dock_area"/>
|
45
|
+
</item>
|
46
|
+
</layout>
|
47
|
+
</widget>
|
48
|
+
<widget class="QWidget" name="vscode_tab">
|
49
|
+
<attribute name="icon">
|
50
|
+
<iconset theme="QIcon::ThemeIcon::Computer"/>
|
51
|
+
</attribute>
|
52
|
+
<attribute name="title">
|
53
|
+
<string>Visual Studio Code</string>
|
54
|
+
</attribute>
|
55
|
+
<layout class="QVBoxLayout" name="verticalLayout_2">
|
56
|
+
<property name="leftMargin">
|
57
|
+
<number>2</number>
|
58
|
+
</property>
|
59
|
+
<property name="topMargin">
|
60
|
+
<number>1</number>
|
61
|
+
</property>
|
62
|
+
<property name="rightMargin">
|
63
|
+
<number>2</number>
|
64
|
+
</property>
|
65
|
+
<property name="bottomMargin">
|
66
|
+
<number>2</number>
|
67
|
+
</property>
|
68
|
+
<item>
|
69
|
+
<widget class="VSCodeEditor" name="vscode"/>
|
70
|
+
</item>
|
71
|
+
</layout>
|
72
|
+
</widget>
|
73
|
+
</widget>
|
74
|
+
</item>
|
75
|
+
</layout>
|
76
|
+
</widget>
|
77
|
+
<widget class="QMenuBar" name="menubar">
|
78
|
+
<property name="geometry">
|
79
|
+
<rect>
|
80
|
+
<x>0</x>
|
81
|
+
<y>0</y>
|
82
|
+
<width>1718</width>
|
83
|
+
<height>31</height>
|
84
|
+
</rect>
|
85
|
+
</property>
|
86
|
+
<widget class="QMenu" name="menuHelp">
|
87
|
+
<property name="title">
|
88
|
+
<string>Help</string>
|
89
|
+
</property>
|
90
|
+
<addaction name="action_BEC_docs"/>
|
91
|
+
<addaction name="action_BEC_widgets_docs"/>
|
92
|
+
<addaction name="action_bug_report"/>
|
93
|
+
</widget>
|
94
|
+
<widget class="QMenu" name="menuTheme">
|
95
|
+
<property name="title">
|
96
|
+
<string>Theme</string>
|
97
|
+
</property>
|
98
|
+
<addaction name="action_light"/>
|
99
|
+
<addaction name="action_dark"/>
|
100
|
+
</widget>
|
101
|
+
<addaction name="menuTheme"/>
|
102
|
+
<addaction name="menuHelp"/>
|
103
|
+
</widget>
|
104
|
+
<widget class="QStatusBar" name="statusbar"/>
|
105
|
+
<widget class="QDockWidget" name="dock_scan_control">
|
106
|
+
<property name="windowTitle">
|
107
|
+
<string>Scan Control</string>
|
108
|
+
</property>
|
109
|
+
<attribute name="dockWidgetArea">
|
110
|
+
<number>2</number>
|
111
|
+
</attribute>
|
112
|
+
<widget class="QWidget" name="dockWidgetContents_2">
|
113
|
+
<layout class="QVBoxLayout" name="verticalLayout_4">
|
114
|
+
<item>
|
115
|
+
<widget class="ScanControl" name="scan_control"/>
|
116
|
+
</item>
|
117
|
+
</layout>
|
118
|
+
</widget>
|
119
|
+
</widget>
|
120
|
+
<widget class="QDockWidget" name="dock_status_2">
|
121
|
+
<property name="windowTitle">
|
122
|
+
<string>BEC Service Status</string>
|
123
|
+
</property>
|
124
|
+
<attribute name="dockWidgetArea">
|
125
|
+
<number>2</number>
|
126
|
+
</attribute>
|
127
|
+
<widget class="QWidget" name="dockWidgetContents_3">
|
128
|
+
<layout class="QVBoxLayout" name="verticalLayout_5">
|
129
|
+
<property name="leftMargin">
|
130
|
+
<number>0</number>
|
131
|
+
</property>
|
132
|
+
<property name="topMargin">
|
133
|
+
<number>0</number>
|
134
|
+
</property>
|
135
|
+
<property name="rightMargin">
|
136
|
+
<number>0</number>
|
137
|
+
</property>
|
138
|
+
<property name="bottomMargin">
|
139
|
+
<number>0</number>
|
140
|
+
</property>
|
141
|
+
<item>
|
142
|
+
<widget class="BECStatusBox" name="bec_status_box_2"/>
|
143
|
+
</item>
|
144
|
+
</layout>
|
145
|
+
</widget>
|
146
|
+
</widget>
|
147
|
+
<widget class="QDockWidget" name="dock_queue">
|
148
|
+
<property name="windowTitle">
|
149
|
+
<string>Scan Queue</string>
|
150
|
+
</property>
|
151
|
+
<attribute name="dockWidgetArea">
|
152
|
+
<number>2</number>
|
153
|
+
</attribute>
|
154
|
+
<widget class="QWidget" name="dockWidgetContents_4">
|
155
|
+
<layout class="QVBoxLayout" name="verticalLayout_6">
|
156
|
+
<property name="leftMargin">
|
157
|
+
<number>0</number>
|
158
|
+
</property>
|
159
|
+
<property name="topMargin">
|
160
|
+
<number>0</number>
|
161
|
+
</property>
|
162
|
+
<property name="rightMargin">
|
163
|
+
<number>0</number>
|
164
|
+
</property>
|
165
|
+
<property name="bottomMargin">
|
166
|
+
<number>0</number>
|
167
|
+
</property>
|
168
|
+
<item>
|
169
|
+
<widget class="BECQueue" name="bec_queue">
|
170
|
+
<row/>
|
171
|
+
<column/>
|
172
|
+
<column/>
|
173
|
+
<column/>
|
174
|
+
<item row="0" column="0"/>
|
175
|
+
<item row="0" column="1"/>
|
176
|
+
<item row="0" column="2"/>
|
177
|
+
</widget>
|
178
|
+
</item>
|
179
|
+
</layout>
|
180
|
+
</widget>
|
181
|
+
</widget>
|
182
|
+
<action name="action_BEC_docs">
|
183
|
+
<property name="icon">
|
184
|
+
<iconset theme="QIcon::ThemeIcon::DialogQuestion"/>
|
185
|
+
</property>
|
186
|
+
<property name="text">
|
187
|
+
<string>BEC Docs</string>
|
188
|
+
</property>
|
189
|
+
</action>
|
190
|
+
<action name="action_BEC_widgets_docs">
|
191
|
+
<property name="icon">
|
192
|
+
<iconset theme="QIcon::ThemeIcon::DialogQuestion"/>
|
193
|
+
</property>
|
194
|
+
<property name="text">
|
195
|
+
<string>BEC Widgets Docs</string>
|
196
|
+
</property>
|
197
|
+
</action>
|
198
|
+
<action name="action_bug_report">
|
199
|
+
<property name="icon">
|
200
|
+
<iconset theme="QIcon::ThemeIcon::DialogError"/>
|
201
|
+
</property>
|
202
|
+
<property name="text">
|
203
|
+
<string>Bug Report</string>
|
204
|
+
</property>
|
205
|
+
</action>
|
206
|
+
<action name="action_light">
|
207
|
+
<property name="checkable">
|
208
|
+
<bool>true</bool>
|
209
|
+
</property>
|
210
|
+
<property name="text">
|
211
|
+
<string>Light</string>
|
212
|
+
</property>
|
213
|
+
</action>
|
214
|
+
<action name="action_dark">
|
215
|
+
<property name="checkable">
|
216
|
+
<bool>true</bool>
|
217
|
+
</property>
|
218
|
+
<property name="text">
|
219
|
+
<string>Dark</string>
|
220
|
+
</property>
|
221
|
+
</action>
|
222
|
+
</widget>
|
223
|
+
<customwidgets>
|
224
|
+
<customwidget>
|
225
|
+
<class>WebsiteWidget</class>
|
226
|
+
<extends>QWebEngineView</extends>
|
227
|
+
<header>website_widget</header>
|
228
|
+
</customwidget>
|
229
|
+
<customwidget>
|
230
|
+
<class>BECQueue</class>
|
231
|
+
<extends>QTableWidget</extends>
|
232
|
+
<header>bec_queue</header>
|
233
|
+
</customwidget>
|
234
|
+
<customwidget>
|
235
|
+
<class>ScanControl</class>
|
236
|
+
<extends>QWidget</extends>
|
237
|
+
<header>scan_control</header>
|
238
|
+
</customwidget>
|
239
|
+
<customwidget>
|
240
|
+
<class>VSCodeEditor</class>
|
241
|
+
<extends>WebsiteWidget</extends>
|
242
|
+
<header>vs_code_editor</header>
|
243
|
+
</customwidget>
|
244
|
+
<customwidget>
|
245
|
+
<class>BECStatusBox</class>
|
246
|
+
<extends>QWidget</extends>
|
247
|
+
<header>bec_status_box</header>
|
248
|
+
</customwidget>
|
249
|
+
<customwidget>
|
250
|
+
<class>BECDockArea</class>
|
251
|
+
<extends>QWidget</extends>
|
252
|
+
<header>dock_area</header>
|
253
|
+
</customwidget>
|
254
|
+
<customwidget>
|
255
|
+
<class>QWebEngineView</class>
|
256
|
+
<extends></extends>
|
257
|
+
<header location="global">QtWebEngineWidgets/QWebEngineView</header>
|
258
|
+
</customwidget>
|
259
|
+
</customwidgets>
|
260
|
+
<resources/>
|
261
|
+
<connections/>
|
262
|
+
</ui>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import webbrowser
|
2
|
+
|
3
|
+
|
4
|
+
class BECWebLinksMixin:
|
5
|
+
@staticmethod
|
6
|
+
def open_bec_docs():
|
7
|
+
webbrowser.open("https://beamline-experiment-control.readthedocs.io/en/latest/")
|
8
|
+
|
9
|
+
@staticmethod
|
10
|
+
def open_bec_widgets_docs():
|
11
|
+
webbrowser.open("https://bec.readthedocs.io/projects/bec-widgets/en/latest/")
|
12
|
+
|
13
|
+
@staticmethod
|
14
|
+
def open_bec_bug_report():
|
15
|
+
webbrowser.open("https://gitlab.psi.ch/groups/bec/-/issues/")
|
bec_widgets/widgets/dock/dock.py
CHANGED
@@ -3,7 +3,7 @@ from __future__ import annotations
|
|
3
3
|
from typing import TYPE_CHECKING, Any, Literal, Optional
|
4
4
|
|
5
5
|
from pydantic import Field
|
6
|
-
from pyqtgraph.dockarea import Dock
|
6
|
+
from pyqtgraph.dockarea import Dock, DockLabel
|
7
7
|
|
8
8
|
from bec_widgets.cli.rpc_wigdet_handler import widget_handler
|
9
9
|
from bec_widgets.utils import ConnectionConfig, GridLayoutManager
|
@@ -25,6 +25,64 @@ class DockConfig(ConnectionConfig):
|
|
25
25
|
)
|
26
26
|
|
27
27
|
|
28
|
+
class CustomDockLabel(DockLabel):
|
29
|
+
def updateStyle(self):
|
30
|
+
r = "3px"
|
31
|
+
if self.dim:
|
32
|
+
fg = "#aaa"
|
33
|
+
bg = "#44a"
|
34
|
+
border = "#339"
|
35
|
+
else:
|
36
|
+
fg = "#fff"
|
37
|
+
bg = "#3f4042"
|
38
|
+
border = "#3f4042"
|
39
|
+
|
40
|
+
if self.orientation == "vertical":
|
41
|
+
self.vStyle = """DockLabel {
|
42
|
+
background-color : %s;
|
43
|
+
color : %s;
|
44
|
+
border-top-right-radius: 0px;
|
45
|
+
border-top-left-radius: %s;
|
46
|
+
border-bottom-right-radius: 0px;
|
47
|
+
border-bottom-left-radius: %s;
|
48
|
+
border-width: 0px;
|
49
|
+
border-right: 2px solid %s;
|
50
|
+
padding-top: 3px;
|
51
|
+
padding-bottom: 3px;
|
52
|
+
font-size: %s;
|
53
|
+
}""" % (
|
54
|
+
bg,
|
55
|
+
fg,
|
56
|
+
r,
|
57
|
+
r,
|
58
|
+
border,
|
59
|
+
self.fontSize,
|
60
|
+
)
|
61
|
+
self.setStyleSheet(self.vStyle)
|
62
|
+
else:
|
63
|
+
self.hStyle = """DockLabel {
|
64
|
+
background-color : %s;
|
65
|
+
color : %s;
|
66
|
+
border-top-right-radius: %s;
|
67
|
+
border-top-left-radius: %s;
|
68
|
+
border-bottom-right-radius: 0px;
|
69
|
+
border-bottom-left-radius: 0px;
|
70
|
+
border-width: 0px;
|
71
|
+
border-bottom: 2px solid %s;
|
72
|
+
padding-left: 3px;
|
73
|
+
padding-right: 3px;
|
74
|
+
font-size: %s;
|
75
|
+
}""" % (
|
76
|
+
bg,
|
77
|
+
fg,
|
78
|
+
r,
|
79
|
+
r,
|
80
|
+
border,
|
81
|
+
self.fontSize,
|
82
|
+
)
|
83
|
+
self.setStyleSheet(self.hStyle)
|
84
|
+
|
85
|
+
|
28
86
|
class BECDock(BECWidget, Dock):
|
29
87
|
USER_ACCESS = [
|
30
88
|
"_config_dict",
|
@@ -51,6 +109,7 @@ class BECDock(BECWidget, Dock):
|
|
51
109
|
name: str | None = None,
|
52
110
|
client=None,
|
53
111
|
gui_id: str | None = None,
|
112
|
+
closable: bool = True,
|
54
113
|
**kwargs,
|
55
114
|
) -> None:
|
56
115
|
if config is None:
|
@@ -62,7 +121,9 @@ class BECDock(BECWidget, Dock):
|
|
62
121
|
config = DockConfig(**config)
|
63
122
|
self.config = config
|
64
123
|
super().__init__(client=client, config=config, gui_id=gui_id)
|
65
|
-
|
124
|
+
label = CustomDockLabel(text=name, closable=closable)
|
125
|
+
Dock.__init__(self, name=name, label=label, **kwargs)
|
126
|
+
# Dock.__init__(self, name=name, **kwargs)
|
66
127
|
|
67
128
|
self.parent_dock_area = parent_dock_area
|
68
129
|
|
@@ -2,17 +2,18 @@
|
|
2
2
|
.gitlab-ci.yml,sha256=zvb4A6QI5lQTsdfI5nPPL-tUNfcrz__SQjxW03QZ5Ek,8204
|
3
3
|
.pylintrc,sha256=eeY8YwSI74oFfq6IYIbCqnx3Vk8ZncKaatv96n_Y8Rs,18544
|
4
4
|
.readthedocs.yaml,sha256=aSOc277LqXcsTI6lgvm_JY80lMlr69GbPKgivua2cS0,603
|
5
|
-
CHANGELOG.md,sha256=
|
5
|
+
CHANGELOG.md,sha256=pacucbtN9ZWGj-nEtdxOQUgTWECb9jgd67zZTrIHj2M,7709
|
6
6
|
LICENSE,sha256=YRKe85CBRyP7UpEAWwU8_qSIyuy5-l_9C-HKg5Qm8MQ,1511
|
7
|
-
PKG-INFO,sha256=
|
7
|
+
PKG-INFO,sha256=VnZc1usRRpdjc7CFNYGi63h-mkTI7pG7k1qirWunV4k,1308
|
8
8
|
README.md,sha256=Od69x-RS85Hph0-WwWACwal4yUd67XkEn4APEfHhHFw,2649
|
9
|
-
pyproject.toml,sha256=
|
9
|
+
pyproject.toml,sha256=xcRdrwd813IfFf3F3mtUNLqlDSDwulmLOwRvUcVI2c0,2357
|
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
|
13
13
|
.gitlab/issue_templates/feature_request_template.md,sha256=vjxCnmj53Mp4FPzCrNxhkO-8StRQUZ36PlXu4K8VGaI,1543
|
14
14
|
.gitlab/merge_request_templates/default.md,sha256=tfyFA0hRCsIunbLGSlGbxWBQFeB3USpsA3H7IvwQ5UY,715
|
15
15
|
bec_widgets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
16
|
+
bec_widgets/assets/app_icons/BEC-Dark.png,sha256=TUebkoQX26eY7CIbXXVzyen5rph0loTQot7FfqWzsQs,1683654
|
16
17
|
bec_widgets/assets/app_icons/bec_widgets_icon.png,sha256=K8dgGwIjalDh9PRHUsSQBqgdX7a00nM3igZdc20pkYM,1747017
|
17
18
|
bec_widgets/assets/app_icons/terminal_icon.png,sha256=bJl7Tft4Fi2uxvuXI8o14uMHnI9eAWKSU2uftXCH9ws,3889
|
18
19
|
bec_widgets/assets/designer_icons/code.png,sha256=o_d4UbojdvmdPY6exO3Eu0aQlS3UbvMuwrTlptvRMQE,4420
|
@@ -87,6 +88,10 @@ bec_widgets/cli/rpc_register.py,sha256=QxXUZu5XNg00Yf5O3UHWOXg3-f_pzKjjoZYMOa-MO
|
|
87
88
|
bec_widgets/cli/rpc_wigdet_handler.py,sha256=6kQng2DyS6rhLJqSJ7xa0kdgSxp-35A2upcf833dJRE,1483
|
88
89
|
bec_widgets/cli/server.py,sha256=y0GrBpDF3bHvYFZM20j2eDlsYxb-hT1ki_zmVI_OEiM,7752
|
89
90
|
bec_widgets/examples/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
91
|
+
bec_widgets/examples/general_app/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
92
|
+
bec_widgets/examples/general_app/general_app.py,sha256=Ks9CKtIQIFOzKosh204zVg1ltSnp07LDqkwoVAaCd9k,3046
|
93
|
+
bec_widgets/examples/general_app/general_app.ui,sha256=TsejkM3Z8znnixyqxoj4SwhIIpIzTAuGAMkGXSS1aT8,10479
|
94
|
+
bec_widgets/examples/general_app/web_links.py,sha256=d5OgzgI9zb-NAC0pOGanOtJX3nZoe4x8QuQTw-_hK_8,434
|
90
95
|
bec_widgets/examples/jupyter_console/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
91
96
|
bec_widgets/examples/jupyter_console/jupyter_console_window.py,sha256=zzeSE4SS-B6p7LTqS91oGbEmYEtEQHewndVscJywL8I,6766
|
92
97
|
bec_widgets/examples/plugin_example_pyside/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -156,7 +161,7 @@ bec_widgets/widgets/device_box/register_device_box.py,sha256=K7Hx4FIQDXasejaw6nj
|
|
156
161
|
bec_widgets/widgets/device_combobox/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
157
162
|
bec_widgets/widgets/device_combobox/device_combo_box.pyproject,sha256=wI2eXR5ky_IM9-BCHJnH_9CEqYcZwIuLcgitSEr8OJU,40
|
158
163
|
bec_widgets/widgets/device_combobox/device_combo_box_plugin.py,sha256=py1VYOpy0gTpdQ9eCut1dxMSfF0ckAwO5qT8ZDNkSts,1439
|
159
|
-
bec_widgets/widgets/device_combobox/device_combobox.py,sha256=
|
164
|
+
bec_widgets/widgets/device_combobox/device_combobox.py,sha256=4YohiVtN-R4j9m2mrdwdkRL6IMpIbJ16KJ0SpJC86_g,2667
|
160
165
|
bec_widgets/widgets/device_combobox/register_device_combo_box.py,sha256=ZCrWVdWOvIjnUJWe3MU7JO021rcXYg2SgA1iSKqbLoY,488
|
161
166
|
bec_widgets/widgets/device_line_edit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
162
167
|
bec_widgets/widgets/device_line_edit/device_line_edit.py,sha256=iKK2NrVu4okWP8kxPU5whmo_y5VHtrD7Fd_q3ZgXN1Y,3221
|
@@ -164,7 +169,7 @@ bec_widgets/widgets/device_line_edit/device_line_edit.pyproject,sha256=tqAYXRbxs
|
|
164
169
|
bec_widgets/widgets/device_line_edit/device_line_edit_plugin.py,sha256=RPtGVPLadUVyfEvj1EAJ9ftXe3Htp40JdHGj9zBLukc,1462
|
165
170
|
bec_widgets/widgets/device_line_edit/register_device_line_edit.py,sha256=8gEPnC8djYCw-idoZAENNB3bPOxM6pbzEp9A366EAGg,489
|
166
171
|
bec_widgets/widgets/dock/__init__.py,sha256=B7foHt02gnhM7mFksa7GJVwT7n0j_JvYDCt6wc6XR5g,61
|
167
|
-
bec_widgets/widgets/dock/dock.py,sha256=
|
172
|
+
bec_widgets/widgets/dock/dock.py,sha256=44Scpqz6ssGZvPs00G9CfC0XAMtKuvXBVEYjBEQNqqY,9645
|
168
173
|
bec_widgets/widgets/dock/dock_area.py,sha256=VPdDCM2z8K9u2xcfcHaEdsaOEgf8tJlPl4czogWyFP4,13114
|
169
174
|
bec_widgets/widgets/dock/dock_area.pyproject,sha256=URW0UrDXCnkzk80rbQmUMgF6Uqay2TjHsq8Dq0g1j-c,37
|
170
175
|
bec_widgets/widgets/dock/dock_area_plugin.py,sha256=oG2zDxUA1YLvSBoFVeFVkz4HIWLruAwOsCZ00H2Z70A,1345
|
@@ -364,8 +369,8 @@ tests/unit_tests/test_configs/config_device_no_entry.yaml,sha256=hdvue9KLc_kfNzG
|
|
364
369
|
tests/unit_tests/test_configs/config_scan.yaml,sha256=vo484BbWOjA_e-h6bTjSV9k7QaQHrlAvx-z8wtY-P4E,1915
|
365
370
|
tests/unit_tests/test_msgs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
366
371
|
tests/unit_tests/test_msgs/available_scans_message.py,sha256=m_z97hIrjHXXMa2Ex-UvsPmTxOYXfjxyJaGkIY6StTY,46532
|
367
|
-
bec_widgets-0.
|
368
|
-
bec_widgets-0.
|
369
|
-
bec_widgets-0.
|
370
|
-
bec_widgets-0.
|
371
|
-
bec_widgets-0.
|
372
|
+
bec_widgets-0.92.0.dist-info/METADATA,sha256=VnZc1usRRpdjc7CFNYGi63h-mkTI7pG7k1qirWunV4k,1308
|
373
|
+
bec_widgets-0.92.0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
374
|
+
bec_widgets-0.92.0.dist-info/entry_points.txt,sha256=3otEkCdDB9LZJuBLzG4pFLK5Di0CVybN_12IsZrQ-58,166
|
375
|
+
bec_widgets-0.92.0.dist-info/licenses/LICENSE,sha256=YRKe85CBRyP7UpEAWwU8_qSIyuy5-l_9C-HKg5Qm8MQ,1511
|
376
|
+
bec_widgets-0.92.0.dist-info/RECORD,,
|
pyproject.toml
CHANGED
File without changes
|
File without changes
|
File without changes
|