-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsummary.kv
executable file
·1048 lines (1021 loc) · 38.9 KB
/
summary.kv
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
#:kivy 1.0.9
##kivy file for SummaryApp used in check_cvc
##Copyright 2106, 2017 D. Mitch Bailey d.mitch.bailey at gmail dot com
##
##This file is part of check_cvc.
##
##check_cvc is free software: you can redistribute it and/or modify
##it under the terms of the GNU General Public License as published by
##the Free Software Foundation, either version 3 of the License, or
##(at your option) any later version.
##
##check_cvc is distributed in the hope that it will be useful,
##but WITHOUT ANY WARRANTY; without even the implied warranty of
##MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
##GNU General Public License for more details.
##
##You should have received a copy of the GNU General Public License
##along with check_cvc. If not, see <http://www.gnu.org/licenses/>.
##
##You can download check_cvc from https://github.com/d-m-bailey/check_cvc.git
#:import os os
#:import sys sys
#:import re re
#:import Label kivy.uix.label.Label
#:import ListAdapter kivy.adapters.listadapter.ListAdapter
#:import SimpleListAdapter kivy.adapters.simplelistadapter.SimpleListAdapter
#:import SpinnerOption kivy.uix.spinner.SpinnerOption
#:import Factory kivy.factory.Factory
#:import FileChooser kivy.uix.filechooser.FileChooser
#:import pdb pdb
#:import Window kivy.core.window.Window
<MouseMotionEventProvider>:
disable_multitouch: True
<Widget>: # Set default font for all widgets to fixed pitch
font_name: "RobotoMono-Regular"
<ScrollView>:
scroll_type: ['bars', 'content']
bar_width: 15
#:set gSelectedButtonColor (1, 1, 1, 1) # white (grey because merged with black)
#:set gUnselectedButtonColor (0, 0, 0, 1) # black
<ReferenceModeButton>:
size_hint: None, None
height: self.texture_size[1]
color: self.r, self.g, self.b, 1
background_color: gSelectedButtonColor if self.is_selected else gUnselectedButtonColor
is_selected: False
on_press:
self.ToggleButton()
<TabbedPanelStrip>:
cols: app.modeColumns
rows: app.modeRows
spacing: 2
#:set gStandardHeight 30
<TabbedPanelHeader>:
r: 1
g: 0
b: 0
size_hint: None, None
color: self.r, self.g, self.b, 1
height: 2/3. * gStandardHeight
width: Window.size[0] / (app.modeColumns*1.0)
#:set gSelectedTextColor (0.9, 0.9, 0.2, 1) # yellow
#:set gDeselectedTextColor (0.6, 0.6, 0.6, 1) # light grey
<SummaryListItem>:
errorText: ""
is_selected: error_id.is_selected
size_hint: 1, None
height: 15
type: None
errorRef: error_id
ListItemLabel:
id: error_id
index: root.index
is_selected: False
text: root.errorText
markup: True
font_size: 12
auto_scale: False
padding_x: 2
shorten: True
shorten_from: 'right'
height: self.texture_size[1]
text_size: self.size[0], self.texture_size[1]
color: gSelectedTextColor if self.is_selected else gDeselectedTextColor
on_touch_down:
if self.collide_point(*args[1].pos): root.TouchListItem(args[1], app.root, root.index)
on_touch_move:
if self.collide_point(*args[1].pos) and not app.root.modifiers: root.DragSelect()
<LabeledText@BoxLayout>:
orientation: 'horizontal'
size_hint_y: None
height: 25
heading: ""
text: ""
Label:
text: root.heading
font_size: self.height / 2.
size_hint_x: None
padding: 5, 0
size: self.texture_size
Label:
text: root.text
border: 0, 0, 10, 0
font_size: self.height / 2.
size_hint_x: 1
padding: 5, 0
text_size: self.size
shorten: True
shorten_from: 'left'
halign: 'left'
valign: 'middle'
<SummaryTabContent>: # error lists and log/error file names
orientation: 'vertical'
minimum_height: 50
size_hint_y: 1
listRef: list_id
spacing: 1
canvas.before:
Color:
rgba: 0, 0, 0, 1
Rectangle:
size: self.size
pos: self.pos
ListView: # filtered error list
size_hint_x: 1
id: list_id
selectMode: ""
selectType: ""
adapter:
ListAdapter( \
data = [{'errorText': 'dummy', \
'is_selected': False, \
'type': 'unknown', \
'baseIndex': index} \
for index in range(len(root.report.displayList))],
args_converter = lambda row_index, rec: \
{'errorText': rec['errorText'], \
'is_selected': rec['is_selected'], \
'parentView': self, \
'index': row_index, \
'type': rec['type'], \
'baseIndex': rec['baseIndex']}, \
cls = 'SummaryListItem', \
selection_mode = 'multiple', \
propagate_selection_to_data = True, \
allow_empty_selection = True)
on_touch_up:
# grab is handled in child SummaryListItem
if args[1].grab_current == self: root.FinishSelection(args[1], self)
BoxLayout: # log and summary file names
orientation: 'horizontal'
size_hint_y: None
height: 25
LabeledText:
id: logFileName_id
heading: "Log:"
LabeledText:
id: summaryFileName_id
heading: "Summary:"
<FilterCheckBox@BoxLayout>:
orientation: 'vertical'
padding: 0, 0, 0, 4
text: ""
count: ""
checkRef: check_id
active: False
color: 1, 1, 1, 1
Label:
text: root.text
size: self.texture_size
font_size: self.height*.75
color: root.color
CheckBox:
id: check_id
active: root.active
on_touch_down:
if self.collide_point(*args[1].pos): app.SetCheckFilters(root.text)
Label:
text: root.count
size: self.texture_size
font_size: self.height*.8
<CopyCheckBox@BoxLayout>:
orientation: 'vertical'
padding: 0, 0, 0, 4
text: ""
active: False
checkRef: check_id
color: 1, 1, 1, 1
Label:
text: root.text
size: self.texture_size
font_size: self.height*.8
color: root.color
CheckBox:
id: check_id
active: root.active
on_touch_down:
if self.collide_point(*args[1].pos): app.SetCopyFilters(root.text)
<BasicCheckBox@BoxLayout>:
orientation: 'vertical'
padding: 0, 0, 0, 4
text: ""
active: False
checkRef: check_id
Label:
text: root.text
size: self.texture_size
font_size: self.height*.8
CheckBox:
id: check_id
active: root.active
<SummaryOption@SpinnerOption>:
size: self.texture_size
size_hint: 1, None
<HistoryTextInput>
orientation: 'horizontal'
undoList: []
redoList: []
textRef: textInput_id
containsNumber: False
redisplayFlag: False
TextInput:
id: textInput_id
multiline: False
font_size: self.height / 2.5
valign: 'middle'
size_hint: 1, 1
text: ""
on_focus:
root.Set(args[1], root.textRef, root.redisplayFlag)
on_touch_down:
if self.collide_point(*args[1].pos) and args[1].button == 'middle': self.paste()
on_text:
root.containsNumber = True if re.search("[0-9]", self.text) else False
Button:
text: '<'
size_hint: None, 1
size: self.texture_size
font_size: self.height / 2.
padding: 5, 5
disabled: True if len(root.undoList) == 0 else False
on_press:
root.Undo(root.textRef, root.redisplayFlag)
Button:
text: 'X'
size_hint: None, 1
size: self.texture_size
font_size: self.height / 2.
padding: 5, 5
disabled: False if textInput_id.text else True
on_press:
root.Clear(root.textRef, root.redisplayFlag)
Button:
text: '>'
size_hint: None, 1
size: self.texture_size
font_size: self.height / 2.
padding: 5, 5
disabled: True if len(root.redoList) == 0 else False
on_press:
root.Redo(root.textRef, root.redisplayFlag)
<SummaryWidget>:
filterTextRef: filterText_id
modePanelRef: modePanel_id
referenceTextRef: referenceText_id
commentTextRef: commentText_id
copyPopupRef: copyPopup_id.__self__
savePopupRef: savePopup_id.__self__
exportPopupRef: exportPopup_id.__self__
confirmSavePopupRef: confirmSavePopup_id.__self__
confirmExportPopupRef: confirmExportPopup_id.__self__
detailPopupRef: detailPopup_id.__self__
filterPopupRef: filterPopup_id.__self__
quitPopupRef: quitPopup_id.__self__
workingPopupRef: workingPopup_id.__self__
replaceReferencePopupRef: replaceReferencePopup_id.__self__
changedFlag: False
BoxLayout:
orientation: 'vertical'
size: root.size
spacing: 1
BoxLayout: # text, option and section filters
orientation: 'horizontal'
size_hint_x: 1.0
size_hint_y: None
height: gStandardHeight
BoxLayout:
orientation: 'horizontal'
Label:
text: "Filter"
font_size: self.height / 2.
size_hint_x: None
padding: 5, 5
size: self.texture_size
HistoryTextInput:
id: filterText_id
root: root
redisplayFlag: True
size_hint: 1, 1
Button:
text: "Options"
size: self.texture_size
font_size: self.height / 2.
padding: 5, 5
on_press: root.filterPopupRef.open()
size_hint: None, None
b: 0 if hideLogic_id.active or hideVth_id.active or hideReference_id.active else 1
color: 1, 1, self.b, 1
Spinner:
id: sectionSpinner_id
text: ""
values: []
size_hint: .8, None
size: self.texture_size
pos_hint: {'center_x': 0, 'center_y': 0.5}
padding: 5, 5
sync_height: True
option_cls: 'SummaryOption'
on_press:
root.setSectionFlag = True
on_text:
if root.setSectionFlag: root.SetSectionFilter(args[1])
BoxLayout:
orientation: 'horizontal'
size_hint_y: None
height: 50
padding: 2, 2, 2, 2
BoxLayout:
orientation: 'vertical'
size_hint: 1 / 15., 1
Label:
id: countLabel_id
text: "Show"
size_hint_x: 1
size: self.texture_size
b: 1
color: 1, 1, self.b, 1 # yellow if display is filtered
ProgressBar: # currently unused. just spacing
id: progress_id
size_hint: 1, None
height: 10
value: 0
Label:
id: displayCount_id
text: ""
text_size: self.size
font_size: self.height*0.8
halign: 'right'
on_text:
countLabel_id.b = 1 if displayCount_id.text == show_all.count else 0
BoxLayout:
orientation: 'horizontal'
size_hint_y: None
height: 50
FilterCheckBox:
id: show_all
text: 'all'
FilterCheckBox:
id: show_ERROR
text: 'ERROR'
color: 1, 0, 0, 1
FilterCheckBox:
id: show_Warning
text: 'Warning'
color: 1, 0.5, 0, 1
FilterCheckBox:
id: show_Check
text: 'Check'
color: 1, 1, 0, 1
FilterCheckBox:
id: show_ignore
text: 'ignore'
color: 0, 1, 0, 1
FilterCheckBox:
id: show_unchecked
text: 'unchecked'
FilterCheckBox:
id: show_uncommitted
text: 'uncommitted'
FilterCheckBox:
id: show_unmatched
text: 'unmatched'
FilterCheckBox:
id: show_comment
text: 'comment'
FilterCheckBox:
id: show_none
text: 'none'
TabbedPanel:
id: modePanel_id
minimum_height: 100
size_hint_x: 1
tab_height: (21+2) * app.modeRows
tab_width: Window.size[0] / (app.modeColumns*1.0)
do_default_tab: False
on_current_tab:
if self.current_tab.content: self.current_tab.content.RedisplayErrors()
BoxLayout:
orientation: "horizontal"
size_hint_y: None
height: gStandardHeight
Label:
text: "Reference"
font_size: self.height / 2.
size_hint_x: None
size: self.texture_size
padding: 5, 5
Button:
text: "-"
size_hint_x: None
size: self.texture_size
padding: 5, 5
disabled: not referenceText_id.containsNumber
on_press:
root.IncrementReference(-1)
Button:
text: "+"
size_hint_x: None
size: self.texture_size
padding: 5, 5
disabled: not referenceText_id.containsNumber
on_press:
root.IncrementReference(1)
HistoryTextInput:
id: referenceText_id
root: root
size_hint: 1, 1
Label:
text: "Comment"
font_size: self.height / 2.
size_hint_x: None
padding: 5, 5
size: self.texture_size
HistoryTextInput:
id: commentText_id
root: root
size_hint: 1, 1
BoxLayout:
# middle buttons
orientation: 'horizontal'
size_hint_y: None
height: errorButton.height
Button:
id: errorButton
text: "ERROR"
padding: 5, 5
size: self.texture_size
on_press:
root.AddReference('ERROR', root.referenceAction)
Button:
id: warningButton
text: "Warning"
padding: 5, 5
size: self.texture_size
on_press:
root.AddReference('Warning', root.referenceAction)
Button:
id: checkButton
text: "Check"
padding: 5, 5
size: self.texture_size
on_press:
root.AddReference('Check', root.referenceAction)
Button:
id: ignoreButton
text: "ignore"
padding: 5, 5
size: self.texture_size
on_press:
root.AddReference('ignore', root.referenceAction)
Button:
id: commitButton
text: "commit"
padding: 5, 5
size: self.texture_size
on_press:
root.CommitReferences()
Button:
id: clearButton
text: "Clear"
padding: 5, 5
size: self.texture_size
on_press:
root.ClearReference()
Button:
id: commentButton
text: "Comment"
padding: 5, 5
size: self.texture_size
on_press:
root.AddComment()
Button:
id: deleteButton
text: "Delete"
padding: 5, 5
size: self.texture_size
on_press:
root.DeleteSummary()
BoxLayout:
orientation: 'horizontal'
size_hint: 1, None
height: selectAllButton.height
Button:
id: selectAllButton
text: "Select All"
padding: 5, 5
size: self.texture_size
on_press:
root.SelectAll()
Button:
id: unselectAllButton
text: "Unselect All"
padding: 5, 5
size: self.texture_size
on_press:
root.DeselectAll()
Button:
id: undoButton
text: "undo"
padding: 5, 5
size: self.texture_size
on_press:
root.UndoChanges()
Button:
id: redoButton
text: "redo"
padding: 5, 5
size: self.texture_size
on_press:
root.RedoChanges()
BoxLayout:
id: bottomButtons
orientation: 'horizontal'
size_hint: 1, None
height: viewButton.height
Button:
id: viewButton
text: "View"
size_hint_y: None
padding: 5, 5
size: self.texture_size
disabled: False if filterText_id.textRef.text else True
on_press:
os.system("echo '" \
+ filterText_id.textRef.text \
+ "' | search_report_cvc '" \
+ root.currentContent.report.errorFileName \
+ "'")
Button:
id: referenceButton
text: "Copy Checks"
size_hint_y: None
padding: 5, 5
size: self.texture_size
on_press:
root.copyPopupRef.open()
Button:
id: saveButton
text: "Save"
size_hint_y: None
padding: 5, 5
size: self.texture_size
disabled: False if root.changedFlag else True
on_press:
root.SaveSummary( \
theFileName=root.summary.summaryFileName, \
theAutoCommitFlag=False, \
theSaveUnmatchedFlag=True)
Button:
size_hint_y: None
id: saveAsButton
padding: 5, 5
size: self.texture_size
text: "Save As"
on_press:
root.savePopupRef.open()
Button:
size_hint_y: None
id: exportButton
padding: 5, 5
size: self.texture_size
text: "Export CSV"
on_press:
root.exportPopupRef.open()
Button:
size_hint_y: None
id: quitButton
padding: 5, 5
size: self.texture_size
text: "Quit"
on_press:
root.Quit()
Popup:
id: copyPopup_id
size_hint_x: 0.8
size_hint_y: 0.8
baseMode: ""
title: "Copy checked references from " + self.baseMode + " mode to selected modes"
auto_dismiss: False
size: self.size
title_font: "RobotoMono-Regular"
on_parent:
if self.parent == bottomButtons: self.parent.remove_widget(self)
on_open:
root.AddReferenceModes(referenceGrid_id)
BoxLayout:
orientation: 'vertical'
BoxLayout:
orientation: 'horizontal'
size_hint_y: None
height: 35
padding: 2, 2, 2, 2
root: root
Label:
text: "Copy"
width: self.texture_size[0] + 10
size_hint_x: None
CopyCheckBox:
text: 'all'
id: copy_all
CopyCheckBox:
text: 'ERROR'
id: copy_ERROR
color: 1, 0, 0, 1
CopyCheckBox:
text: 'Warning'
id: copy_Warning
color: 1, 0.5, 0, 1
CopyCheckBox:
text: 'Check'
id: copy_Check
color: 1, 1, 0, 1
CopyCheckBox:
text: 'ignore'
id: copy_ignore
color: 0, 1, 0, 1
CopyCheckBox:
text: 'comment'
id: copy_comment
CopyCheckBox:
text: 'none'
id: copy_none
GridLayout:
id: referenceGrid_id
size_hint: 1, None
col_force_default: True
col_default_width: self.parent.width / 8.
cols: 8
BoxLayout:
orientation: 'horizontal'
Button:
text: 'Cancel'
size_hint_y: None
height: self.texture_size[1]
padding: 5, 5
on_press:
root.copyPopupRef.dismiss()
Button:
id: selectAllModesButton
text: 'Select All'
size_hint_y: None
height: self.texture_size[1]
padding: 5, 5
on_press:
root.SetAllReferences(True)
Button:
id: unselectAllModesButton
text: 'Unselect All'
size_hint_y: None
height: self.texture_size[1]
padding: 5, 5
on_press:
root.SetAllReferences(False)
Button:
id: copyReferencesButton
text: 'OK'
size_hint_y: None
height: self.texture_size[1]
padding: 5, 5
on_press:
root.CopyReferences()
Popup:
id: savePopup_id
size_hint_x: 0.8
size_hint_y: 0.8
title: "Save summary file"
auto_dismiss: False
size: self.size
title_font: "RobotoMono-Regular"
on_parent:
if self.parent == bottomButtons: self.parent.remove_widget(self)
on_open:
filechooser.path = os.path.dirname(root.summary.summaryFileName)
filenameInput_id.text = os.path.basename(root.summary.summaryFileName)
BoxLayout:
orientation: 'vertical'
FileChooserListView:
id: filechooser
on_selection:
filenameInput_id.text = self.selection and self.selection[0] or ''
TextInput:
id: filenameInput_id
size_hint_y: None
height: gStandardHeight
multiline: False
BoxLayout:
orientation: 'horizontal'
size_hint_y: None
height: 35
padding: 2, 2, 2, 2
BasicCheckBox:
id: autoCommit_id
text: 'Auto commit'
active: False
BasicCheckBox:
id: saveUnmatched_id
text: 'Save unmatched'
active: True
BoxLayout:
orientation: 'horizontal'
size_hint_y: None
height: gStandardHeight
Button:
text: "Cancel"
size_hint_y: None
height: self.texture_size[1]
padding: 5, 5
on_release:
root.savePopupRef.dismiss()
Button:
text: "Save"
size_hint_y: None
height: self.texture_size[1]
padding: 5, 5
on_press:
root.SaveSummaryAs( \
theFileName=os.path.join(filechooser.path, filenameInput_id.text),\
theAutoCommitFlag=autoCommit_id.checkRef.active, \
theSaveUnmatchedFlag=saveUnmatched_id.checkRef.active)
Popup:
id: exportPopup_id
size_hint_x: 0.8
size_hint_y: 0.8
title: "Export summary file"
auto_dismiss: False
size: self.size
title_font: "RobotoMono-Regular"
on_parent:
if self.parent == bottomButtons: self.parent.remove_widget(self)
on_open:
csvFilechooser.path = os.path.dirname(root.summary.summaryFileName)
csvNameInput_id.text = os.path.basename(root.summary.summaryFileName) + ".csv"
BoxLayout:
orientation: 'vertical'
FileChooserListView:
id: csvFilechooser
on_selection:
csvNameInput_id.text = self.selection and self.selection[0] or ''
TextInput:
id: csvNameInput_id
size_hint_y: None
height: gStandardHeight
multiline: False
BoxLayout:
orientation: 'horizontal'
size_hint_y: None
height: gStandardHeight
Button:
text: "Cancel"
size_hint_y: None
height: self.texture_size[1]
padding: 5, 5
on_release:
root.exportPopupRef.dismiss()
Button:
text: "Export"
size_hint_y: None
height: self.texture_size[1]
padding: 5, 5
on_press:
root.ExportSummaryAs( \
theFileName=os.path.join(csvFilechooser.path, csvNameInput_id.text))
Popup:
id: confirmSavePopup_id
size_hint_x: 0.90
size_hint_y: 0.2
title: ""
auto_dismiss: False
size: self.size
title_font: "RobotoMono-Regular"
on_parent:
if self.parent == bottomButtons: self.parent.remove_widget(self)
BoxLayout:
orientation: 'horizontal'
size_hint_y: None
Button:
text: "Cancel"
size_hint_y: None
height: self.texture_size[1]
padding: 5, 5
on_press:
root.confirmSavePopupRef.dismiss()
Button:
text: "Save"
size_hint_y: None
height: self.texture_size[1]
padding: 5, 5
on_press:
root.SaveSummary( \
theFileName=os.path.join(filechooser.path, filenameInput_id.text), \
theAutoCommitFlag=autoCommit_id.checkRef.active, \
theSaveUnmatchedFlag=saveUnmatched_id.checkRef.active)
Popup:
id: confirmExportPopup_id
size_hint_x: 0.90
size_hint_y: 0.2
title: ""
auto_dismiss: False
size: self.size
title_font: "RobotoMono-Regular"
on_parent:
if self.parent == bottomButtons: self.parent.remove_widget(self)
BoxLayout:
orientation: 'horizontal'
size_hint_y: None
Button:
text: "Cancel"
size_hint_y: None
height: self.texture_size[1]
padding: 5, 5
on_press:
root.confirmExportPopupRef.dismiss()
Button:
text: "Save"
size_hint_y: None
height: self.texture_size[1]
padding: 5, 5
on_press:
root.ExportSummary (\
theFileName=os.path.join(csvFilechooser.path, csvNameInput_id.text))
Popup:
id: detailPopup_id
size_hint_x: 0.9
size_hint_y: 0.9
title: "Error Details"
auto_dismiss: True
size: self.size
title_font: "RobotoMono-Regular"
on_parent:
if self.parent == bottomButtons: self.parent.remove_widget(self)
BoxLayout:
orientation: 'vertical'
TextInput:
id: errorDetails_id
scroll_type: ['bars', 'content']
bar_width: 15
padding: 5, 5
text_size: errorDetails_id.width, None
size_hint: 1, 1
valign: 'top'
halign: 'left'
readonly: True
background_color: 0.2, 0.2, 0.2, 1
foreground_color: 1, 1, 1, 1
on_focus:
self.cursor = (0, 0)
on_selection_text:
self.copy()
Button:
text: "Close"
size_hint_y: None
height: self.texture_size[1]
on_press:
root.detailPopupRef.dismiss()
Popup:
id: quitPopup_id
size_hint_x: 0.3
size_hint_y: 0.2
title: "Save changes?"
auto_dismiss: False
size: self.size
title_font: "RobotoMono-Regular"
on_parent:
if self.parent == bottomButtons: self.parent.remove_widget(self)
BoxLayout:
orientation: 'horizontal'
size_hint_y: None
Button:
text: "No"
size_hint_y: None
height: self.texture_size[1]
padding: 5, 5
on_press:
root.autoSaveFlag = False
root.RemoveAutoSaveFile()
Window.close()
Button:
text: "Cancel"
size_hint_y: None
height: self.texture_size[1]
padding: 5, 5
on_press:
root.quitPopupRef.dismiss()
Button:
text: "Yes"
size_hint_y: None
height: self.texture_size[1]
padding: 5, 5
on_press:
root.SaveSummary( \
theFileName=root.summary.summaryFileName, \
theAutoCommitFlag=False, \
theSaveUnmatchedFlag=True)
Window.close()
Popup:
id: filterPopup_id
size_hint_x: 0.8
size_hint_y: 0.4
title: "Choose error filters"
auto_dismiss: False
size: self.size
title_font: "RobotoMono-Regular"
on_parent:
if self.parent == bottomButtons: self.parent.remove_widget(self)
BoxLayout:
orientation: 'vertical'
BoxLayout:
orientation: 'horizontal'
size_hint: 1, 1
CheckBox:
id: hideLogic_id
size_hint_x: None
width: 30
disabled: True
Label:
size_hint: 1, 1
text: "Hide overvoltage errors that are logically OK"
size: self.texture_size
text_size: self.size
valign: 'middle'
BoxLayout:
orientation: 'horizontal'
size_hint: 1, 1
CheckBox:
id: hideVth_id
size_hint_x: None
width: 30
disabled: True
Label:
size_hint: 1, 1
text: "Hide gate-source errors at exactly Vth"
size: self.texture_size
text_size: self.size
valign: 'middle'
BoxLayout:
orientation: 'horizontal'
size_hint: 1, 1
CheckBox:
id: hideReference_id
size_hint_x: None
width: 30
disabled: True
Label:
size_hint: 1, 1
text: "Hide gate-source errors with reference voltage"
size: self.texture_size
text_size: self.size
valign: 'middle'
Button:
text: "Done"
size_hint_y: None
height: self.texture_size[1]
padding: 5, 5
halign: 'center'
on_press:
root.filterPopupRef.dismiss()
Popup:
id: workingPopup_id
size_hint_x: 0.3