-
Notifications
You must be signed in to change notification settings - Fork 0
/
gui.py
1886 lines (1846 loc) · 120 KB
/
gui.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
import os
import sys
import copy
from math import gcd
from driver_config_macros import *
from data_capture_macros import *
from signal_generator_macros import *
from power_operation_macros import *
from capture_config_macros import *
from trig_config_macros import *
from data_processing_macros import *
from PyQt5 import QtCore, QtGui, QtWidgets
import matplotlib
matplotlib.use('Qt5Agg')
from matplotlib import pyplot as plt
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg
from matplotlib.figure import Figure
app_ = QtWidgets.QApplication(sys.argv)
w, h = app_.primaryScreen().size().width(), app_.primaryScreen().size().height()
#Screen Ratio Corrections
gcd_ = gcd(w, h)
resRatio = w/h
baseRatio = 16/9
wR = w/(gcd_*16) #Ratio Correction
hR = h/(gcd_*9) #Ratio Correction
widthRatio = 1#1/wR #Full Width Ratio Correction
heightRatio = 1#1/hR #Full Height Ratio Correction
app_.exit()
conditionList = {'conditionTab': [], 'extConditionLabel': [], 'aConditionLabel': [], 'bConditionLabel': [], 'cConditionLabel': [], 'dConditionLabel': [],
'aStateComboBox': [], 'bStateComboBox': [], 'cStateComboBox': [], 'dStateComboBox': [], 'extStateComboBox': [], 'stateLabel': []}
runList = {'runTab': [], 'stackedWidget': [], 'captureTab': []}
class Canvas(FigureCanvasQTAgg):
def __init__(self, parent=None, width=4.61*widthRatio, height=3.61*heightRatio, dpi=100):
fig, self.axes = plt.subplots(figsize=(width, height), dpi=dpi)
super().__init__(fig)
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(801*widthRatio, 580*heightRatio)
MainWindow.setMinimumSize(QtCore.QSize(801*widthRatio, 580*heightRatio))
MainWindow.setMaximumSize(QtCore.QSize(801*widthRatio, 580*heightRatio))
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(".\\icon.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
MainWindow.setWindowIcon(icon)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setEnabled(True)
self.centralwidget.setObjectName("centralwidget")
self.driverLabel = QtWidgets.QLabel(self.centralwidget)
self.driverLabel.setGeometry(QtCore.QRect(20*widthRatio, 10*heightRatio, 51*widthRatio, 21*heightRatio))
self.driverLabel.setObjectName("driverLabel")
self.presetComboBox = QtWidgets.QComboBox(self.centralwidget)
self.presetComboBox.setGeometry(QtCore.QRect(60*widthRatio, 40*heightRatio, 91*widthRatio, 22*heightRatio))
self.presetComboBox.setEditable(False)
self.presetComboBox.setObjectName("presetComboBox")
self.presetComboBox.addItem("")
self.presetLabel = QtWidgets.QLabel(self.centralwidget)
self.presetLabel.setGeometry(QtCore.QRect(20*widthRatio, 40*heightRatio, 41*widthRatio, 21*heightRatio))
self.presetLabel.setObjectName("presetLabel")
self.channelBox = QtWidgets.QGroupBox(self.centralwidget)
self.channelBox.setGeometry(QtCore.QRect(210*widthRatio, 0*heightRatio, 281*widthRatio, 121*heightRatio))
self.channelBox.setObjectName("channelBox")
self.aLabel = QtWidgets.QLabel(self.channelBox)
self.aLabel.setGeometry(QtCore.QRect(10*widthRatio, 30*heightRatio, 21*widthRatio, 16*heightRatio))
self.aLabel.setObjectName("aLabel")
self.bLabel = QtWidgets.QLabel(self.channelBox)
self.bLabel.setGeometry(QtCore.QRect(10*widthRatio, 50*heightRatio, 21*widthRatio, 16*heightRatio))
self.bLabel.setObjectName("bLabel")
self.cLabel = QtWidgets.QLabel(self.channelBox)
self.cLabel.setGeometry(QtCore.QRect(10*widthRatio, 70*heightRatio, 21*widthRatio, 16*heightRatio))
self.cLabel.setObjectName("cLabel")
self.dLabel = QtWidgets.QLabel(self.channelBox)
self.dLabel.setGeometry(QtCore.QRect(10*widthRatio, 90*heightRatio, 21*widthRatio, 16*heightRatio))
self.dLabel.setObjectName("dLabel")
self.aCheck = QtWidgets.QCheckBox(self.channelBox)
self.aCheck.setGeometry(QtCore.QRect(30*widthRatio, 30*heightRatio, 16*widthRatio, 17*heightRatio))
self.aCheck.setText("")
self.aCheck.setObjectName("aCheck")
self.bCheck = QtWidgets.QCheckBox(self.channelBox)
self.bCheck.setGeometry(QtCore.QRect(30*widthRatio, 50*heightRatio, 16*widthRatio, 17*heightRatio))
self.bCheck.setText("")
self.bCheck.setObjectName("bCheck")
self.cCheck = QtWidgets.QCheckBox(self.channelBox)
self.cCheck.setGeometry(QtCore.QRect(30*widthRatio, 70*heightRatio, 16*widthRatio, 17*heightRatio))
self.cCheck.setText("")
self.cCheck.setObjectName("cCheck")
self.dCheck = QtWidgets.QCheckBox(self.channelBox)
self.dCheck.setGeometry(QtCore.QRect(30*widthRatio, 90*heightRatio, 16*widthRatio, 17*heightRatio))
self.dCheck.setText("")
self.dCheck.setObjectName("dCheck")
self.aRangeComboBox = QtWidgets.QComboBox(self.channelBox)
self.aRangeComboBox.setGeometry(QtCore.QRect(60*widthRatio, 30*heightRatio, 69*widthRatio, 16*heightRatio))
self.aRangeComboBox.setObjectName("aRangeComboBox")
self.aRangeComboBox.addItem("")
self.aRangeComboBox.addItem("")
self.aRangeComboBox.addItem("")
self.aRangeComboBox.addItem("")
self.aRangeComboBox.addItem("")
self.aRangeComboBox.addItem("")
self.aRangeComboBox.addItem("")
self.aRangeComboBox.addItem("")
self.aRangeComboBox.addItem("")
self.aRangeComboBox.addItem("")
self.aRangeComboBox.addItem("")
self.aRangeComboBox.addItem("")
self.bRangeComboBox = QtWidgets.QComboBox(self.channelBox)
self.bRangeComboBox.setGeometry(QtCore.QRect(60*widthRatio, 50*heightRatio, 69*widthRatio, 16*heightRatio))
self.bRangeComboBox.setObjectName("bRangeComboBox")
self.bRangeComboBox.addItem("")
self.bRangeComboBox.addItem("")
self.bRangeComboBox.addItem("")
self.bRangeComboBox.addItem("")
self.bRangeComboBox.addItem("")
self.bRangeComboBox.addItem("")
self.bRangeComboBox.addItem("")
self.bRangeComboBox.addItem("")
self.bRangeComboBox.addItem("")
self.bRangeComboBox.addItem("")
self.bRangeComboBox.addItem("")
self.bRangeComboBox.addItem("")
self.cRangeComboBox = QtWidgets.QComboBox(self.channelBox)
self.cRangeComboBox.setGeometry(QtCore.QRect(60*widthRatio, 70*heightRatio, 69*widthRatio, 16*heightRatio))
self.cRangeComboBox.setObjectName("cRangeComboBox")
self.cRangeComboBox.addItem("")
self.cRangeComboBox.addItem("")
self.cRangeComboBox.addItem("")
self.cRangeComboBox.addItem("")
self.cRangeComboBox.addItem("")
self.cRangeComboBox.addItem("")
self.cRangeComboBox.addItem("")
self.cRangeComboBox.addItem("")
self.cRangeComboBox.addItem("")
self.cRangeComboBox.addItem("")
self.cRangeComboBox.addItem("")
self.cRangeComboBox.addItem("")
self.dRangeComboBox = QtWidgets.QComboBox(self.channelBox)
self.dRangeComboBox.setGeometry(QtCore.QRect(60*widthRatio, 90*heightRatio, 69*widthRatio, 16*heightRatio))
self.dRangeComboBox.setObjectName("dRangeComboBox")
self.dRangeComboBox.addItem("")
self.dRangeComboBox.addItem("")
self.dRangeComboBox.addItem("")
self.dRangeComboBox.addItem("")
self.dRangeComboBox.addItem("")
self.dRangeComboBox.addItem("")
self.dRangeComboBox.addItem("")
self.dRangeComboBox.addItem("")
self.dRangeComboBox.addItem("")
self.dRangeComboBox.addItem("")
self.dRangeComboBox.addItem("")
self.dRangeComboBox.addItem("")
self.aOffsetSpinBox = QtWidgets.QDoubleSpinBox(self.channelBox)
self.aOffsetSpinBox.setGeometry(QtCore.QRect(150*widthRatio, 30*heightRatio, 62*widthRatio, 16*heightRatio))
self.aOffsetSpinBox.setMaximum(999999.0)
self.aOffsetSpinBox.setObjectName("aOffsetSpinBox")
self.bOffsetSpinBox = QtWidgets.QDoubleSpinBox(self.channelBox)
self.bOffsetSpinBox.setGeometry(QtCore.QRect(150*widthRatio, 50*heightRatio, 62*widthRatio, 16*heightRatio))
self.bOffsetSpinBox.setMaximum(999999.0)
self.bOffsetSpinBox.setObjectName("bOffsetSpinBox")
self.cOffsetSpinBox = QtWidgets.QDoubleSpinBox(self.channelBox)
self.cOffsetSpinBox.setGeometry(QtCore.QRect(150*widthRatio, 70*heightRatio, 62*widthRatio, 16*heightRatio))
self.cOffsetSpinBox.setMaximum(999999.0)
self.cOffsetSpinBox.setObjectName("cOffsetSpinBox")
self.dOffsetSpinBox = QtWidgets.QDoubleSpinBox(self.channelBox)
self.dOffsetSpinBox.setGeometry(QtCore.QRect(150*widthRatio, 90*heightRatio, 62*widthRatio, 16*heightRatio))
self.dOffsetSpinBox.setMaximum(999999.0)
self.dOffsetSpinBox.setObjectName("dOffsetSpinBox")
self.rangeLabel = QtWidgets.QLabel(self.channelBox)
self.rangeLabel.setGeometry(QtCore.QRect(80*widthRatio, 10*heightRatio, 47*widthRatio, 13*heightRatio))
self.rangeLabel.setObjectName("rangeLabel")
self.offsetLabel = QtWidgets.QLabel(self.channelBox)
self.offsetLabel.setGeometry(QtCore.QRect(160*widthRatio, 10*heightRatio, 47*widthRatio, 13*heightRatio))
self.offsetLabel.setObjectName("offsetLabel")
self.couplingLabel = QtWidgets.QLabel(self.channelBox)
self.couplingLabel.setGeometry(QtCore.QRect(230*widthRatio, 10*heightRatio, 47*widthRatio, 13*heightRatio))
self.couplingLabel.setObjectName("couplingLabel")
self.aCouplingComboBox = QtWidgets.QComboBox(self.channelBox)
self.aCouplingComboBox.setGeometry(QtCore.QRect(230*widthRatio, 30*heightRatio, 41*widthRatio, 16*heightRatio))
self.aCouplingComboBox.setObjectName("aCouplingComboBox")
self.aCouplingComboBox.addItem("")
self.aCouplingComboBox.addItem("")
self.bCouplingComboBox = QtWidgets.QComboBox(self.channelBox)
self.bCouplingComboBox.setGeometry(QtCore.QRect(230*widthRatio, 50*heightRatio, 41*widthRatio, 16*heightRatio))
self.bCouplingComboBox.setObjectName("bCouplingComboBox")
self.bCouplingComboBox.addItem("")
self.bCouplingComboBox.addItem("")
self.cCouplingComboBox = QtWidgets.QComboBox(self.channelBox)
self.cCouplingComboBox.setGeometry(QtCore.QRect(230*widthRatio, 70*heightRatio, 41*widthRatio, 16*heightRatio))
self.cCouplingComboBox.setObjectName("cCouplingComboBox")
self.cCouplingComboBox.addItem("")
self.cCouplingComboBox.addItem("")
self.dCouplingComboBox = QtWidgets.QComboBox(self.channelBox)
self.dCouplingComboBox.setGeometry(QtCore.QRect(230*widthRatio, 90*heightRatio, 41*widthRatio, 16*heightRatio))
self.dCouplingComboBox.setObjectName("dCouplingComboBox")
self.dCouplingComboBox.addItem("")
self.dCouplingComboBox.addItem("")
self.captureBox = QtWidgets.QGroupBox(self.centralwidget)
self.captureBox.setGeometry(QtCore.QRect(500*widthRatio, 0*heightRatio, 291*widthRatio, 121*heightRatio))
self.captureBox.setObjectName("captureBox")
self.modeComboBox = QtWidgets.QComboBox(self.captureBox)
self.modeComboBox.setGeometry(QtCore.QRect(40*widthRatio, 20*heightRatio, 81*widthRatio, 22*heightRatio))
self.modeComboBox.setObjectName("modeComboBox")
self.modeComboBox.addItem("")
self.modeComboBox.addItem("")
self.modeComboBox.addItem("")
self.modeLabel = QtWidgets.QLabel(self.captureBox)
self.modeLabel.setGeometry(QtCore.QRect(10*widthRatio, 20*heightRatio, 31*widthRatio, 21*heightRatio))
self.modeLabel.setObjectName("modeLabel")
self.preTriggerSamplesLabel = QtWidgets.QLabel(self.captureBox)
self.preTriggerSamplesLabel.setGeometry(QtCore.QRect(130*widthRatio, 50*heightRatio, 101*widthRatio, 16*heightRatio))
self.preTriggerSamplesLabel.setObjectName("preTriggerSamplesLabel")
self.postTriggerSamplesLabel = QtWidgets.QLabel(self.captureBox)
self.postTriggerSamplesLabel.setGeometry(QtCore.QRect(130*widthRatio, 70*heightRatio, 101*widthRatio, 16*heightRatio))
self.postTriggerSamplesLabel.setObjectName("postTriggerSamplesLabel")
self.preTriggerSamplesSpinBox = QtWidgets.QSpinBox(self.captureBox)
self.preTriggerSamplesSpinBox.setEnabled(True)
self.preTriggerSamplesSpinBox.setGeometry(QtCore.QRect(231*widthRatio, 50*heightRatio, 51*widthRatio, 16*heightRatio))
self.preTriggerSamplesSpinBox.setAutoFillBackground(False)
self.preTriggerSamplesSpinBox.setReadOnly(False)
self.preTriggerSamplesSpinBox.setProperty("showGroupSeparator", False)
self.preTriggerSamplesSpinBox.setMaximum(999999)
self.preTriggerSamplesSpinBox.setObjectName("preTriggerSamplesSpinBox")
self.postTriggerSamplesSpinBox = QtWidgets.QSpinBox(self.captureBox)
self.postTriggerSamplesSpinBox.setGeometry(QtCore.QRect(231*widthRatio, 70*heightRatio, 51*widthRatio, 16*heightRatio))
self.postTriggerSamplesSpinBox.setMaximum(999999)
self.postTriggerSamplesSpinBox.setObjectName("postTriggerSamplesSpinBox")
self.timebaseLabel = QtWidgets.QLabel(self.captureBox)
self.timebaseLabel.setGeometry(QtCore.QRect(10*widthRatio, 50*heightRatio, 47*widthRatio, 13*heightRatio))
self.timebaseLabel.setObjectName("timebaseLabel")
self.timebaseSpinBox = QtWidgets.QSpinBox(self.captureBox)
self.timebaseSpinBox.setGeometry(QtCore.QRect(60*widthRatio, 50*heightRatio, 42*widthRatio, 16*heightRatio))
self.timebaseSpinBox.setMaximum(999999)
self.timebaseSpinBox.setObjectName("timebaseSpinBox")
self.segmentsLabel = QtWidgets.QLabel(self.captureBox)
self.segmentsLabel.setGeometry(QtCore.QRect(10*widthRatio, 70*heightRatio, 47*widthRatio, 13*heightRatio))
self.segmentsLabel.setObjectName("segmentsLabel")
self.capturesLabel = QtWidgets.QLabel(self.captureBox)
self.capturesLabel.setGeometry(QtCore.QRect(10*widthRatio, 90*heightRatio, 47*widthRatio, 13*heightRatio))
self.capturesLabel.setObjectName("capturesLabel")
self.segmentsSpinBox = QtWidgets.QSpinBox(self.captureBox)
self.segmentsSpinBox.setGeometry(QtCore.QRect(60*widthRatio, 70*heightRatio, 42*widthRatio, 16*heightRatio))
self.segmentsSpinBox.setMaximum(999999)
self.segmentsSpinBox.setObjectName("segmentsSpinBox")
self.capturesSpinBox = QtWidgets.QSpinBox(self.captureBox)
self.capturesSpinBox.setGeometry(QtCore.QRect(60*widthRatio, 90*heightRatio, 42*widthRatio, 16*heightRatio))
self.capturesSpinBox.setMaximum(999999)
self.capturesSpinBox.setObjectName("capturesSpinBox")
self.timeUnitsLabel = QtWidgets.QLabel(self.captureBox)
self.timeUnitsLabel.setGeometry(QtCore.QRect(130*widthRatio, 30*heightRatio, 71*widthRatio, 16*heightRatio))
self.timeUnitsLabel.setObjectName("timeUnitsLabel")
self.totalRuntimeLabel = QtWidgets.QLabel(self.captureBox)
self.totalRuntimeLabel.setGeometry(QtCore.QRect(130*widthRatio, 10*heightRatio, 81*widthRatio, 16*heightRatio))
self.totalRuntimeLabel.setObjectName("totalRuntimeLabel")
self.totalRuntimeSpinBox = QtWidgets.QSpinBox(self.captureBox)
self.totalRuntimeSpinBox.setGeometry(QtCore.QRect(201*widthRatio, 10*heightRatio, 81*widthRatio, 16*heightRatio))
self.totalRuntimeSpinBox.setMaximum(999999999)
self.totalRuntimeSpinBox.setObjectName("totalRuntimeSpinBox")
self.timeUnitsComboBox = QtWidgets.QComboBox(self.captureBox)
self.timeUnitsComboBox.setGeometry(QtCore.QRect(210*widthRatio, 30*heightRatio, 69*widthRatio, 16*heightRatio))
self.timeUnitsComboBox.setObjectName("timeUnitsComboBox")
self.timeUnitsComboBox.addItem("")
self.timeUnitsComboBox.addItem("")
self.timeUnitsComboBox.addItem("")
self.timeUnitsComboBox.addItem("")
self.timeUnitsComboBox.addItem("")
self.timeUnitsComboBox.addItem("")
self.samplesPerBufferLabel = QtWidgets.QLabel(self.captureBox)
self.samplesPerBufferLabel.setGeometry(QtCore.QRect(130*widthRatio, 90*heightRatio, 101*widthRatio, 16*heightRatio))
self.samplesPerBufferLabel.setObjectName("samplesPerBufferLabel")
self.samplesPerBufferSpinBox = QtWidgets.QSpinBox(self.captureBox)
self.samplesPerBufferSpinBox.setGeometry(QtCore.QRect(231*widthRatio, 90*heightRatio, 51*widthRatio, 16*heightRatio))
self.samplesPerBufferSpinBox.setMaximum(999999)
self.samplesPerBufferSpinBox.setObjectName("samplesPerBufferSpinBox")
self.driverLineEdit = QtWidgets.QLineEdit(self.centralwidget)
self.driverLineEdit.setGeometry(QtCore.QRect(60*widthRatio, 10*heightRatio, 71*widthRatio, 22*heightRatio))
self.driverLineEdit.setReadOnly(True)
self.driverLineEdit.setObjectName("driverLineEdit")
self.outFileCheckBox = QtWidgets.QCheckBox(self.centralwidget)
self.outFileCheckBox.setGeometry(QtCore.QRect(30*widthRatio, 80*heightRatio, 81*widthRatio, 17*heightRatio))
self.outFileCheckBox.setObjectName("outFileCheckBox")
self.outFileNameLineEdit = QtWidgets.QLineEdit(self.centralwidget)
self.outFileNameLineEdit.setGeometry(QtCore.QRect(30*widthRatio, 100*heightRatio, 113*widthRatio, 20*heightRatio))
self.outFileNameLineEdit.setObjectName("outFileNameLineEdit")
self.triggerBox = QtWidgets.QGroupBox(self.centralwidget)
self.triggerBox.setGeometry(QtCore.QRect(500*widthRatio, 130*heightRatio, 291*widthRatio, 391*heightRatio))
self.triggerBox.setObjectName("triggerBox")
self.triggerTypeLabel = QtWidgets.QLabel(self.triggerBox)
self.triggerTypeLabel.setGeometry(QtCore.QRect(10*widthRatio, 20*heightRatio, 47*widthRatio, 16*heightRatio))
self.triggerTypeLabel.setObjectName("triggerTypeLabel")
self.triggerTypeComboBox = QtWidgets.QComboBox(self.triggerBox)
self.triggerTypeComboBox.setGeometry(QtCore.QRect(40*widthRatio, 20*heightRatio, 69*widthRatio, 21*heightRatio))
self.triggerTypeComboBox.setObjectName("triggerTypeComboBox")
self.triggerTypeComboBox.addItem("")
self.triggerTypeComboBox.addItem("")
self.aAutotriggerSpinBox = QtWidgets.QSpinBox(self.triggerBox)
self.aAutotriggerSpinBox.setGeometry(QtCore.QRect(231*widthRatio, 10*heightRatio, 51*widthRatio, 16*heightRatio))
self.aAutotriggerSpinBox.setMaximum(999999)
self.aAutotriggerSpinBox.setObjectName("aAutotriggerSpinBox")
self.aDelaySpinBox = QtWidgets.QSpinBox(self.triggerBox)
self.aDelaySpinBox.setGeometry(QtCore.QRect(231*widthRatio, 30*heightRatio, 51*widthRatio, 16*heightRatio))
self.aDelaySpinBox.setMaximum(999999)
self.aDelaySpinBox.setObjectName("aDelaySpinBox")
self.triggerAutotriggerLabel = QtWidgets.QLabel(self.triggerBox)
self.triggerAutotriggerLabel.setGeometry(QtCore.QRect(160*widthRatio, 10*heightRatio, 71*widthRatio, 21*heightRatio))
self.triggerAutotriggerLabel.setObjectName("triggerAutotriggerLabel")
self.triggerDelayLabel = QtWidgets.QLabel(self.triggerBox)
self.triggerDelayLabel.setGeometry(QtCore.QRect(190*widthRatio, 30*heightRatio, 41*widthRatio, 16*heightRatio))
self.triggerDelayLabel.setObjectName("triggerDelayLabel")
self.cUpperThresholdSpinBox = QtWidgets.QSpinBox(self.triggerBox)
self.cUpperThresholdSpinBox.setGeometry(QtCore.QRect(51*widthRatio, 120*heightRatio, 51*widthRatio, 16*heightRatio))
self.cUpperThresholdSpinBox.setMaximum(32512)
self.cUpperThresholdSpinBox.setObjectName("cUpperThresholdSpinBox")
self.dUpperThresholdSpinBox = QtWidgets.QSpinBox(self.triggerBox)
self.dUpperThresholdSpinBox.setGeometry(QtCore.QRect(51*widthRatio, 140*heightRatio, 51*widthRatio, 16*heightRatio))
self.dUpperThresholdSpinBox.setMaximum(32512)
self.dUpperThresholdSpinBox.setObjectName("dUpperThresholdSpinBox")
self.aUpperThresholdSpinBox = QtWidgets.QSpinBox(self.triggerBox)
self.aUpperThresholdSpinBox.setGeometry(QtCore.QRect(51*widthRatio, 80*heightRatio, 51*widthRatio, 16*heightRatio))
self.aUpperThresholdSpinBox.setMaximum(32512)
self.aUpperThresholdSpinBox.setObjectName("aUpperThresholdSpinBox")
self.cTriggerCheck = QtWidgets.QCheckBox(self.triggerBox)
self.cTriggerCheck.setGeometry(QtCore.QRect(30*widthRatio, 120*heightRatio, 16*widthRatio, 17*heightRatio))
self.cTriggerCheck.setText("")
self.cTriggerCheck.setObjectName("cTriggerCheck")
self.aTriggerCheck = QtWidgets.QCheckBox(self.triggerBox)
self.aTriggerCheck.setGeometry(QtCore.QRect(30*widthRatio, 80*heightRatio, 16*widthRatio, 17*heightRatio))
self.aTriggerCheck.setText("")
self.aTriggerCheck.setObjectName("aTriggerCheck")
self.bTriggerLabel = QtWidgets.QLabel(self.triggerBox)
self.bTriggerLabel.setGeometry(QtCore.QRect(10*widthRatio, 100*heightRatio, 16*widthRatio, 16*heightRatio))
self.bTriggerLabel.setObjectName("bTriggerLabel")
self.bUpperThresholdSpinBox = QtWidgets.QSpinBox(self.triggerBox)
self.bUpperThresholdSpinBox.setGeometry(QtCore.QRect(51*widthRatio, 100*heightRatio, 51*widthRatio, 16*heightRatio))
self.bUpperThresholdSpinBox.setMaximum(32512)
self.bUpperThresholdSpinBox.setObjectName("bUpperThresholdSpinBox")
self.aTriggerLabel = QtWidgets.QLabel(self.triggerBox)
self.aTriggerLabel.setGeometry(QtCore.QRect(10*widthRatio, 80*heightRatio, 16*widthRatio, 16*heightRatio))
self.aTriggerLabel.setObjectName("aTriggerLabel")
self.cTriggerLabel = QtWidgets.QLabel(self.triggerBox)
self.cTriggerLabel.setGeometry(QtCore.QRect(10*widthRatio, 120*heightRatio, 16*widthRatio, 16*heightRatio))
self.cTriggerLabel.setObjectName("cTriggerLabel")
self.dTriggerCheck = QtWidgets.QCheckBox(self.triggerBox)
self.dTriggerCheck.setGeometry(QtCore.QRect(30*widthRatio, 140*heightRatio, 16*widthRatio, 17*heightRatio))
self.dTriggerCheck.setText("")
self.dTriggerCheck.setObjectName("dTriggerCheck")
self.triggerUpperThresholdLabel = QtWidgets.QLabel(self.triggerBox)
self.triggerUpperThresholdLabel.setGeometry(QtCore.QRect(50*widthRatio, 50*heightRatio, 51*widthRatio, 31*heightRatio))
self.triggerUpperThresholdLabel.setWordWrap(True)
self.triggerUpperThresholdLabel.setObjectName("triggerUpperThresholdLabel")
self.dTriggerLabel = QtWidgets.QLabel(self.triggerBox)
self.dTriggerLabel.setGeometry(QtCore.QRect(10*widthRatio, 140*heightRatio, 16*widthRatio, 16*heightRatio))
self.dTriggerLabel.setObjectName("dTriggerLabel")
self.bTriggerCheck = QtWidgets.QCheckBox(self.triggerBox)
self.bTriggerCheck.setGeometry(QtCore.QRect(30*widthRatio, 100*heightRatio, 16*widthRatio, 17*heightRatio))
self.bTriggerCheck.setText("")
self.bTriggerCheck.setObjectName("bTriggerCheck")
self.deleteConditionButton = QtWidgets.QPushButton(self.triggerBox)
self.deleteConditionButton.setGeometry(QtCore.QRect(100*widthRatio, 340*heightRatio, 91*widthRatio, 23*heightRatio))
self.deleteConditionButton.setObjectName("deleteConditionButton")
self.newConditionButton = QtWidgets.QPushButton(self.triggerBox)
self.newConditionButton.setGeometry(QtCore.QRect(10*widthRatio, 340*heightRatio, 81*widthRatio, 21*heightRatio))
self.newConditionButton.setObjectName("newConditionButton")
self.conditionsTabWidget = QtWidgets.QTabWidget(self.triggerBox)
self.conditionsTabWidget.setEnabled(True)
self.conditionsTabWidget.setGeometry(QtCore.QRect(10*widthRatio, 180*heightRatio, 121*widthRatio, 151*heightRatio))
self.conditionsTabWidget.setObjectName("conditionsTabWidget")
self.newCondition()
self.dUpperHysteresisSpinBox = QtWidgets.QSpinBox(self.triggerBox)
self.dUpperHysteresisSpinBox.setGeometry(QtCore.QRect(111*widthRatio, 140*heightRatio, 51*widthRatio, 16*heightRatio))
self.dUpperHysteresisSpinBox.setMaximum(32512)
self.dUpperHysteresisSpinBox.setObjectName("dUpperHysteresisSpinBox")
self.bUpperHysteresisSpinBox = QtWidgets.QSpinBox(self.triggerBox)
self.bUpperHysteresisSpinBox.setGeometry(QtCore.QRect(111*widthRatio, 100*heightRatio, 51*widthRatio, 16*heightRatio))
self.bUpperHysteresisSpinBox.setMaximum(32512)
self.bUpperHysteresisSpinBox.setObjectName("bUpperHysteresisSpinBox")
self.triggerUpperHysteresisLabel = QtWidgets.QLabel(self.triggerBox)
self.triggerUpperHysteresisLabel.setGeometry(QtCore.QRect(110*widthRatio, 50*heightRatio, 51*widthRatio, 31*heightRatio))
self.triggerUpperHysteresisLabel.setWordWrap(True)
self.triggerUpperHysteresisLabel.setObjectName("triggerUpperHysteresisLabel")
self.aUpperHysteresisSpinBox = QtWidgets.QSpinBox(self.triggerBox)
self.aUpperHysteresisSpinBox.setGeometry(QtCore.QRect(111*widthRatio, 80*heightRatio, 51*widthRatio, 16*heightRatio))
self.aUpperHysteresisSpinBox.setMaximum(32512)
self.aUpperHysteresisSpinBox.setObjectName("aUpperHysteresisSpinBox")
self.cUpperHysteresisSpinBox = QtWidgets.QSpinBox(self.triggerBox)
self.cUpperHysteresisSpinBox.setGeometry(QtCore.QRect(111*widthRatio, 120*heightRatio, 51*widthRatio, 16*heightRatio))
self.cUpperHysteresisSpinBox.setMaximum(32512)
self.cUpperHysteresisSpinBox.setObjectName("cUpperHysteresisSpinBox")
self.dLowerThresholdSpinBox = QtWidgets.QSpinBox(self.triggerBox)
self.dLowerThresholdSpinBox.setGeometry(QtCore.QRect(171*widthRatio, 140*heightRatio, 51*widthRatio, 16*heightRatio))
self.dLowerThresholdSpinBox.setMaximum(32512)
self.dLowerThresholdSpinBox.setObjectName("dLowerThresholdSpinBox")
self.dLowerHysteresisSpinBox = QtWidgets.QSpinBox(self.triggerBox)
self.dLowerHysteresisSpinBox.setGeometry(QtCore.QRect(231*widthRatio, 140*heightRatio, 51*widthRatio, 16*heightRatio))
self.dLowerHysteresisSpinBox.setMaximum(32512)
self.dLowerHysteresisSpinBox.setObjectName("dLowerHysteresisSpinBox")
self.triggerLowerHysteresisLabel = QtWidgets.QLabel(self.triggerBox)
self.triggerLowerHysteresisLabel.setGeometry(QtCore.QRect(230*widthRatio, 50*heightRatio, 51*widthRatio, 31*heightRatio))
self.triggerLowerHysteresisLabel.setWordWrap(True)
self.triggerLowerHysteresisLabel.setObjectName("triggerLowerHysteresisLabel")
self.aLowerHysteresisSpinBox = QtWidgets.QSpinBox(self.triggerBox)
self.aLowerHysteresisSpinBox.setGeometry(QtCore.QRect(231*widthRatio, 80*heightRatio, 51*widthRatio, 16*heightRatio))
self.aLowerHysteresisSpinBox.setMaximum(32512)
self.aLowerHysteresisSpinBox.setObjectName("aLowerHysteresisSpinBox")
self.bLowerThresholdSpinBox = QtWidgets.QSpinBox(self.triggerBox)
self.bLowerThresholdSpinBox.setGeometry(QtCore.QRect(171*widthRatio, 100*heightRatio, 51*widthRatio, 16*heightRatio))
self.bLowerThresholdSpinBox.setMaximum(32512)
self.bLowerThresholdSpinBox.setObjectName("bLowerThresholdSpinBox")
self.bLowerHysteresisSpinBox = QtWidgets.QSpinBox(self.triggerBox)
self.bLowerHysteresisSpinBox.setGeometry(QtCore.QRect(231*widthRatio, 100*heightRatio, 51*widthRatio, 16*heightRatio))
self.bLowerHysteresisSpinBox.setMaximum(32512)
self.bLowerHysteresisSpinBox.setObjectName("bLowerHysteresisSpinBox")
self.cLowerHysteresisSpinBox = QtWidgets.QSpinBox(self.triggerBox)
self.cLowerHysteresisSpinBox.setGeometry(QtCore.QRect(231*widthRatio, 120*heightRatio, 51*widthRatio, 16*heightRatio))
self.cLowerHysteresisSpinBox.setMaximum(32512)
self.cLowerHysteresisSpinBox.setObjectName("cLowerHysteresisSpinBox")
self.triggerLowerThresholdLabel = QtWidgets.QLabel(self.triggerBox)
self.triggerLowerThresholdLabel.setGeometry(QtCore.QRect(170*widthRatio, 50*heightRatio, 51*widthRatio, 31*heightRatio))
self.triggerLowerThresholdLabel.setWordWrap(True)
self.triggerLowerThresholdLabel.setObjectName("triggerLowerThresholdLabel")
self.aLowerThresholdSpinBox = QtWidgets.QSpinBox(self.triggerBox)
self.aLowerThresholdSpinBox.setGeometry(QtCore.QRect(171*widthRatio, 80*heightRatio, 51*widthRatio, 16*heightRatio))
self.aLowerThresholdSpinBox.setMaximum(32512)
self.aLowerThresholdSpinBox.setObjectName("aLowerThresholdSpinBox")
self.cLowerThresholdSpinBox = QtWidgets.QSpinBox(self.triggerBox)
self.cLowerThresholdSpinBox.setGeometry(QtCore.QRect(171*widthRatio, 120*heightRatio, 51*widthRatio, 16*heightRatio))
self.cLowerThresholdSpinBox.setMaximum(32512)
self.cLowerThresholdSpinBox.setObjectName("cLowerThresholdSpinBox")
self.extTriggerLabel = QtWidgets.QLabel(self.triggerBox)
self.extTriggerLabel.setGeometry(QtCore.QRect(10*widthRatio, 160*heightRatio, 16*widthRatio, 16*heightRatio))
self.extTriggerLabel.setObjectName("extTriggerLabel")
self.extTriggerCheck = QtWidgets.QCheckBox(self.triggerBox)
self.extTriggerCheck.setGeometry(QtCore.QRect(30*widthRatio, 160*heightRatio, 16*widthRatio, 17*heightRatio))
self.extTriggerCheck.setText("")
self.extTriggerCheck.setObjectName("extTriggerCheck")
self.extUpperThresholdSpinBox = QtWidgets.QSpinBox(self.triggerBox)
self.extUpperThresholdSpinBox.setGeometry(QtCore.QRect(51*widthRatio, 160*heightRatio, 51*widthRatio, 16*heightRatio))
self.extUpperThresholdSpinBox.setMaximum(32767)
self.extUpperThresholdSpinBox.setObjectName("extUpperThresholdSpinBox")
self.extUpperHysteresisSpinBox = QtWidgets.QSpinBox(self.triggerBox)
self.extUpperHysteresisSpinBox.setGeometry(QtCore.QRect(111*widthRatio, 160*heightRatio, 51*widthRatio, 16*heightRatio))
self.extUpperHysteresisSpinBox.setMaximum(32767)
self.extUpperHysteresisSpinBox.setObjectName("extUpperHysteresisSpinBox")
self.extLowerThresholdSpinBox = QtWidgets.QSpinBox(self.triggerBox)
self.extLowerThresholdSpinBox.setGeometry(QtCore.QRect(171*widthRatio, 160*heightRatio, 51*widthRatio, 16*heightRatio))
self.extLowerThresholdSpinBox.setMaximum(32767)
self.extLowerThresholdSpinBox.setObjectName("extLowerThresholdSpinBox")
self.extLowerHysteresisSpinBox = QtWidgets.QSpinBox(self.triggerBox)
self.extLowerHysteresisSpinBox.setGeometry(QtCore.QRect(231*widthRatio, 160*heightRatio, 51*widthRatio, 16*heightRatio))
self.extLowerHysteresisSpinBox.setMaximum(32767)
self.extLowerHysteresisSpinBox.setObjectName("extLowerHysteresisSpinBox")
self.triggerDirectionLabel = QtWidgets.QLabel(self.triggerBox)
self.triggerDirectionLabel.setGeometry(QtCore.QRect(140*widthRatio, 200*heightRatio, 47*widthRatio, 21*heightRatio))
self.triggerDirectionLabel.setObjectName("triggerDirectionLabel")
self.aThresholdModeComboBox = QtWidgets.QComboBox(self.triggerBox)
self.aThresholdModeComboBox.setGeometry(QtCore.QRect(220*widthRatio, 220*heightRatio, 61*widthRatio, 16*heightRatio))
self.aThresholdModeComboBox.setObjectName("aThresholdModeComboBox")
self.aThresholdModeComboBox.addItem("")
self.aThresholdModeComboBox.addItem("")
self.bDirectionComboBox = QtWidgets.QComboBox(self.triggerBox)
self.bDirectionComboBox.setGeometry(QtCore.QRect(140*widthRatio, 240*heightRatio, 71*widthRatio, 16*heightRatio))
self.bDirectionComboBox.setObjectName("bDirectionComboBox")
self.bDirectionComboBox.addItem("")
self.bDirectionComboBox.addItem("")
self.bDirectionComboBox.addItem("")
self.bDirectionComboBox.addItem("")
self.bDirectionComboBox.addItem("")
self.bDirectionComboBox.addItem("")
self.bDirectionComboBox.addItem("")
self.bDirectionComboBox.addItem("")
self.bDirectionComboBox.addItem("")
self.bDirectionComboBox.addItem("")
self.bDirectionComboBox.addItem("")
self.extDirectionComboBox = QtWidgets.QComboBox(self.triggerBox)
self.extDirectionComboBox.setGeometry(QtCore.QRect(140*widthRatio, 300*heightRatio, 71*widthRatio, 16*heightRatio))
self.extDirectionComboBox.setObjectName("extDirectionComboBox")
self.extDirectionComboBox.addItem("")
self.extDirectionComboBox.addItem("")
self.extDirectionComboBox.addItem("")
self.extDirectionComboBox.addItem("")
self.extDirectionComboBox.addItem("")
self.extDirectionComboBox.addItem("")
self.extDirectionComboBox.addItem("")
self.extDirectionComboBox.addItem("")
self.extDirectionComboBox.addItem("")
self.extDirectionComboBox.addItem("")
self.extDirectionComboBox.addItem("")
self.dDirectionComboBox = QtWidgets.QComboBox(self.triggerBox)
self.dDirectionComboBox.setGeometry(QtCore.QRect(140*widthRatio, 280*heightRatio, 71*widthRatio, 16*heightRatio))
self.dDirectionComboBox.setObjectName("dDirectionComboBox")
self.dDirectionComboBox.addItem("")
self.dDirectionComboBox.addItem("")
self.dDirectionComboBox.addItem("")
self.dDirectionComboBox.addItem("")
self.dDirectionComboBox.addItem("")
self.dDirectionComboBox.addItem("")
self.dDirectionComboBox.addItem("")
self.dDirectionComboBox.addItem("")
self.dDirectionComboBox.addItem("")
self.dDirectionComboBox.addItem("")
self.dDirectionComboBox.addItem("")
self.thresholdModeLabel = QtWidgets.QLabel(self.triggerBox)
self.thresholdModeLabel.setGeometry(QtCore.QRect(220*widthRatio, 200*heightRatio, 47*widthRatio, 21*heightRatio))
self.thresholdModeLabel.setObjectName("thresholdModeLabel")
self.cDirectionComboBox = QtWidgets.QComboBox(self.triggerBox)
self.cDirectionComboBox.setGeometry(QtCore.QRect(140*widthRatio, 260*heightRatio, 71*widthRatio, 16*heightRatio))
self.cDirectionComboBox.setObjectName("cDirectionComboBox")
self.cDirectionComboBox.addItem("")
self.cDirectionComboBox.addItem("")
self.cDirectionComboBox.addItem("")
self.cDirectionComboBox.addItem("")
self.cDirectionComboBox.addItem("")
self.cDirectionComboBox.addItem("")
self.cDirectionComboBox.addItem("")
self.cDirectionComboBox.addItem("")
self.cDirectionComboBox.addItem("")
self.cDirectionComboBox.addItem("")
self.cDirectionComboBox.addItem("")
self.aDirectionComboBox = QtWidgets.QComboBox(self.triggerBox)
self.aDirectionComboBox.setGeometry(QtCore.QRect(140*widthRatio, 220*heightRatio, 71*widthRatio, 16*heightRatio))
self.aDirectionComboBox.setObjectName("aDirectionComboBox")
self.aDirectionComboBox.addItem("")
self.aDirectionComboBox.addItem("")
self.aDirectionComboBox.addItem("")
self.aDirectionComboBox.addItem("")
self.aDirectionComboBox.addItem("")
self.aDirectionComboBox.addItem("")
self.aDirectionComboBox.addItem("")
self.aDirectionComboBox.addItem("")
self.aDirectionComboBox.addItem("")
self.aDirectionComboBox.addItem("")
self.aDirectionComboBox.addItem("")
self.dThresholdModeComboBox = QtWidgets.QComboBox(self.triggerBox)
self.dThresholdModeComboBox.setGeometry(QtCore.QRect(220*widthRatio, 280*heightRatio, 61*widthRatio, 16*heightRatio))
self.dThresholdModeComboBox.setObjectName("dThresholdModeComboBox")
self.dThresholdModeComboBox.addItem("")
self.dThresholdModeComboBox.addItem("")
self.bThresholdModeComboBox = QtWidgets.QComboBox(self.triggerBox)
self.bThresholdModeComboBox.setGeometry(QtCore.QRect(220*widthRatio, 240*heightRatio, 61*widthRatio, 16*heightRatio))
self.bThresholdModeComboBox.setObjectName("bThresholdModeComboBox")
self.bThresholdModeComboBox.addItem("")
self.bThresholdModeComboBox.addItem("")
self.extThresholdModeComboBox = QtWidgets.QComboBox(self.triggerBox)
self.extThresholdModeComboBox.setGeometry(QtCore.QRect(220*widthRatio, 300*heightRatio, 61*widthRatio, 16*heightRatio))
self.extThresholdModeComboBox.setObjectName("extThresholdModeComboBox")
self.extThresholdModeComboBox.addItem("")
self.extThresholdModeComboBox.addItem("")
self.cThresholdModeComboBox = QtWidgets.QComboBox(self.triggerBox)
self.cThresholdModeComboBox.setGeometry(QtCore.QRect(220*widthRatio, 260*heightRatio, 61*widthRatio, 16*heightRatio))
self.cThresholdModeComboBox.setObjectName("cThresholdModeComboBox")
self.cThresholdModeComboBox.addItem("")
self.cThresholdModeComboBox.addItem("")
self.runButton = QtWidgets.QPushButton(self.centralwidget)
self.runButton.setGeometry(QtCore.QRect(720*widthRatio, 530*heightRatio, 75*widthRatio, 23*heightRatio))
self.runButton.setObjectName("runButton")
self.runsLabel = QtWidgets.QLabel(self.centralwidget)
self.runsLabel.setGeometry(QtCore.QRect(120*widthRatio, 70*heightRatio, 47*widthRatio, 16*heightRatio))
self.runsLabel.setObjectName("runsLabel")
self.runsSpinBox = QtWidgets.QSpinBox(self.centralwidget)
self.runsSpinBox.setGeometry(QtCore.QRect(160*widthRatio, 70*heightRatio, 42*widthRatio, 16*heightRatio))
self.runsSpinBox.setObjectName("runsSpinBox")
self.runsSpinBox.setMaximum(999999999)
self.tabWidget = QtWidgets.QTabWidget(self.centralwidget)
self.tabWidget.setGeometry(QtCore.QRect(20*widthRatio, 130*heightRatio, 471*widthRatio, 391*heightRatio))
self.tabWidget.setObjectName("tabWidget")
runList['runTab'].append(QtWidgets.QWidget())
runList['runTab'][-1].setObjectName("run_1")
runList['stackedWidget'].append(QtWidgets.QStackedWidget(runList['runTab'][-1]))
runList['stackedWidget'][-1].setGeometry(QtCore.QRect(0*widthRatio, 0*heightRatio, 461*widthRatio, 361*heightRatio))
runList['stackedWidget'][-1].setObjectName("stackedWidget_1")
self.tabWidget.addTab(runList['runTab'][-1], "")
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtWidgets.QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0*widthRatio, 0*heightRatio, 801*widthRatio, 21*heightRatio))
self.menubar.setObjectName("menubar")
self.menuPreset = QtWidgets.QMenu(self.menubar)
self.menuPreset.setObjectName("menuPreset")
MainWindow.setMenuBar(self.menubar)
self.actionLoad_Preset = QtWidgets.QAction(MainWindow)
self.actionLoad_Preset.setObjectName("actionLoad_Preset")
self.actionSave_Preset = QtWidgets.QAction(MainWindow)
self.actionSave_Preset.setObjectName("actionSave_Preset")
self.menuPreset.addAction(self.actionSave_Preset)
self.menuPreset.addAction(self.actionLoad_Preset)
self.menubar.addAction(self.menuPreset.menuAction())
self.nextPushButton = QtWidgets.QPushButton(self.centralwidget)
self.nextPushButton.setGeometry(QtCore.QRect(260*widthRatio, 530*heightRatio, 75*widthRatio, 23*heightRatio))
self.nextPushButton.setObjectName("nextPushButton")
self.pageNumLineEdit = QtWidgets.QLineEdit(self.centralwidget)
self.pageNumLineEdit.setGeometry(QtCore.QRect(232*widthRatio, 531*heightRatio, 21*widthRatio, 20*heightRatio))
self.pageNumLineEdit.setObjectName("pageNumLineEdit")
self.previousPushButton = QtWidgets.QPushButton(self.centralwidget)
self.previousPushButton.setGeometry(QtCore.QRect(150*widthRatio, 530*heightRatio, 75*widthRatio, 23*heightRatio))
self.previousPushButton.setObjectName("previousPushButton")
self.graphCheck = QtWidgets.QCheckBox(self.centralwidget)
self.graphCheck.setGeometry(QtCore.QRect(650*widthRatio, 530*heightRatio, 70*widthRatio, 21*heightRatio))
self.graphCheck.setObjectName("graphCheck")
self.retranslateUi(MainWindow)
self.conditionsTabWidget.setCurrentIndex(0)
self.tabWidget.setCurrentIndex(0)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "Logger"))
self.driverLabel.setText(_translate("MainWindow", "Driver"))
self.presetComboBox.setItemText(0, _translate("MainWindow", "Manual"))
self.presetLabel.setText(_translate("MainWindow", "Preset"))
self.channelBox.setTitle(_translate("MainWindow", "Channels"))
self.aLabel.setText(_translate("MainWindow", "A"))
self.bLabel.setText(_translate("MainWindow", "B"))
self.cLabel.setText(_translate("MainWindow", "C"))
self.dLabel.setText(_translate("MainWindow", "D"))
self.aRangeComboBox.setItemText(0, _translate("MainWindow", "10 mV"))
self.aRangeComboBox.setItemText(1, _translate("MainWindow", "20 mV"))
self.aRangeComboBox.setItemText(2, _translate("MainWindow", "50 mV"))
self.aRangeComboBox.setItemText(3, _translate("MainWindow", "100 mV"))
self.aRangeComboBox.setItemText(4, _translate("MainWindow", "200 mV"))
self.aRangeComboBox.setItemText(5, _translate("MainWindow", "500 mV"))
self.aRangeComboBox.setItemText(6, _translate("MainWindow", "1 V"))
self.aRangeComboBox.setItemText(7, _translate("MainWindow", "2 V"))
self.aRangeComboBox.setItemText(8, _translate("MainWindow", "5 V"))
self.aRangeComboBox.setItemText(9, _translate("MainWindow", "10 V"))
self.aRangeComboBox.setItemText(10, _translate("MainWindow", "20 V"))
self.aRangeComboBox.setItemText(11, _translate("MainWindow", "50 V"))
self.bRangeComboBox.setItemText(0, _translate("MainWindow", "10 mV"))
self.bRangeComboBox.setItemText(1, _translate("MainWindow", "20 mV"))
self.bRangeComboBox.setItemText(2, _translate("MainWindow", "50 mV"))
self.bRangeComboBox.setItemText(3, _translate("MainWindow", "100 mV"))
self.bRangeComboBox.setItemText(4, _translate("MainWindow", "200 mV"))
self.bRangeComboBox.setItemText(5, _translate("MainWindow", "500 mV"))
self.bRangeComboBox.setItemText(6, _translate("MainWindow", "1 V"))
self.bRangeComboBox.setItemText(7, _translate("MainWindow", "2 V"))
self.bRangeComboBox.setItemText(8, _translate("MainWindow", "5 V"))
self.bRangeComboBox.setItemText(9, _translate("MainWindow", "10 V"))
self.bRangeComboBox.setItemText(10, _translate("MainWindow", "20 V"))
self.bRangeComboBox.setItemText(11, _translate("MainWindow", "50 V"))
self.cRangeComboBox.setItemText(0, _translate("MainWindow", "10 mV"))
self.cRangeComboBox.setItemText(1, _translate("MainWindow", "20 mV"))
self.cRangeComboBox.setItemText(2, _translate("MainWindow", "50 mV"))
self.cRangeComboBox.setItemText(3, _translate("MainWindow", "100 mV"))
self.cRangeComboBox.setItemText(4, _translate("MainWindow", "200 mV"))
self.cRangeComboBox.setItemText(5, _translate("MainWindow", "500 mV"))
self.cRangeComboBox.setItemText(6, _translate("MainWindow", "1 V"))
self.cRangeComboBox.setItemText(7, _translate("MainWindow", "2 V"))
self.cRangeComboBox.setItemText(8, _translate("MainWindow", "5 V"))
self.cRangeComboBox.setItemText(9, _translate("MainWindow", "10 V"))
self.cRangeComboBox.setItemText(10, _translate("MainWindow", "20 V"))
self.cRangeComboBox.setItemText(11, _translate("MainWindow", "50 V"))
self.dRangeComboBox.setItemText(0, _translate("MainWindow", "10 mV"))
self.dRangeComboBox.setItemText(1, _translate("MainWindow", "20 mV"))
self.dRangeComboBox.setItemText(2, _translate("MainWindow", "50 mV"))
self.dRangeComboBox.setItemText(3, _translate("MainWindow", "100 mV"))
self.dRangeComboBox.setItemText(4, _translate("MainWindow", "200 mV"))
self.dRangeComboBox.setItemText(5, _translate("MainWindow", "500 mV"))
self.dRangeComboBox.setItemText(6, _translate("MainWindow", "1 V"))
self.dRangeComboBox.setItemText(7, _translate("MainWindow", "2 V"))
self.dRangeComboBox.setItemText(8, _translate("MainWindow", "5 V"))
self.dRangeComboBox.setItemText(9, _translate("MainWindow", "10 V"))
self.dRangeComboBox.setItemText(10, _translate("MainWindow", "20 V"))
self.dRangeComboBox.setItemText(11, _translate("MainWindow", "50 V"))
self.aCouplingComboBox.setItemText(0, _translate("MainWindow", "AC"))
self.aCouplingComboBox.setItemText(1, _translate("MainWindow", "DC"))
self.bCouplingComboBox.setItemText(0, _translate("MainWindow", "AC"))
self.bCouplingComboBox.setItemText(1, _translate("MainWindow", "DC"))
self.cCouplingComboBox.setItemText(0, _translate("MainWindow", "AC"))
self.cCouplingComboBox.setItemText(1, _translate("MainWindow", "DC"))
self.dCouplingComboBox.setItemText(0, _translate("MainWindow", "AC"))
self.dCouplingComboBox.setItemText(1, _translate("MainWindow", "DC"))
self.rangeLabel.setText(_translate("MainWindow", "Range"))
self.offsetLabel.setText(_translate("MainWindow", "Offset"))
self.couplingLabel.setText(_translate("MainWindow", "Coupling"))
self.captureBox.setTitle(_translate("MainWindow", "Capture"))
self.modeComboBox.setItemText(0, _translate("MainWindow", "Block"))
self.modeComboBox.setItemText(1, _translate("MainWindow", "Rapid Block"))
self.modeComboBox.setItemText(2, _translate("MainWindow", "Streaming"))
self.modeLabel.setText(_translate("MainWindow", "Mode"))
self.preTriggerSamplesLabel.setText(_translate("MainWindow", "Pre Trigger Samples"))
self.postTriggerSamplesLabel.setText(_translate("MainWindow", "Post Trigger Samples"))
self.timebaseLabel.setText(_translate("MainWindow", "Timebase"))
self.segmentsLabel.setText(_translate("MainWindow", "Segments"))
self.capturesLabel.setText(_translate("MainWindow", "Captures"))
self.timeUnitsLabel.setText(_translate("MainWindow", "Time Units"))
self.totalRuntimeLabel.setText(_translate("MainWindow", "Total Runtime"))
self.timeUnitsComboBox.setItemText(0, _translate("MainWindow", "fs"))
self.timeUnitsComboBox.setItemText(1, _translate("MainWindow", "ps"))
self.timeUnitsComboBox.setItemText(2, _translate("MainWindow", "ns"))
self.timeUnitsComboBox.setItemText(3, _translate("MainWindow", "μs"))
self.timeUnitsComboBox.setItemText(4, _translate("MainWindow", "ms"))
self.timeUnitsComboBox.setItemText(5, _translate("MainWindow", "s"))
self.samplesPerBufferLabel.setText(_translate("MainWindow", "Samples per Buffer"))
self.outFileCheckBox.setText(_translate("MainWindow", "File Output"))
self.triggerBox.setTitle(_translate("MainWindow", "Trigger"))
self.triggerTypeLabel.setText(_translate("MainWindow", "Type"))
self.triggerTypeComboBox.setItemText(0, _translate("MainWindow", "Simple"))
self.triggerTypeComboBox.setItemText(1, _translate("MainWindow", "Complex"))
self.triggerAutotriggerLabel.setText(_translate("MainWindow", "Auto-Trigger"))
self.triggerDelayLabel.setText(_translate("MainWindow", "Delay"))
self.bTriggerLabel.setText(_translate("MainWindow", "B"))
self.aTriggerLabel.setText(_translate("MainWindow", "A"))
self.cTriggerLabel.setText(_translate("MainWindow", "C"))
self.triggerUpperThresholdLabel.setText(_translate("MainWindow", "Upper Threshold"))
self.dTriggerLabel.setText(_translate("MainWindow", "D"))
self.deleteConditionButton.setText(_translate("MainWindow", "Delete Condition"))
self.newConditionButton.setText(_translate("MainWindow", "New Condition"))
self.triggerUpperHysteresisLabel.setText(_translate("MainWindow", "Upper Hysteresis"))
self.triggerLowerHysteresisLabel.setText(_translate("MainWindow", "Lower Hysteresis"))
self.triggerLowerThresholdLabel.setText(_translate("MainWindow", "Lower Threshold"))
self.extTriggerLabel.setText(_translate("MainWindow", "Ext"))
self.triggerDirectionLabel.setText(_translate("MainWindow", "Direction"))
self.aThresholdModeComboBox.setItemText(0, _translate("MainWindow", "Level"))
self.aThresholdModeComboBox.setItemText(1, _translate("MainWindow", "Window"))
self.bDirectionComboBox.setItemText(0, _translate("MainWindow", "Above"))
self.bDirectionComboBox.setItemText(1, _translate("MainWindow", "Below"))
self.bDirectionComboBox.setItemText(2, _translate("MainWindow", "Rising"))
self.bDirectionComboBox.setItemText(3, _translate("MainWindow", "Falling"))
self.bDirectionComboBox.setItemText(4, _translate("MainWindow", "Rising or Falling"))
self.bDirectionComboBox.setItemText(5, _translate("MainWindow", "Above Lower"))
self.bDirectionComboBox.setItemText(6, _translate("MainWindow", "Below Lower"))
self.bDirectionComboBox.setItemText(7, _translate("MainWindow", "Rising Lower"))
self.bDirectionComboBox.setItemText(8, _translate("MainWindow", "Falling Lower"))
self.bDirectionComboBox.setItemText(9, _translate("MainWindow", "Positive Runt"))
self.bDirectionComboBox.setItemText(10, _translate("MainWindow", "Negative Runt"))
self.extDirectionComboBox.setItemText(0, _translate("MainWindow", "Above"))
self.extDirectionComboBox.setItemText(1, _translate("MainWindow", "Below"))
self.extDirectionComboBox.setItemText(2, _translate("MainWindow", "Rising"))
self.extDirectionComboBox.setItemText(3, _translate("MainWindow", "Falling"))
self.extDirectionComboBox.setItemText(4, _translate("MainWindow", "Rising or Falling"))
self.extDirectionComboBox.setItemText(5, _translate("MainWindow", "Above Lower"))
self.extDirectionComboBox.setItemText(6, _translate("MainWindow", "Below Lower"))
self.extDirectionComboBox.setItemText(7, _translate("MainWindow", "Rising Lower"))
self.extDirectionComboBox.setItemText(8, _translate("MainWindow", "Falling Lower"))
self.extDirectionComboBox.setItemText(9, _translate("MainWindow", "Positive Runt"))
self.extDirectionComboBox.setItemText(10, _translate("MainWindow", "Negative Runt"))
self.dDirectionComboBox.setItemText(0, _translate("MainWindow", "Above"))
self.dDirectionComboBox.setItemText(1, _translate("MainWindow", "Below"))
self.dDirectionComboBox.setItemText(2, _translate("MainWindow", "Rising"))
self.dDirectionComboBox.setItemText(3, _translate("MainWindow", "Falling"))
self.dDirectionComboBox.setItemText(4, _translate("MainWindow", "Rising or Falling"))
self.dDirectionComboBox.setItemText(5, _translate("MainWindow", "Above Lower"))
self.dDirectionComboBox.setItemText(6, _translate("MainWindow", "Below Lower"))
self.dDirectionComboBox.setItemText(7, _translate("MainWindow", "Rising Lower"))
self.dDirectionComboBox.setItemText(8, _translate("MainWindow", "Falling Lower"))
self.dDirectionComboBox.setItemText(9, _translate("MainWindow", "Positive Runt"))
self.dDirectionComboBox.setItemText(10, _translate("MainWindow", "Negative Runt"))
self.thresholdModeLabel.setText(_translate("MainWindow", "Mode"))
self.cDirectionComboBox.setItemText(0, _translate("MainWindow", "Above"))
self.cDirectionComboBox.setItemText(1, _translate("MainWindow", "Below"))
self.cDirectionComboBox.setItemText(2, _translate("MainWindow", "Rising"))
self.cDirectionComboBox.setItemText(3, _translate("MainWindow", "Falling"))
self.cDirectionComboBox.setItemText(4, _translate("MainWindow", "Rising or Falling"))
self.cDirectionComboBox.setItemText(5, _translate("MainWindow", "Above Lower"))
self.cDirectionComboBox.setItemText(6, _translate("MainWindow", "Below Lower"))
self.cDirectionComboBox.setItemText(7, _translate("MainWindow", "Rising Lower"))
self.cDirectionComboBox.setItemText(8, _translate("MainWindow", "Falling Lower"))
self.cDirectionComboBox.setItemText(9, _translate("MainWindow", "Positive Runt"))
self.cDirectionComboBox.setItemText(10, _translate("MainWindow", "Negative Runt"))
self.aDirectionComboBox.setItemText(0, _translate("MainWindow", "Above"))
self.aDirectionComboBox.setItemText(1, _translate("MainWindow", "Below"))
self.aDirectionComboBox.setItemText(2, _translate("MainWindow", "Rising"))
self.aDirectionComboBox.setItemText(3, _translate("MainWindow", "Falling"))
self.aDirectionComboBox.setItemText(4, _translate("MainWindow", "Rising or Falling"))
self.aDirectionComboBox.setItemText(5, _translate("MainWindow", "Above Lower"))
self.aDirectionComboBox.setItemText(6, _translate("MainWindow", "Below Lower"))
self.aDirectionComboBox.setItemText(7, _translate("MainWindow", "Rising Lower"))
self.aDirectionComboBox.setItemText(8, _translate("MainWindow", "Falling Lower"))
self.aDirectionComboBox.setItemText(9, _translate("MainWindow", "Positive Runt"))
self.aDirectionComboBox.setItemText(10, _translate("MainWindow", "Negative Runt"))
self.dThresholdModeComboBox.setItemText(0, _translate("MainWindow", "Level"))
self.dThresholdModeComboBox.setItemText(1, _translate("MainWindow", "Window"))
self.bThresholdModeComboBox.setItemText(0, _translate("MainWindow", "Level"))
self.bThresholdModeComboBox.setItemText(1, _translate("MainWindow", "Window"))
self.extThresholdModeComboBox.setItemText(0, _translate("MainWindow", "Level"))
self.extThresholdModeComboBox.setItemText(1, _translate("MainWindow", "Window"))
self.cThresholdModeComboBox.setItemText(0, _translate("MainWindow", "Level"))
self.cThresholdModeComboBox.setItemText(1, _translate("MainWindow", "Window"))
self.runButton.setText(_translate("MainWindow", "Run"))
self.runsLabel.setText(_translate("MainWindow", "Runs"))
self.tabWidget.setTabText(self.tabWidget.indexOf(runList['runTab'][-1]), _translate("MainWindow", "Run 1"))
self.menuPreset.setTitle(_translate("MainWindow", "Presets"))
self.actionLoad_Preset.setText(_translate("MainWindow", "Load Preset"))
self.actionLoad_Preset.setShortcut(_translate("MainWindow", "Ctrl+O"))
self.actionSave_Preset.setText(_translate("MainWindow", "Save Preset"))
self.actionSave_Preset.setShortcut(_translate("MainWindow", "Ctrl+S"))
#Defaults
self.outFileNameLineEdit.setEnabled(False)
self.cCheck.setEnabled(False)
self.dCheck.setEnabled(False)
self.cRangeComboBox.setEnabled(False)
self.dRangeComboBox.setEnabled(False)
self.cOffsetSpinBox.setEnabled(False)
self.dOffsetSpinBox.setEnabled(False)
self.cCouplingComboBox.setEnabled(False)
self.dCouplingComboBox.setEnabled(False)
self.cTriggerCheck.setEnabled(False)
self.dTriggerCheck.setEnabled(False)
self.extTriggerCheck.setEnabled(False)
self.cUpperThresholdSpinBox.setEnabled(False)
self.dUpperThresholdSpinBox.setEnabled(False)
self.extUpperThresholdSpinBox.setEnabled(False)
self.cUpperHysteresisSpinBox.setEnabled(False)
self.dUpperHysteresisSpinBox.setEnabled(False)
self.extUpperHysteresisSpinBox.setEnabled(False)
self.cLowerThresholdSpinBox.setEnabled(False)
self.dLowerThresholdSpinBox.setEnabled(False)
self.extLowerThresholdSpinBox.setEnabled(False)
self.cLowerHysteresisSpinBox.setEnabled(False)
self.dLowerHysteresisSpinBox.setEnabled(False)
self.extLowerHysteresisSpinBox.setEnabled(False)
conditionList['cStateComboBox'][-1].setEnabled(False)
conditionList['dStateComboBox'][-1].setEnabled(False)
conditionList['extStateComboBox'][-1].setEnabled(False)
self.cDirectionComboBox.setEnabled(False)
self.dDirectionComboBox.setEnabled(False)
self.extDirectionComboBox.setEnabled(False)
self.cThresholdModeComboBox.setEnabled(False)
self.dThresholdModeComboBox.setEnabled(False)
self.extThresholdModeComboBox.setEnabled(False)
self.totalRuntimeSpinBox.setEnabled(False)
self.timeUnitsComboBox.setEnabled(False)
self.segmentsSpinBox.setEnabled(False)
self.capturesSpinBox.setEnabled(False)
self.samplesPerBufferSpinBox.setEnabled(False)
self.aUpperHysteresisSpinBox.setEnabled(False)
self.bUpperHysteresisSpinBox.setEnabled(False)
self.cUpperHysteresisSpinBox.setEnabled(False)
self.dUpperHysteresisSpinBox.setEnabled(False)
self.aLowerThresholdSpinBox.setEnabled(False)
self.bLowerThresholdSpinBox.setEnabled(False)
self.cLowerThresholdSpinBox.setEnabled(False)
self.dLowerThresholdSpinBox.setEnabled(False)
self.aLowerHysteresisSpinBox.setEnabled(False)
self.bLowerHysteresisSpinBox.setEnabled(False)
self.cLowerHysteresisSpinBox.setEnabled(False)
self.dLowerHysteresisSpinBox.setEnabled(False)
self.aThresholdModeComboBox.setEnabled(False)
self.bThresholdModeComboBox.setEnabled(False)
self.cThresholdModeComboBox.setEnabled(False)
self.dThresholdModeComboBox.setEnabled(False)
conditionList['aStateComboBox'][-1].setEnabled(False)
conditionList['bStateComboBox'][-1].setEnabled(False)
self.newConditionButton.setEnabled(False)
self.deleteConditionButton.setEnabled(False)
self.aRangeComboBox.model().item(0).setEnabled(False)
self.aRangeComboBox.model().item(11).setEnabled(False)
self.bRangeComboBox.model().item(0).setEnabled(False)
self.bRangeComboBox.model().item(11).setEnabled(False)
self.aRangeComboBox.setCurrentIndex(1)
self.bRangeComboBox.setCurrentIndex(1)
self.timeUnitsComboBox.setCurrentText('ns')
self.aAutotriggerSpinBox.setValue(0)
self.runsSpinBox.setMinimum(1)
self.timebaseSpinBox.setMinimum(1)
self.segmentsSpinBox.setMinimum(1)
self.capturesSpinBox.setMinimum(1)
self.totalRuntimeSpinBox.setMinimum(1)
self.preTriggerSamplesSpinBox.setMinimum(0)
self.postTriggerSamplesSpinBox.setMinimum(0)
self.samplesPerBufferSpinBox.setMinimum(1)
self.aUpperThresholdSpinBox.setMinimum(-32512)
self.aUpperHysteresisSpinBox.setMinimum(-32512)
self.aLowerThresholdSpinBox.setMinimum(-32512)
self.aLowerHysteresisSpinBox.setMinimum(-32512)
self.bUpperThresholdSpinBox.setMinimum(-32512)
self.bUpperHysteresisSpinBox.setMinimum(-32512)
self.bLowerThresholdSpinBox.setMinimum(-32512)
self.bLowerHysteresisSpinBox.setMinimum(-32512)
self.cUpperThresholdSpinBox.setMinimum(-32512)
self.cUpperHysteresisSpinBox.setMinimum(-32512)
self.cLowerThresholdSpinBox.setMinimum(-32512)
self.cLowerHysteresisSpinBox.setMinimum(-32512)
self.dUpperThresholdSpinBox.setMinimum(-32512)
self.dUpperHysteresisSpinBox.setMinimum(-32512)
self.dLowerThresholdSpinBox.setMinimum(-32512)
self.dLowerHysteresisSpinBox.setMinimum(-32512)
self.extUpperThresholdSpinBox.setMinimum(-32767)
self.extUpperHysteresisSpinBox.setMinimum(-32767)
self.extLowerThresholdSpinBox.setMinimum(-32767)
self.extLowerHysteresisSpinBox.setMinimum(-32767)
self.pageNumLineEdit.setText('1')
self.pageNumLineEdit.setAlignment(QtCore.Qt.AlignCenter)
self.nextPushButton.setText(_translate("MainWindow", "Next"))
self.nextPushButton.setEnabled(False)
self.previousPushButton.setText(_translate("MainWindow", "Previous"))
self.previousPushButton.setEnabled(False)
self.graphCheck.setText(_translate("MainWindow", "Graphing"))
self.graphCheck.setChecked(True)
f = open('driver.log', 'r')
self.driverLineEdit.setText(f.readline().replace('\n', ''))
f.close()
self.driverChannelCheck()
dir = os.path.join('.', 'presets')
if not os.path.exists(dir):
os.mkdir(dir)
presetList = os.listdir('./presets')
for i in range(len(presetList)):
if presetList[i].split('.')[1] =='prst':
f = open('./presets/'+presetList[i], 'r')
driver = f.readline().replace('\n', '')
if self.driverLineEdit.text() != driver:
continue
f.close()
self.presetComboBox.addItem(presetList[i].split('.')[0])
#Actions
self.outFileCheckBox.clicked.connect(self.fileOutCheck)
self.modeComboBox.currentTextChanged.connect(self.captureModeCheck)
self.triggerTypeComboBox.currentTextChanged.connect(self.triggerTypeCheck)
self.newConditionButton.clicked.connect(self.newCondition)
self.deleteConditionButton.clicked.connect(self.deleteCondition)
self.actionSave_Preset.triggered.connect(self.savePreset)
self.actionLoad_Preset.triggered.connect(self.loadPreset)
self.presetComboBox.currentTextChanged.connect(self.loadDetectedPreset)
self.runButton.clicked.connect(self.run)
self.aTriggerCheck.clicked.connect(self.simpleTriggerCheck)
self.bTriggerCheck.clicked.connect(self.simpleTriggerCheck)
self.cTriggerCheck.clicked.connect(self.simpleTriggerCheck)
self.dTriggerCheck.clicked.connect(self.simpleTriggerCheck)
self.extTriggerCheck.clicked.connect(self.simpleTriggerCheck)
self.nextPushButton.clicked.connect(self.nextPage)
self.pageNumLineEdit.textChanged.connect(self.pageChangeCheck)
self.previousPushButton.clicked.connect(self.previousPage)
self.tabWidget.currentChanged.connect(self.runTabChange)
self.graphCheck.clicked.connect(self.graphing)
def graphing(self):
self.tabWidget.setEnabled(int(self.graphCheck.checkState()))
def nextPage(self):
self.pageNumLineEdit.setText(str(int(self.pageNumLineEdit.text())+1))
def previousPage(self):
self.pageNumLineEdit.setText(str(int(self.pageNumLineEdit.text())-1))
def pageChangeCheck(self):
try:
self.pageNumLineEdit.setText(str(int(float(self.pageNumLineEdit.text()))))
if int(float(self.pageNumLineEdit.text())) > len(runList['captureTab'][self.tabWidget.currentIndex()]):
self.pageNumLineEdit.setText(str(len(runList['captureTab'][self.tabWidget.currentIndex()])))
elif int(float(self.pageNumLineEdit.text())) < 1:
self.pageNumLineEdit.setText('1')
if int(float(self.pageNumLineEdit.text())) == len(runList['captureTab'][self.tabWidget.currentIndex()]):
self.nextPushButton.setEnabled(False)
else:
self.nextPushButton.setEnabled(True)
if int(float(self.pageNumLineEdit.text())) == 1:
self.previousPushButton.setEnabled(False)
else:
self.previousPushButton.setEnabled(True)
runList['stackedWidget'][self.tabWidget.currentIndex()].setCurrentIndex(int(float(self.pageNumLineEdit.text()))-1)
except:
pass
def runTabChange(self):
self.pageNumLineEdit.setText(str(runList['stackedWidget'][self.tabWidget.currentIndex()].currentIndex()+1))
def fileOutCheck(self):
if self.outFileCheckBox.isChecked():
self.outFileNameLineEdit.setEnabled(True)
else:
self.outFileNameLineEdit.setText('')
self.outFileNameLineEdit.setEnabled(False)
def driverChannelCheck(self):
driver_replacement(self.driverLineEdit.text())
if str(self.driverLineEdit.text()) == 'ps2000a':
self.cCheck.setEnabled(False)
self.cCheck.setChecked(False)
self.dCheck.setEnabled(False)
self.dCheck.setChecked(False)
self.cRangeComboBox.setEnabled(False)
self.dRangeComboBox.setEnabled(False)
self.cOffsetSpinBox.setEnabled(False)
self.dOffsetSpinBox.setEnabled(False)
self.cCouplingComboBox.setEnabled(False)
self.dCouplingComboBox.setEnabled(False)
self.aTriggerCheck.setEnabled(True)
self.bTriggerCheck.setEnabled(True)
self.cTriggerCheck.setEnabled(False)
self.cTriggerCheck.setChecked(False)
self.dTriggerCheck.setEnabled(False)
self.dTriggerCheck.setChecked(False)
self.extTriggerCheck.setEnabled(False)
self.extTriggerCheck.setChecked(False)
self.aUpperThresholdSpinBox.setEnabled(True)
self.bUpperThresholdSpinBox.setEnabled(True)