-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.py
80 lines (53 loc) · 1.72 KB
/
test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
import PyQt4.Qt as Qt
from epicsQt import epicsQt,epicsPoll,eLabel,eEdit,eIntSpin, eButtonGroup,\
eDoubleSpin,eButton, eCombo, eCheckBox, eLCD, eTextEdit
import sys, time
def choosePV(index):
mylabel.setPV(pvs[index])
if __name__=='__main__':
app = Qt.QApplication(sys.argv)
win = Qt.QWidget()
poll = epicsPoll()
pvs=[]
pvs.append(epicsQt('catest'))
pvs.append(epicsQt('cabo'))
layout = Qt.QVBoxLayout()
win.setLayout(layout)
label = Qt.QLabel('cawavec (waveform of char)', win)
layout.addWidget(label)
edit = eTextEdit(win, 'cawavec')
layout.addWidget(edit)
edit = eEdit(win, 'cawavec')
layout.addWidget(edit)
label = Qt.QLabel('dynamic PV assignment', win)
layout.addWidget(label)
combo = Qt.QComboBox()
combo.addItems(['catest','cabo'])
Qt.QObject.connect(combo, Qt.SIGNAL('activated(int)'),choosePV)
layout.addWidget(combo)
mylabel = eLabel(win)
layout.addWidget(mylabel)
label = Qt.QLabel('catest (ai)', win)
layout.addWidget(label)
edit = eEdit(win,'catest')
layout.addWidget(edit)
fspin2 = eDoubleSpin(win, 'catest')
layout.addWidget(fspin2)
fspin = eEdit(win, 'catest')
layout.addWidget(fspin)
lcd = eLCD(win, 'catest')
layout.addWidget(lcd)
label = Qt.QLabel('cabo (bo)', win)
layout.addWidget(label)
button = eCombo(win, 'cabo')
layout.addWidget(button)
check = eCheckBox(win, 'cabo')
check.setText('Auto Start')
layout.addWidget(check)
btngrp = eButtonGroup(win, 'cabo', h=False)
layout.addWidget(btngrp)
btn = eButton(win, 'cabo', (0, 1))
btn.setText('message button')
layout.addWidget(btn)
win.show()
sys.exit(app.exec_())