cgse-gui 2024.1.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.
- cgse_gui-2024.1.0.dist-info/METADATA +13 -0
- cgse_gui-2024.1.0.dist-info/RECORD +124 -0
- cgse_gui-2024.1.0.dist-info/WHEEL +4 -0
- cgse_gui-2024.1.0.dist-info/entry_points.txt +6 -0
- egse/gui/__init__.py +56 -0
- egse/gui/buttons.py +378 -0
- egse/gui/icons/aeu-cs-start.svg +117 -0
- egse/gui/icons/aeu-cs-stop.svg +118 -0
- egse/gui/icons/aeu-cs.svg +107 -0
- egse/gui/icons/aeu_cs-started.svg +112 -0
- egse/gui/icons/aeu_cs-stopped.svg +112 -0
- egse/gui/icons/aeu_cs.svg +55 -0
- egse/gui/icons/alert.svg +1 -0
- egse/gui/icons/arrow-double-left.png +0 -0
- egse/gui/icons/arrow-double-right.png +0 -0
- egse/gui/icons/arrow-up.svg +11 -0
- egse/gui/icons/backward.svg +1 -0
- egse/gui/icons/busy.svg +1 -0
- egse/gui/icons/cleaning.svg +115 -0
- egse/gui/icons/color-scheme.svg +1 -0
- egse/gui/icons/cs-connected-alert.svg +91 -0
- egse/gui/icons/cs-connected-disabled.svg +43 -0
- egse/gui/icons/cs-connected.svg +89 -0
- egse/gui/icons/cs-not-connected.svg +44 -0
- egse/gui/icons/double-left-arrow.svg +1 -0
- egse/gui/icons/double-right-arrow.svg +1 -0
- egse/gui/icons/erase-disabled.svg +19 -0
- egse/gui/icons/erase.svg +59 -0
- egse/gui/icons/fitsgen-start.svg +47 -0
- egse/gui/icons/fitsgen-stop.svg +48 -0
- egse/gui/icons/fitsgen.svg +1 -0
- egse/gui/icons/forward.svg +1 -0
- egse/gui/icons/fov-hk-start.svg +33 -0
- egse/gui/icons/fov-hk-stop.svg +37 -0
- egse/gui/icons/fov-hk.svg +1 -0
- egse/gui/icons/front-desk.svg +1 -0
- egse/gui/icons/home-actioned.svg +15 -0
- egse/gui/icons/home-disabled.svg +15 -0
- egse/gui/icons/home.svg +13 -0
- egse/gui/icons/info.svg +1 -0
- egse/gui/icons/invalid.png +0 -0
- egse/gui/icons/led-green.svg +20 -0
- egse/gui/icons/led-grey.svg +20 -0
- egse/gui/icons/led-orange.svg +20 -0
- egse/gui/icons/led-red.svg +20 -0
- egse/gui/icons/led-square-green.svg +134 -0
- egse/gui/icons/led-square-grey.svg +134 -0
- egse/gui/icons/led-square-orange.svg +134 -0
- egse/gui/icons/led-square-red.svg +134 -0
- egse/gui/icons/limit-switch-all-green.svg +115 -0
- egse/gui/icons/limit-switch-all-red.svg +117 -0
- egse/gui/icons/limit-switch-el+.svg +116 -0
- egse/gui/icons/limit-switch-el-.svg +117 -0
- egse/gui/icons/location-marker.svg +1 -0
- egse/gui/icons/logo-dpu.svg +48 -0
- egse/gui/icons/logo-gimbal.svg +112 -0
- egse/gui/icons/logo-huber.svg +23 -0
- egse/gui/icons/logo-ogse.svg +31 -0
- egse/gui/icons/logo-puna.svg +92 -0
- egse/gui/icons/logo-tcs.svg +29 -0
- egse/gui/icons/logo-zonda.svg +66 -0
- egse/gui/icons/maximize.svg +1 -0
- egse/gui/icons/meter.svg +1 -0
- egse/gui/icons/more.svg +45 -0
- egse/gui/icons/n-fee-hk-start.svg +24 -0
- egse/gui/icons/n-fee-hk-stop.svg +25 -0
- egse/gui/icons/n-fee-hk.svg +83 -0
- egse/gui/icons/observing-off.svg +46 -0
- egse/gui/icons/observing-on.svg +46 -0
- egse/gui/icons/open-document-hdf5.png +0 -0
- egse/gui/icons/open-document-hdf5.svg +21 -0
- egse/gui/icons/ops-mode.svg +1 -0
- egse/gui/icons/play-green.svg +17 -0
- egse/gui/icons/plugged-disabled.svg +27 -0
- egse/gui/icons/plugged.svg +21 -0
- egse/gui/icons/pm_ui.svg +1 -0
- egse/gui/icons/power-button-green.svg +27 -0
- egse/gui/icons/power-button-red.svg +27 -0
- egse/gui/icons/power-button.svg +27 -0
- egse/gui/icons/radar.svg +1 -0
- egse/gui/icons/radioactive.svg +2 -0
- egse/gui/icons/reload.svg +1 -0
- egse/gui/icons/remote-control-off.svg +28 -0
- egse/gui/icons/remote-control-on.svg +28 -0
- egse/gui/icons/repeat-blue.svg +15 -0
- egse/gui/icons/repeat.svg +1 -0
- egse/gui/icons/settings.svg +1 -0
- egse/gui/icons/shrink.svg +1 -0
- egse/gui/icons/shutter.svg +1 -0
- egse/gui/icons/sign-off.svg +1 -0
- egse/gui/icons/sign-on.svg +1 -0
- egse/gui/icons/sim-mode.svg +1 -0
- egse/gui/icons/small-buttons-go.svg +20 -0
- egse/gui/icons/small-buttons-minus.svg +51 -0
- egse/gui/icons/small-buttons-plus.svg +51 -0
- egse/gui/icons/sponge.svg +220 -0
- egse/gui/icons/start-button-disabled.svg +84 -0
- egse/gui/icons/start-button.svg +50 -0
- egse/gui/icons/stop-button-disabled.svg +84 -0
- egse/gui/icons/stop-button.svg +50 -0
- egse/gui/icons/stop-red.svg +17 -0
- egse/gui/icons/stop.svg +1 -0
- egse/gui/icons/switch-disabled-square.svg +87 -0
- egse/gui/icons/switch-disabled.svg +15 -0
- egse/gui/icons/switch-off-square.svg +87 -0
- egse/gui/icons/switch-off.svg +72 -0
- egse/gui/icons/switch-on-square.svg +87 -0
- egse/gui/icons/switch-on.svg +61 -0
- egse/gui/icons/temperature-control.svg +44 -0
- egse/gui/icons/th_ui_logo.svg +1 -0
- egse/gui/icons/unplugged.svg +23 -0
- egse/gui/icons/unvalid.png +0 -0
- egse/gui/icons/user-interface.svg +1 -0
- egse/gui/icons/vacuum.svg +1 -0
- egse/gui/icons/valid.png +0 -0
- egse/gui/icons/zoom-to-pixel-dark.svg +64 -0
- egse/gui/icons/zoom-to-pixel-white.svg +36 -0
- egse/gui/led.py +162 -0
- egse/gui/limitswitch.py +143 -0
- egse/gui/states.py +148 -0
- egse/gui/styles/dark.qss +343 -0
- egse/gui/styles/default.qss +48 -0
- egse/gui/styles.qss +48 -0
- egse/gui/switch.py +108 -0
egse/gui/styles/dark.qss
ADDED
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
QToolTip{
|
|
2
|
+
color:#ffffff;
|
|
3
|
+
background-color:palette(base);
|
|
4
|
+
border:1px solid palette(highlight);
|
|
5
|
+
border-radius:4px;
|
|
6
|
+
}
|
|
7
|
+
QStatusBar{
|
|
8
|
+
background-color:qlineargradient(x1:0,y1:0,x2:0,y2:1,stop:0 rgba(25,25,25,127),stop:1 rgba(53,53,53,75));
|
|
9
|
+
color:palette(mid);
|
|
10
|
+
}
|
|
11
|
+
QMenuBar{
|
|
12
|
+
background-color:qlineargradient(x1:0,y1:0,x2:0,y2:1,stop:0 rgba(25,25,25,127),stop:1 rgba(53,53,53,75));
|
|
13
|
+
border-bottom:2px solid rgba(25,25,25,75);
|
|
14
|
+
}
|
|
15
|
+
QMenuBar::item{
|
|
16
|
+
spacing:2px;
|
|
17
|
+
padding:3px 4px;
|
|
18
|
+
background:transparent;
|
|
19
|
+
}
|
|
20
|
+
QMenuBar::item:selected{
|
|
21
|
+
background-color:qlineargradient(x1:0,y1:0,x2:0,y2:1,stop:0 rgba(106,106,106,255),stop:1 rgba(106,106,106,75));
|
|
22
|
+
border-left:1px solid rgba(106,106,106,127);
|
|
23
|
+
border-right:1px solid rgba(106,106,106,127);
|
|
24
|
+
}
|
|
25
|
+
QMenuBar::item:pressed{
|
|
26
|
+
background-color:palette(highlight);
|
|
27
|
+
border-left:1px solid rgba(25,25,25,127);
|
|
28
|
+
border-right:1px solid rgba(25,25,25,127);
|
|
29
|
+
}
|
|
30
|
+
QMenu{
|
|
31
|
+
background-color:palette(window);
|
|
32
|
+
border:1px solid palette(shadow);
|
|
33
|
+
}
|
|
34
|
+
QMenu::item{
|
|
35
|
+
padding:3px 25px 3px 25px;
|
|
36
|
+
border:1px solid transparent;
|
|
37
|
+
}
|
|
38
|
+
QMenu::item:disabled{
|
|
39
|
+
background-color:rgba(35,35,35,127);
|
|
40
|
+
color:palette(disabled);
|
|
41
|
+
}
|
|
42
|
+
QMenu::item:selected{
|
|
43
|
+
border-color:rgba(147,191,236,127);
|
|
44
|
+
background:palette(highlight);
|
|
45
|
+
}
|
|
46
|
+
QMenu::icon:checked{
|
|
47
|
+
background-color:qlineargradient(x1:0,y1:1,x2:0,y2:0,stop:0 rgba(25,25,25,127),stop:1 rgba(53,53,53,75));
|
|
48
|
+
border:1px solid palette(highlight);
|
|
49
|
+
border-radius:2px;
|
|
50
|
+
}
|
|
51
|
+
QMenu::separator{
|
|
52
|
+
height:1px;
|
|
53
|
+
background:palette(alternate-base);
|
|
54
|
+
margin-left:5px;
|
|
55
|
+
margin-right:5px;
|
|
56
|
+
}
|
|
57
|
+
QMenu::indicator{
|
|
58
|
+
width:18px;
|
|
59
|
+
height:18px;
|
|
60
|
+
}
|
|
61
|
+
QMenu::indicator:non-exclusive:checked{
|
|
62
|
+
image:url(:/darkstyle/icon_checkbox_checked.png);
|
|
63
|
+
padding-left:2px;
|
|
64
|
+
}
|
|
65
|
+
QMenu::indicator:non-exclusive:unchecked{
|
|
66
|
+
image:url(:/darkstyle/icon_checkbox_unchecked.png);
|
|
67
|
+
padding-left:2px;
|
|
68
|
+
}
|
|
69
|
+
QMenu::indicator:exclusive:checked{
|
|
70
|
+
image:url(:/darkstyle/icon_radiobutton_checked.png);
|
|
71
|
+
padding-left:2px;
|
|
72
|
+
}
|
|
73
|
+
QMenu::indicator:exclusive:unchecked{
|
|
74
|
+
image:url(:/darkstyle/icon_radiobutton_unchecked.png);
|
|
75
|
+
padding-left:2px;
|
|
76
|
+
}
|
|
77
|
+
QToolBar::top{
|
|
78
|
+
background-color:qlineargradient(x1:0,y1:0,x2:0,y2:1,stop:0 rgba(25,25,25,127),stop:1 rgba(53,53,53,75));
|
|
79
|
+
border-bottom:3px solid qlineargradient(x1:0,y1:0,x2:0,y2:1,stop:0 rgba(25,25,25,127),stop:1 rgba(53,53,53,75));
|
|
80
|
+
}
|
|
81
|
+
QToolBar::bottom{
|
|
82
|
+
background-color:qlineargradient(x1:0,y1:1,x2:0,y2:0,stop:0 rgba(25,25,25,127),stop:1 rgba(53,53,53,75));
|
|
83
|
+
border-top:3px solid qlineargradient(x1:0,y1:1,x2:0,y2:0,stop:0 rgba(25,25,25,127),stop:1 rgba(53,53,53,75));
|
|
84
|
+
}
|
|
85
|
+
QToolBar::left{
|
|
86
|
+
background-color:qlineargradient(x1:0,y1:0,x2:1,y2:0,stop:0 rgba(25,25,25,127),stop:1 rgba(53,53,53,75));
|
|
87
|
+
border-right:3px solid qlineargradient(x1:0,y1:0,x2:1,y2:0,stop:0 rgba(25,25,25,127),stop:1 rgba(53,53,53,75));
|
|
88
|
+
}
|
|
89
|
+
QToolBar::right{
|
|
90
|
+
background-color:qlineargradient(x1:1,y1:0,x2:0,y2:0,stop:0 rgba(25,25,25,127),stop:1 rgba(53,53,53,75));
|
|
91
|
+
border-left:3px solid qlineargradient(x1:1,y1:0,x2:0,y2:0,stop:0 rgba(25,25,25,127),stop:1 rgba(53,53,53,75));
|
|
92
|
+
}
|
|
93
|
+
QMainWindow::separator{
|
|
94
|
+
width:6px;
|
|
95
|
+
height:5px;
|
|
96
|
+
padding:2px;
|
|
97
|
+
}
|
|
98
|
+
QSplitter::handle:horizontal{
|
|
99
|
+
width:10px;
|
|
100
|
+
}
|
|
101
|
+
QSplitter::handle:vertical{
|
|
102
|
+
height:10px;
|
|
103
|
+
}
|
|
104
|
+
QMainWindow::separator:hover,QSplitter::handle:hover{
|
|
105
|
+
background:palette(highlight);
|
|
106
|
+
}
|
|
107
|
+
QDockWidget::title{
|
|
108
|
+
padding:4px;
|
|
109
|
+
background-color:qlineargradient(x1:0,y1:1,x2:0,y2:0,stop:0 rgba(25,25,25,127),stop:1 rgba(53,53,53,75));
|
|
110
|
+
border:1px solid rgba(25,25,25,75);
|
|
111
|
+
border-bottom:2px solid rgba(25,25,25,75);
|
|
112
|
+
}
|
|
113
|
+
QDockWidget{
|
|
114
|
+
titlebar-close-icon:url(:/darkstyle/icon_close.png);
|
|
115
|
+
titlebar-normal-icon:url(:/darkstyle/icon_restore.png);
|
|
116
|
+
}
|
|
117
|
+
QDockWidget::close-button,QDockWidget::float-button{
|
|
118
|
+
subcontrol-position:top right;
|
|
119
|
+
subcontrol-origin:margin;
|
|
120
|
+
position:absolute;
|
|
121
|
+
top:3px;
|
|
122
|
+
bottom:0px;
|
|
123
|
+
width:20px;
|
|
124
|
+
height:20px;
|
|
125
|
+
}
|
|
126
|
+
QDockWidget::close-button{
|
|
127
|
+
right:3px;
|
|
128
|
+
}
|
|
129
|
+
QDockWidget::float-button{
|
|
130
|
+
right:25px;
|
|
131
|
+
}
|
|
132
|
+
QGroupBox{
|
|
133
|
+
background-color:rgba(66,66,66,50%);
|
|
134
|
+
margin-top:27px;
|
|
135
|
+
border:1px solid rgba(25,25,25,127);
|
|
136
|
+
border-radius:4px;
|
|
137
|
+
}
|
|
138
|
+
QGroupBox::title{
|
|
139
|
+
subcontrol-origin:margin;
|
|
140
|
+
subcontrol-position:left top;
|
|
141
|
+
padding:4px 6px;
|
|
142
|
+
margin-left:3px;
|
|
143
|
+
background-color:qlineargradient(x1:0,y1:1,x2:0,y2:0,stop:0 rgba(25,25,25,127),stop:1 rgba(53,53,53,75));
|
|
144
|
+
border:1px solid rgba(25,25,25,75);
|
|
145
|
+
border-bottom:2px solid rgb(127,127,127);
|
|
146
|
+
border-top-left-radius:4px;
|
|
147
|
+
border-top-right-radius:4px;
|
|
148
|
+
}
|
|
149
|
+
QTabWidget::pane{
|
|
150
|
+
background-color:rgba(66,66,66,50%);
|
|
151
|
+
border-top:1px solid rgba(25,25,25,50%);
|
|
152
|
+
}
|
|
153
|
+
QTabWidget::tab-bar{
|
|
154
|
+
left:3px;
|
|
155
|
+
top:1px;
|
|
156
|
+
}
|
|
157
|
+
QTabBar{
|
|
158
|
+
background-color:transparent;
|
|
159
|
+
qproperty-drawBase:0;
|
|
160
|
+
border-bottom:1px solid rgba(25,25,25,50%);
|
|
161
|
+
}
|
|
162
|
+
QTabBar::tab{
|
|
163
|
+
padding:4px 6px;
|
|
164
|
+
background-color:qlineargradient(x1:0,y1:1,x2:0,y2:0,stop:0 rgba(25,25,25,127),stop:1 rgba(53,53,53,75));
|
|
165
|
+
border:1px solid rgba(25,25,25,75);
|
|
166
|
+
border-top-left-radius:4px;
|
|
167
|
+
border-top-right-radius:4px;
|
|
168
|
+
}
|
|
169
|
+
QTabBar::tab:selected,QTabBar::tab:hover{
|
|
170
|
+
background-color:qlineargradient(x1:0,y1:0,x2:0,y2:1,stop:0 rgba(53,53,53,127),stop:1 rgba(66,66,66,50%));
|
|
171
|
+
border-bottom-color:rgba(66,66,66,75%);
|
|
172
|
+
}
|
|
173
|
+
QTabBar::tab:selected{
|
|
174
|
+
border-bottom:2px solid palette(highlight);
|
|
175
|
+
}
|
|
176
|
+
QTabBar::tab::selected:disabled{
|
|
177
|
+
border-bottom:2px solid rgb(127,127,127);
|
|
178
|
+
}
|
|
179
|
+
QTabBar::tab:!selected{
|
|
180
|
+
margin-top:2px;
|
|
181
|
+
}
|
|
182
|
+
QCheckBox::indicator{
|
|
183
|
+
width:18px;
|
|
184
|
+
height:18px;
|
|
185
|
+
}
|
|
186
|
+
QCheckBox::indicator:checked,QTreeView::indicator:checked,QTableView::indicator:checked,QGroupBox::indicator:checked{
|
|
187
|
+
image:url(:/darkstyle/icon_checkbox_checked.png);
|
|
188
|
+
}
|
|
189
|
+
QCheckBox::indicator:checked:pressed,QTreeView::indicator:checked:pressed,QTableView::indicator:checked:pressed,QGroupBox::indicator:checked:pressed{
|
|
190
|
+
image:url(:/darkstyle/icon_checkbox_checked_pressed.png);
|
|
191
|
+
}
|
|
192
|
+
QCheckBox::indicator:checked:disabled,QTreeView::indicator:checked:disabled,QTableView::indicator:checked:disabled,QGroupBox::indicator:checked:disabled{
|
|
193
|
+
image:url(:/darkstyle/icon_checkbox_checked_disabled.png);
|
|
194
|
+
}
|
|
195
|
+
QCheckBox::indicator:unchecked,QTreeView::indicator:unchecked,QTableView::indicator:unchecked,QGroupBox::indicator:unchecked{
|
|
196
|
+
image:url(:/darkstyle/icon_checkbox_unchecked.png);
|
|
197
|
+
}
|
|
198
|
+
QCheckBox::indicator:unchecked:pressed,QTreeView::indicator:unchecked:pressed,QTableView::indicator:unchecked:pressed,QGroupBox::indicator:unchecked:pressed{
|
|
199
|
+
image:url(:/darkstyle/icon_checkbox_unchecked_pressed.png);
|
|
200
|
+
}
|
|
201
|
+
QCheckBox::indicator:unchecked:disabled,QTreeView::indicator:unchecked:disabled,QTableView::indicator:unchecked:disabled,QGroupBox::indicator:unchecked:disabled{
|
|
202
|
+
image:url(:/darkstyle/icon_checkbox_unchecked_disabled.png);
|
|
203
|
+
}
|
|
204
|
+
QCheckBox::indicator:indeterminate,QTreeView::indicator:indeterminate,QTableView::indicator:indeterminate,QGroupBox::indicator:indeterminate{
|
|
205
|
+
image:url(:/darkstyle/icon_checkbox_indeterminate.png);
|
|
206
|
+
}
|
|
207
|
+
QCheckBox::indicator:indeterminate:pressed,QTreeView::indicator:indeterminate:pressed,QTableView::indicator:indeterminate:pressed,QGroupBox::indicator:indeterminate:pressed{
|
|
208
|
+
image:url(:/darkstyle/icon_checkbox_indeterminate_pressed.png);
|
|
209
|
+
}
|
|
210
|
+
QCheckBox::indicator:indeterminate:disabled,QTreeView::indicator:indeterminate:disabled,QTableView::indicator:indeterminate:disabled,QGroupBox::indicator:indeterminate:disabled{
|
|
211
|
+
image:url(:/darkstyle/icon_checkbox_indeterminate_disabled.png);
|
|
212
|
+
}
|
|
213
|
+
QRadioButton::indicator{
|
|
214
|
+
width:18px;
|
|
215
|
+
height:18px;
|
|
216
|
+
}
|
|
217
|
+
QRadioButton::indicator:checked{
|
|
218
|
+
image:url(:/darkstyle/icon_radiobutton_checked.png);
|
|
219
|
+
}
|
|
220
|
+
QRadioButton::indicator:checked:pressed{
|
|
221
|
+
image:url(:/darkstyle/icon_radiobutton_checked_pressed.png);
|
|
222
|
+
}
|
|
223
|
+
QRadioButton::indicator:checked:disabled{
|
|
224
|
+
image:url(:/darkstyle/icon_radiobutton_checked_disabled.png);
|
|
225
|
+
}
|
|
226
|
+
QRadioButton::indicator:unchecked{
|
|
227
|
+
image:url(:/darkstyle/icon_radiobutton_unchecked.png);
|
|
228
|
+
}
|
|
229
|
+
QRadioButton::indicator:unchecked:pressed{
|
|
230
|
+
image:url(:/darkstyle/icon_radiobutton_unchecked_pressed.png);
|
|
231
|
+
}
|
|
232
|
+
QRadioButton::indicator:unchecked:disabled{
|
|
233
|
+
image:url(:/darkstyle/icon_radiobutton_unchecked_disabled.png);
|
|
234
|
+
}
|
|
235
|
+
QTreeView, QTableView{
|
|
236
|
+
alternate-background-color:palette(window);
|
|
237
|
+
background:palette(base);
|
|
238
|
+
}
|
|
239
|
+
QTreeView QHeaderView::section, QTableView QHeaderView::section{
|
|
240
|
+
background-color:qlineargradient(x1:0,y1:1,x2:0,y2:0,stop:0 rgba(25,25,25,127),stop:1 rgba(53,53,53,75));
|
|
241
|
+
border-style:none;
|
|
242
|
+
border-bottom:1px solid palette(dark);
|
|
243
|
+
padding-left:5px;
|
|
244
|
+
padding-right:5px;
|
|
245
|
+
}
|
|
246
|
+
QTreeView::item:selected:disabled, QTableView::item:selected:disabled{
|
|
247
|
+
background:rgb(80,80,80);
|
|
248
|
+
}
|
|
249
|
+
QTreeView::branch{
|
|
250
|
+
background-color:palette(base);
|
|
251
|
+
}
|
|
252
|
+
QTreeView::branch:has-siblings:!adjoins-item{
|
|
253
|
+
border-image:url(:/darkstyle/icon_vline.png) 0;
|
|
254
|
+
}
|
|
255
|
+
QTreeView::branch:has-siblings:adjoins-item{
|
|
256
|
+
border-image:url(:/darkstyle/icon_branch_more.png) 0;
|
|
257
|
+
}
|
|
258
|
+
QTreeView::branch:!has-children:!has-siblings:adjoins-item{
|
|
259
|
+
border-image:url(:/darkstyle/icon_branch_end.png) 0;
|
|
260
|
+
}
|
|
261
|
+
QTreeView::branch:has-children:!has-siblings:closed,
|
|
262
|
+
QTreeView::branch:closed:has-children:has-siblings{
|
|
263
|
+
border-image:none;
|
|
264
|
+
image:url(:/darkstyle/icon_branch_closed.png);
|
|
265
|
+
}
|
|
266
|
+
QTreeView::branch:open:has-children:!has-siblings,
|
|
267
|
+
QTreeView::branch:open:has-children:has-siblings{
|
|
268
|
+
border-image:none;
|
|
269
|
+
image:url(:/darkstyle/icon_branch_open.png);
|
|
270
|
+
}
|
|
271
|
+
QScrollBar:vertical{
|
|
272
|
+
background:palette(base);
|
|
273
|
+
border-top-right-radius:2px;
|
|
274
|
+
border-bottom-right-radius:2px;
|
|
275
|
+
width:16px;
|
|
276
|
+
margin:0px;
|
|
277
|
+
}
|
|
278
|
+
QScrollBar::handle:vertical{
|
|
279
|
+
background-color:palette(alternate-base);
|
|
280
|
+
border-radius:2px;
|
|
281
|
+
min-height:20px;
|
|
282
|
+
margin:2px 4px 2px 4px;
|
|
283
|
+
}
|
|
284
|
+
QScrollBar::handle:vertical:hover{
|
|
285
|
+
background-color:palette(highlight);
|
|
286
|
+
}
|
|
287
|
+
QScrollBar::add-line:vertical{
|
|
288
|
+
background:none;
|
|
289
|
+
height:0px;
|
|
290
|
+
subcontrol-position:right;
|
|
291
|
+
subcontrol-origin:margin;
|
|
292
|
+
}
|
|
293
|
+
QScrollBar::sub-line:vertical{
|
|
294
|
+
background:none;
|
|
295
|
+
height:0px;
|
|
296
|
+
subcontrol-position:left;
|
|
297
|
+
subcontrol-origin:margin;
|
|
298
|
+
}
|
|
299
|
+
QScrollBar:horizontal{
|
|
300
|
+
background:palette(base);
|
|
301
|
+
height:16px;
|
|
302
|
+
margin:0px;
|
|
303
|
+
}
|
|
304
|
+
QScrollBar::handle:horizontal{
|
|
305
|
+
background-color:palette(alternate-base);
|
|
306
|
+
border-radius:2px;
|
|
307
|
+
min-width:20px;
|
|
308
|
+
margin:4px 2px 4px 2px;
|
|
309
|
+
}
|
|
310
|
+
QScrollBar::handle:horizontal:hover{
|
|
311
|
+
background-color:palette(highlight);
|
|
312
|
+
}
|
|
313
|
+
QScrollBar::add-line:horizontal{
|
|
314
|
+
background:none;
|
|
315
|
+
width:0px;
|
|
316
|
+
subcontrol-position:bottom;
|
|
317
|
+
subcontrol-origin:margin;
|
|
318
|
+
}
|
|
319
|
+
QScrollBar::sub-line:horizontal{
|
|
320
|
+
background:none;
|
|
321
|
+
width:0px;
|
|
322
|
+
subcontrol-position:top;
|
|
323
|
+
subcontrol-origin:margin;
|
|
324
|
+
}
|
|
325
|
+
QSlider::handle:horizontal{
|
|
326
|
+
border-radius:4px;
|
|
327
|
+
border:1px solid rgba(25,25,25,255);
|
|
328
|
+
background-color:palette(alternate-base);
|
|
329
|
+
min-height:20px;
|
|
330
|
+
margin:0 -4px;
|
|
331
|
+
}
|
|
332
|
+
QSlider::handle:horizontal:hover{
|
|
333
|
+
background:palette(highlight);
|
|
334
|
+
}
|
|
335
|
+
QSlider::add-page:horizontal{
|
|
336
|
+
background:palette(base);
|
|
337
|
+
}
|
|
338
|
+
QSlider::sub-page:horizontal{
|
|
339
|
+
background:palette(highlight);
|
|
340
|
+
}
|
|
341
|
+
QSlider::sub-page:horizontal:disabled{
|
|
342
|
+
background:rgb(80,80,80);
|
|
343
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/*css stylesheet file that contains all the style information*/
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
QGroupBox {
|
|
5
|
+
border: 1px solid lightGray;
|
|
6
|
+
border-radius: 0px;
|
|
7
|
+
margin-top: 0px;
|
|
8
|
+
padding-top: 10px;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
QGroupBox::title {
|
|
12
|
+
background-color: transparent;
|
|
13
|
+
padding-top: 0px;
|
|
14
|
+
padding-left: 0px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/*
|
|
18
|
+
QGroupBox#ManualModeGroupBox {
|
|
19
|
+
border: 1px solid lightGray;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
QFrame#AppFrame {
|
|
23
|
+
border: 1px solid black;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
QFrame#StatusFrame {
|
|
27
|
+
border: 1px solid red;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
QFrame#TabsFrame {
|
|
31
|
+
border: 1px solid red;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
QWidget#ManualPositions {
|
|
35
|
+
border: 0px solid green;
|
|
36
|
+
}
|
|
37
|
+
*/
|
|
38
|
+
|
|
39
|
+
/*
|
|
40
|
+
tabs_frame.setStyleSheet("border: 1px solid orange; ")
|
|
41
|
+
states_frame.setStyleSheet("border: 1px solid green; ")
|
|
42
|
+
positions_frame.setStyleSheet("border: 1px solid blue; ")
|
|
43
|
+
toolbar_widget.setStyleSheet("border: 1px solid black; ")
|
|
44
|
+
states_widget.setStyleSheet("border: 1px solid magenta; ")
|
|
45
|
+
user_positions_widget.setStyleSheet("border: 1px solid cyan; ")
|
|
46
|
+
mach_positions_widget.setStyleSheet("border: 1px solid cyan; ")
|
|
47
|
+
atcuator_length_widget.setStyleSheet("border: 1px solid cyan; ")
|
|
48
|
+
*/
|
egse/gui/styles.qss
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/*css stylesheet file that contains all the style information*/
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
QGroupBox {
|
|
5
|
+
border: 1px solid lightGray;
|
|
6
|
+
border-radius: 0px;
|
|
7
|
+
margin-top: 0px;
|
|
8
|
+
padding-top: 10px;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
QGroupBox::title {
|
|
12
|
+
background-color: transparent;
|
|
13
|
+
padding-top: 0px;
|
|
14
|
+
padding-left: 0px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/*
|
|
18
|
+
QGroupBox#ManualModeGroupBox {
|
|
19
|
+
border: 1px solid lightGray;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
QFrame#AppFrame {
|
|
23
|
+
border: 1px solid black;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
QFrame#StatusFrame {
|
|
27
|
+
border: 1px solid red;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
QFrame#TabsFrame {
|
|
31
|
+
border: 1px solid red;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
QWidget#ManualPositions {
|
|
35
|
+
border: 0px solid green;
|
|
36
|
+
}
|
|
37
|
+
*/
|
|
38
|
+
|
|
39
|
+
/*
|
|
40
|
+
tabs_frame.setStyleSheet("border: 1px solid orange; ")
|
|
41
|
+
states_frame.setStyleSheet("border: 1px solid green; ")
|
|
42
|
+
positions_frame.setStyleSheet("border: 1px solid blue; ")
|
|
43
|
+
toolbar_widget.setStyleSheet("border: 1px solid black; ")
|
|
44
|
+
states_widget.setStyleSheet("border: 1px solid magenta; ")
|
|
45
|
+
user_positions_widget.setStyleSheet("border: 1px solid cyan; ")
|
|
46
|
+
mach_positions_widget.setStyleSheet("border: 1px solid cyan; ")
|
|
47
|
+
atcuator_length_widget.setStyleSheet("border: 1px solid cyan; ")
|
|
48
|
+
*/
|
egse/gui/switch.py
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
#!/usr/bin/python3
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
|
|
4
|
+
"""
|
|
5
|
+
A Switch button widget.
|
|
6
|
+
"""
|
|
7
|
+
import logging
|
|
8
|
+
import sys
|
|
9
|
+
|
|
10
|
+
from PyQt5.QtCore import QSize
|
|
11
|
+
from PyQt5.QtGui import QPainter
|
|
12
|
+
from PyQt5.QtSvg import QSvgRenderer
|
|
13
|
+
from PyQt5.QtWidgets import QWidget
|
|
14
|
+
|
|
15
|
+
from egse.config import find_dir
|
|
16
|
+
from egse.resource import get_resource
|
|
17
|
+
|
|
18
|
+
logger = logging.getLogger(__name__)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class Indic:
|
|
22
|
+
ON = 0
|
|
23
|
+
OFF = 1
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class Switch(QWidget):
|
|
27
|
+
|
|
28
|
+
def __init__(self, parent):
|
|
29
|
+
super().__init__(parent)
|
|
30
|
+
|
|
31
|
+
self.state = Indic.OFF
|
|
32
|
+
|
|
33
|
+
self.setMinimumSize(QSize(40, 40))
|
|
34
|
+
self.setMaximumSize(QSize(40, 40))
|
|
35
|
+
|
|
36
|
+
self.states = ["switch-on.svg", "switch-off.svg"]
|
|
37
|
+
|
|
38
|
+
def paintEvent(self, event):
|
|
39
|
+
painter = QPainter()
|
|
40
|
+
painter.begin(self)
|
|
41
|
+
self.drawCustomWidget(painter)
|
|
42
|
+
painter.end()
|
|
43
|
+
|
|
44
|
+
def drawCustomWidget(self, painter):
|
|
45
|
+
renderer = QSvgRenderer()
|
|
46
|
+
renderer.load(str(get_resource(f":/icons/{self.states[self.state]}")))
|
|
47
|
+
renderer.render(painter)
|
|
48
|
+
|
|
49
|
+
def setState(self, state):
|
|
50
|
+
self.state = state
|
|
51
|
+
self.repaint()
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
if __name__ == "__main__":
|
|
55
|
+
|
|
56
|
+
from PyQt5.QtWidgets import QApplication, QVBoxLayout, QHBoxLayout, QPushButton
|
|
57
|
+
|
|
58
|
+
class Example(QWidget):
|
|
59
|
+
def __init__(self):
|
|
60
|
+
super().__init__()
|
|
61
|
+
|
|
62
|
+
self.setGeometry(300, 300, 300, 200)
|
|
63
|
+
self.setWindowTitle("Switch widget")
|
|
64
|
+
|
|
65
|
+
self.initUI()
|
|
66
|
+
|
|
67
|
+
def initUI(self):
|
|
68
|
+
|
|
69
|
+
vbox = QVBoxLayout()
|
|
70
|
+
hbox = QHBoxLayout()
|
|
71
|
+
|
|
72
|
+
self.switch = Switch(self)
|
|
73
|
+
|
|
74
|
+
hbox.addWidget(self.switch)
|
|
75
|
+
vbox.addStretch(1)
|
|
76
|
+
vbox.addLayout(hbox)
|
|
77
|
+
vbox.addStretch(1)
|
|
78
|
+
|
|
79
|
+
hbox = QHBoxLayout()
|
|
80
|
+
|
|
81
|
+
self.pb1 = QPushButton("On", self)
|
|
82
|
+
self.pb2 = QPushButton("Off", self)
|
|
83
|
+
|
|
84
|
+
hbox.addWidget(self.pb1)
|
|
85
|
+
hbox.addWidget(self.pb2)
|
|
86
|
+
|
|
87
|
+
vbox.addLayout(hbox)
|
|
88
|
+
|
|
89
|
+
self.pb1.clicked.connect(self.onClick)
|
|
90
|
+
self.pb2.clicked.connect(self.onClick)
|
|
91
|
+
|
|
92
|
+
self.setLayout(vbox)
|
|
93
|
+
|
|
94
|
+
def onClick(self):
|
|
95
|
+
|
|
96
|
+
sender = self.sender()
|
|
97
|
+
text = sender.text()
|
|
98
|
+
|
|
99
|
+
print(text)
|
|
100
|
+
if text == "On":
|
|
101
|
+
self.switch.setState(Indic.ON)
|
|
102
|
+
elif text == "Off":
|
|
103
|
+
self.switch.setState(Indic.OFF)
|
|
104
|
+
|
|
105
|
+
app = QApplication([])
|
|
106
|
+
ex = Example()
|
|
107
|
+
ex.show()
|
|
108
|
+
sys.exit(app.exec_())
|