-
Notifications
You must be signed in to change notification settings - Fork 1
/
GUI_runs.py
1002 lines (895 loc) · 44.8 KB
/
GUI_runs.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 sys
import os
import time
import pandas as pd
import pickle
from PyQt5.QtWidgets import *
from PyQt5.QtCore import QSettings, QCoreApplication, QThread, Qt
import matplotlib as mpl
import matplotlib.pyplot as plt
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg
from matplotlib.backends.backend_qt5agg import FigureCanvas as FigureCanvas
from matplotlib.backends.backend_qt5agg import NavigationToolbar2QT as NavigationToolbar
from matplotlib.figure import Figure
import PBD_p3d as pbd
from GUI_workers import *
#%% Tab1 - Import
def run_worker1(self):
# 시작 메세지
time_start = time.time()
self.status_browser.append('Running.....')
# 변수 정리
input_xlsx_path = self.data_conv_path_editbox.text().strip()
DL = self.DL_name_editbox.text().strip()
LL = self.LL_name_editbox.text().strip()
import_node = self.import_node_checkbox.isChecked()
import_beam = self.import_beam_checkbox.isChecked()
import_col = self.import_col_checkbox.isChecked()
import_wall = self.import_wall_checkbox.isChecked()
import_plate = self.import_plate_checkbox.isChecked()
import_WR_gage = self.import_WR_gage_checkbox.isChecked()
import_WAS_gage = self.import_WAS_gage_checkbox.isChecked()
import_I_beam = self.import_I_beam_checkbox.isChecked()
import_mass = self.import_mass_checkbox.isChecked()
import_nodal_load = self.import_nodal_load_checkbox.isChecked()
# checkbox or editbox 비어있는 경우 break
while True:
if (import_node == False) & (import_beam == False) & (import_col == False)\
& (import_wall == False) & (import_plate == False) & (import_WR_gage == False)\
& (import_WAS_gage == False) & (import_I_beam == False) & (import_mass == False)\
& (import_nodal_load == False):
msg = 'Nothing Checked!'
msg_colored = '<span style=\" color: #ff0000;\">%s</span>' % msg
self.status_browser.append(msg_colored)
return # return nothing & break the function
elif (input_xlsx_path == '') | (DL == False) | (LL == False):
msg = 'Nothing Entered!'
msg_colored = '<span style=\" color: #ff0000;\">%s</span>' % msg
self.status_browser.append(msg_colored)
return
else: break
# QThread 오브젝트 생성
self.thread = QThread(parent=self)
# ImportWorker 오브젝트 생성
self.worker = pbd.ImportWorker(input_xlsx_path, DL, LL, import_node, import_beam
, import_col, import_wall, import_plate
, import_WR_gage, import_WAS_gage, import_I_beam
, import_mass, import_nodal_load, time_start) # Create a worker object
self.worker.moveToThread(self.thread) # Move worker to the thread
# Connect signals and slots
self.thread.started.connect(self.worker.import_midas_fn)
self.worker.finished.connect(self.thread.quit)
self.worker.finished.connect(self.worker.deleteLater)
self.thread.finished.connect(self.thread.deleteLater)
# Start the thread
self.thread.start()
# Enable/Disable the Button
self.import_midas_btn.setEnabled(False)
self.print_name_btn.setEnabled(False)
self.convert_prop_btn.setEnabled(False)
self.insert_force_btn.setEnabled(False)
self.load_result_btn.setEnabled(False)
self.design_wall_btn.setEnabled(False)
self.print_pdf_btn.setEnabled(False)
self.print_docx_btn.setEnabled(False)
self.print_hwp_btn.setEnabled(False)
self.thread.finished.connect(lambda: self.import_midas_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.print_name_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.convert_prop_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.insert_force_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.load_result_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.design_wall_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.print_pdf_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.print_docx_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.print_hwp_btn.setEnabled(True))
# 완료 메세지
self.worker.msg.connect(self.msg_fn)
#%% Tab1 - Name
def run_worker2(self):
# 시작 메세지
time_start = time.time()
self.status_browser.append('Running.....')
# 변수 정리
input_xlsx_path = self.data_conv_path_editbox.text().strip()
drift_pos_raw = self.drift_pos_editbox.text().strip()
drift_position = []
for i in range(drift_pos_raw.count(',')+1):
drift_pos_elem = drift_pos_raw.split(',')[i].strip()
drift_position.append(drift_pos_elem)
# checkbox or editbox 비어있는 경우 break
while True:
if (input_xlsx_path == '') | (drift_pos_raw == False):
msg = 'Nothing Entered!'
msg_colored = '<span style=\" color: #ff0000;\">%s</span>' % msg
self.status_browser.append(msg_colored)
return
else: break
# QThread 오브젝트 생성
self.thread = QThread(parent=self) # Create a QThread object
# NameWorker 오브젝트 생성
self.worker = pbd.NameWorker(input_xlsx_path, drift_position, time_start) # Create a worker object
self.worker.moveToThread(self.thread) # Move worker to the thread
# Connect signals and slots
self.thread.started.connect(self.worker.naming_fn)
self.worker.finished.connect(self.thread.quit)
self.worker.finished.connect(self.worker.deleteLater)
self.thread.finished.connect(self.thread.deleteLater)
# Start the thread
self.thread.start()
# Enable/Disable the Button
self.import_midas_btn.setEnabled(False)
self.print_name_btn.setEnabled(False)
self.convert_prop_btn.setEnabled(False)
self.insert_force_btn.setEnabled(False)
self.load_result_btn.setEnabled(False)
self.design_wall_btn.setEnabled(False)
self.print_pdf_btn.setEnabled(False)
self.print_docx_btn.setEnabled(False)
self.print_hwp_btn.setEnabled(False)
self.thread.finished.connect(lambda: self.import_midas_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.print_name_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.convert_prop_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.insert_force_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.load_result_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.design_wall_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.print_pdf_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.print_docx_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.print_hwp_btn.setEnabled(True))
# 완료 메세지 print
self.worker.msg.connect(self.msg_fn)
#%% Tab1 - Convert
def run_worker3(self):
# 시작 메세지
time_start = time.time()
self.status_browser.append('Running.....')
# 변수 정리
input_xlsx_path = self.data_conv_path_editbox.text().strip()
get_cbeam = self.convert_cbeam_checkbox.isChecked()
get_gbeam = self.convert_gbeam_checkbox.isChecked()
get_ebeam = self.convert_ebeam_checkbox.isChecked()
get_gcol = self.convert_gcol_checkbox.isChecked()
get_ecol = self.convert_ecol_checkbox.isChecked()
get_wall = self.convert_wall_checkbox.isChecked()
# checkbox or editbox 비어있는 경우 break
while True:
if (get_cbeam == False) & (get_gbeam == False) & (get_ebeam == False)\
& (get_gcol == False) & (get_ecol == False) & (get_wall == False):
msg = 'Nothing Checked!'
msg_colored = '<span style=\" color: #ff0000;\">%s</span>' % msg
self.status_browser.append(msg_colored)
return
elif (input_xlsx_path == ''):
msg = 'Nothing Entered!'
msg_colored = '<span style=\" color: #ff0000;\">%s</span>' % msg
self.status_browser.append(msg_colored)
return
else: break
# QThread 오브젝트 생성
self.thread = QThread(parent=self) # Create a QThread object
# ConvertWorker 오브젝트 생성
self.worker = pbd.ConvertWorker(input_xlsx_path, get_cbeam, get_gbeam
, get_ebeam, get_gcol, get_ecol, get_wall
, time_start) # Create a worker object
self.worker.moveToThread(self.thread) # Move worker to the thread
# Connect signals and slots
self.thread.started.connect(self.worker.convert_property_fn)
self.worker.finished.connect(self.thread.quit)
self.worker.finished.connect(self.worker.deleteLater)
self.thread.finished.connect(self.thread.deleteLater)
# Start the thread
self.thread.start()
# Enable/Disable the Button
self.import_midas_btn.setEnabled(False)
self.print_name_btn.setEnabled(False)
self.convert_prop_btn.setEnabled(False)
self.insert_force_btn.setEnabled(False)
self.load_result_btn.setEnabled(False)
self.design_wall_btn.setEnabled(False)
self.print_pdf_btn.setEnabled(False)
self.print_docx_btn.setEnabled(False)
self.print_hwp_btn.setEnabled(False)
self.thread.finished.connect(lambda: self.import_midas_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.print_name_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.convert_prop_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.insert_force_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.load_result_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.design_wall_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.print_pdf_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.print_docx_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.print_hwp_btn.setEnabled(True))
# 완료 메세지 print
self.worker.msg.connect(self.msg_fn)
#%% Tab2 - Insert
def run_worker4(self):
# 시작 메세지
time_start = time.time()
self.status_browser.append('Running.....')
# 변수 정리
result_xlsx_path = self.result_path_editbox.text()
result_xlsx_path = result_xlsx_path.split('"')
result_xlsx_path = [i.strip() for i in result_xlsx_path if len(i) > 2]
input_xlsx_path = self.data_conv_path_editbox.text().strip()
get_gbeam = self.insert_gbeam_checkbox.isChecked()
get_gcol = self.insert_gcol_checkbox.isChecked()
get_ecol = self.insert_ecol_checkbox.isChecked()
# checkbox or editbox 비어있는 경우 break
while True:
if (get_gbeam == False) & (get_gcol == False) & (get_ecol == False):
msg = 'Nothing Checked!'
msg_colored = '<span style=\" color: #ff0000;\">%s</span>' % msg
self.status_browser.append(msg_colored)
return
elif (input_xlsx_path == '') | (len(result_xlsx_path) == 0):
msg = 'Nothing Entered!'
msg_colored = '<span style=\" color: #ff0000;\">%s</span>' % msg
self.status_browser.append(msg_colored)
return
else: break
# QThread 오브젝트 생성
self.thread = QThread(parent=self) # Create a QThread object
# InsertWorker 오브젝트 생성
self.worker = pbd.InsertWorker(input_xlsx_path, result_xlsx_path
, get_gbeam, get_gcol, get_ecol
, time_start) # Create a worker object
self.worker.moveToThread(self.thread) # Move worker to the thread
# Connect signals and slots
self.thread.started.connect(self.worker.insert_force_fn)
self.worker.finished.connect(self.thread.quit)
self.worker.finished.connect(self.worker.deleteLater)
self.thread.finished.connect(self.thread.deleteLater)
# Start the thread
self.thread.start()
# Enable/Disable the Button
self.import_midas_btn.setEnabled(False)
self.print_name_btn.setEnabled(False)
self.convert_prop_btn.setEnabled(False)
self.insert_force_btn.setEnabled(False)
self.load_result_btn.setEnabled(False)
self.design_wall_btn.setEnabled(False)
self.print_pdf_btn.setEnabled(False)
self.print_docx_btn.setEnabled(False)
self.print_hwp_btn.setEnabled(False)
self.thread.finished.connect(lambda: self.import_midas_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.print_name_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.convert_prop_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.insert_force_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.load_result_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.design_wall_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.print_pdf_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.print_docx_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.print_hwp_btn.setEnabled(True))
# 완료 메세지 print
self.worker.msg.connect(self.msg_fn)
#%% Tab3 - Load
def run_worker5(self):
# 시작 메세지
time_start = time.time()
self.status_browser.append('Running.....')
# 변수 정리
result_xlsx_path = self.result_path_editbox.text()
result_xlsx_path = result_xlsx_path.split('"')
result_xlsx_path = [i.strip() for i in result_xlsx_path if len(i) > 2]
input_xlsx_path = self.data_conv_path_editbox.text().strip()
wall_design_xlsx_path = self.wall_design_path_editbox.text().strip()
beam_design_xlsx_path = self.beam_design_path_editbox.text().strip()
dbeam_design_xlsx_path = self.dbeam_design_path_editbox.text().strip()
col_design_xlsx_path = self.col_design_path_editbox.text().strip()
get_cbeam = self.load_cbeam_checkbox.isChecked()
get_dbeam = self.load_dbeam_checkbox.isChecked()
get_wall = self.load_wall_checkbox.isChecked()
get_ecol = self.load_ecol_checkbox.isChecked()
BR_scale_factor = self.win_BR.BR_scale_factor_editbox.text().strip()
BR_scale_factor = float(BR_scale_factor)
# Worker 클래스에 입력할 Keyword Arguments Dict 생성
kwargs = {'result_xlsx_path': result_xlsx_path,
'input_xlsx_path': input_xlsx_path,
'wall_design_xlsx_path': wall_design_xlsx_path,
'beam_design_xlsx_path': beam_design_xlsx_path,
'dbeam_design_xlsx_path': dbeam_design_xlsx_path,
'col_design_xlsx_path': col_design_xlsx_path,
'get_cbeam': get_cbeam,
'get_dbeam': get_dbeam,
'get_wall': get_wall,
'get_ecol': get_ecol,
'BR_scale_factor': BR_scale_factor,
'time_start': time_start
}
# checkbox or editbox 비어있는 경우 break
while True:
if (get_cbeam == False) & (get_wall == False) & (get_ecol == False) & (get_dbeam == False):
msg = 'Nothing Checked!'
msg_colored = '<span style=\" color: #ff0000;\">%s</span>' % msg
self.status_browser.append(msg_colored)
return
elif (input_xlsx_path == '') | (len(result_xlsx_path) == 0)\
| (BR_scale_factor == ''):
msg = 'Nothing Entered!'
msg_colored = '<span style=\" color: #ff0000;\">%s</span>' % msg
self.status_browser.append(msg_colored)
return
elif (wall_design_xlsx_path == '') & (beam_design_xlsx_path == '')\
& (col_design_xlsx_path == '') & (dbeam_design_xlsx_path == ''):
msg = 'Nothing Entered!'
msg_colored = '<span style=\" color: #ff0000;\">%s</span>' % msg
self.status_browser.append(msg_colored)
return
else: break
# QThread 오브젝트 생성
self.thread = QThread(parent=self) # Create a QThread object
# InsertWorker 오브젝트 생성
self.worker = LoadWorker(**kwargs) # Create a worker object
self.worker.moveToThread(self.thread) # Move worker to the thread
# Connect signals and slots
self.thread.started.connect(self.worker.load_result_fn)
self.worker.finished.connect(self.thread.quit)
self.worker.finished.connect(self.worker.deleteLater)
self.thread.finished.connect(self.thread.deleteLater)
# Start the thread
self.thread.start()
# Enable/Disable the Button
self.import_midas_btn.setEnabled(False)
self.print_name_btn.setEnabled(False)
self.convert_prop_btn.setEnabled(False)
self.insert_force_btn.setEnabled(False)
self.load_result_btn.setEnabled(False)
self.design_wall_btn.setEnabled(False)
self.print_pdf_btn.setEnabled(False)
self.print_docx_btn.setEnabled(False)
self.preview_result_btn.setEnabled(False)
self.print_hwp_btn.setEnabled(False)
self.thread.finished.connect(lambda: self.import_midas_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.print_name_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.convert_prop_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.insert_force_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.load_result_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.design_wall_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.print_pdf_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.print_docx_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.preview_result_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.print_hwp_btn.setEnabled(True))
# 실패할 경우, 그냥 msg_fn 이용해서 오류 메세지 내보내기
# (단, 여기서 오류가 발생하는 경우, loadworker에서 데이터 처리하는 과정에서의 오류밖에 캐치 안됨)
self.worker.msg.connect(self.msg_fn)
#%% Tab3 - Print to docx
def run_worker6(self):
# 시작 메세지
time_start = time.time()
self.status_browser.append('Running.....')
# 변수 정리
result_xlsx_path = self.result_path_editbox.text()
result_xlsx_path = result_xlsx_path.split('"')
result_xlsx_path = [i.strip() for i in result_xlsx_path if len(i) > 2]
get_base_SF = self.base_SF_checkbox.isChecked()
get_story_SF = self.story_SF_checkbox.isChecked()
get_IDR = self.IDR_checkbox.isChecked()
get_BR = self.BR_checkbox.isChecked()
get_BSF = self.BSF_checkbox.isChecked()
get_E_BSF = self.E_BSF_checkbox.isChecked()
get_CR = self.CR_checkbox.isChecked()
get_CSF = self.CSF_checkbox.isChecked()
get_E_CSF = self.E_CSF_checkbox.isChecked()
get_WAS = self.WAS_checkbox.isChecked()
get_WR = self.WR_checkbox.isChecked()
get_WSF = self.WSF_checkbox.isChecked()
project_name = self.win_print.project_name_editbox.text().strip()
bldg_name = self.win_print.bldg_name_editbox.text().strip()
story_gap = self.win_print.story_gap_editbox.text().strip()
max_shear = self.win_print.max_shear_editbox.text().strip()
story_gap = int(story_gap)
max_shear = int(max_shear)
# Worker 클래스에 입력할 Keyword Arguments Dict 생성
kwargs = {'result_xlsx_path': result_xlsx_path,
'get_base_SF': get_base_SF,
'get_story_SF': get_story_SF,
'get_IDR': get_IDR,
'get_BR': get_BR,
'get_BSF': get_BSF,
'get_E_BSF': get_E_BSF,
'get_CR': get_CR,
'get_CSF': get_CSF,
'get_E_CSF': get_E_CSF,
'get_WAS': get_WAS,
'get_WR': get_WR,
'get_WSF': get_WSF,
'project_name': project_name,
'bldg_name': bldg_name,
'story_gap': story_gap,
'max_shear': max_shear,
'time_start': time_start}
# checkbox or editbox 비어있는 경우 / pickle 파일 없는 경우 break
while True:
if (get_base_SF == False) & (get_story_SF == False) & (get_IDR == False)\
& (get_BR == False) & (get_BSF == False) & (get_E_BSF == False)\
& (get_CR == False) & (get_CSF == False) & (get_E_CSF == False)\
& (get_WAS == False) & (get_WR == False) & (get_WSF == False):
msg = 'Nothing Checked!'
msg_colored = '<span style=\" color: #ff0000;\">%s</span>' % msg
self.status_browser.append(msg_colored)
return
elif (len(result_xlsx_path) == 0)\
| (project_name == '') | (bldg_name == '')\
| (story_gap == '') | (max_shear == ''):
msg = 'Nothing Entered!'
msg_colored = '<span style=\" color: #ff0000;\">%s</span>' % msg
self.status_browser.append(msg_colored)
return
elif (os.path.isdir('pkl') == False) | (len(os.listdir('pkl')) == 0):
msg = 'Click "Preview" First!'
msg_colored = '<span style=\" color: #ff0000;\">%s</span>' % msg
self.status_browser.append(msg_colored)
return
else: break
# QThread 오브젝트 생성
self.thread = QThread(parent=self) # Create a QThread object
# PdfWorker 오브젝트 생성
self.worker = DocxWorker(**kwargs) # Create a worker object
self.worker.moveToThread(self.thread) # Move worker to the thread
# Connect signals and slots
self.thread.started.connect(self.worker.print_docx_fn)
self.worker.finished.connect(self.thread.quit)
self.worker.finished.connect(self.worker.deleteLater)
self.thread.finished.connect(self.thread.deleteLater)
# Start the thread
self.thread.start()
# Enable/Disable the Button
self.import_midas_btn.setEnabled(False)
self.print_name_btn.setEnabled(False)
self.convert_prop_btn.setEnabled(False)
self.insert_force_btn.setEnabled(False)
self.load_result_btn.setEnabled(False)
self.design_wall_btn.setEnabled(False)
self.print_pdf_btn.setEnabled(False)
self.print_docx_btn.setEnabled(False)
self.preview_result_btn.setEnabled(False)
self.print_hwp_btn.setEnabled(False)
self.thread.finished.connect(lambda: self.import_midas_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.print_name_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.convert_prop_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.insert_force_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.load_result_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.design_wall_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.print_pdf_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.print_docx_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.preview_result_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.print_hwp_btn.setEnabled(True))
# 완료 메세지 print
self.worker.msg.connect(self.msg_fn)
#%% Tab3 - Design
def run_worker7(self):
# 시작 메세지
time_start = time.time()
self.status_browser.append('Running.....')
# 변수 정리
wall_design_xlsx_path = self.wall_design_path_editbox.text().strip()
# checkbox or editbox 비어있는 경우 break
while True:
if (wall_design_xlsx_path == ''):
msg = 'Nothing Entered!'
msg_colored = '<span style=\" color: #ff0000;\">%s</span>' % msg
self.status_browser.append(msg_colored)
return
else: break
# QThread 오브젝트 생성
self.thread = QThread(parent=self) # Create a QThread object
# InsertWorker 오브젝트 생성
self.worker = RedesignWorker(wall_design_xlsx_path, time_start) # Create a worker object
self.worker.moveToThread(self.thread) # Move worker to the thread
# Connect signals and slots
self.thread.started.connect(self.worker.redesign_wall_fn)
self.worker.finished.connect(self.thread.quit)
self.worker.finished.connect(self.worker.deleteLater)
self.thread.finished.connect(self.thread.deleteLater)
# Start the thread
self.thread.start()
# Enable/Disable the Button
self.import_midas_btn.setEnabled(False)
self.print_name_btn.setEnabled(False)
self.convert_prop_btn.setEnabled(False)
self.insert_force_btn.setEnabled(False)
self.load_result_btn.setEnabled(False)
self.design_wall_btn.setEnabled(False)
self.print_pdf_btn.setEnabled(False)
self.print_docx_btn.setEnabled(False)
self.preview_result_btn.setEnabled(False)
self.print_hwp_btn.setEnabled(False)
self.thread.finished.connect(lambda: self.import_midas_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.print_name_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.convert_prop_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.insert_force_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.load_result_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.design_wall_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.print_pdf_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.print_docx_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.preview_result_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.print_hwp_btn.setEnabled(True))
# 완료 메세지 print
self.worker.msg.connect(self.msg_fn)
#%% Tab3 - Print to pdf
def run_worker8(self):
# 시작 메세지
time_start = time.time()
self.status_browser.append('Running.....')
# 변수 정리
wall_design_xlsx_path = self.wall_design_path_editbox.text().strip()
beam_design_xlsx_path = self.beam_design_path_editbox.text().strip()
dbeam_design_xlsx_path = self.dbeam_design_path_editbox.text().strip()
col_design_xlsx_path = self.col_design_path_editbox.text().strip()
get_cbeam = self.cbeam_pdf_checkbox.isChecked()
get_dbeam = self.dbeam_pdf_checkbox.isChecked()
get_ecol = self.ecol_pdf_checkbox.isChecked()
get_wall = self.wall_pdf_checkbox.isChecked()
project_name = self.win_print.project_name_editbox.text().strip()
bldg_name = self.win_print.bldg_name_editbox.text().strip()
# Worker 클래스에 입력할 Keyword Arguments Dict 생성
kwargs = {'wall_design_xlsx_path':wall_design_xlsx_path,
'beam_design_xlsx_path':beam_design_xlsx_path,
'dbeam_design_xlsx_path':dbeam_design_xlsx_path,
'col_design_xlsx_path':col_design_xlsx_path,
'get_cbeam':get_cbeam,
'get_dbeam':get_dbeam,
'get_ecol':get_ecol,
'get_wall':get_wall,
'project_name':project_name,
'bldg_name':bldg_name,
'time_start':time_start}
# checkbox or editbox 비어있는 경우 break
while True:
if (get_cbeam == False) & (get_ecol == False) & (get_wall == False) & (get_dbeam == False):
msg = 'Nothing Checked!'
msg_colored = '<span style=\" color: #ff0000;\">%s</span>' % msg
self.status_browser.append(msg_colored)
return
elif (project_name == '') | (bldg_name == ''):
msg = 'Nothing Entered! (Project Name, Building Name)'
msg_colored = '<span style=\" color: #ff0000;\">%s</span>' % msg
self.status_browser.append(msg_colored)
return
elif (wall_design_xlsx_path == '') & (beam_design_xlsx_path == '')\
& (col_design_xlsx_path == '') & (dbeam_design_xlsx_path == ''):
msg = 'Nothing Entered!'
msg_colored = '<span style=\" color: #ff0000;\">%s</span>' % msg
self.status_browser.append(msg_colored)
return
else: break
# QThread 오브젝트 생성
self.thread = QThread(parent=self) # Create a QThread object
# PdfWorker 오브젝트 생성
self.worker = PdfWorker(**kwargs) # Create a worker object
self.worker.moveToThread(self.thread) # Move worker to the thread
# Connect signals and slots
self.thread.started.connect(self.worker.print_pdf_fn)
self.worker.finished.connect(self.thread.quit)
self.worker.finished.connect(self.worker.deleteLater)
self.thread.finished.connect(self.thread.deleteLater)
# Start the thread
self.thread.start()
# Enable/Disable the Button
self.import_midas_btn.setEnabled(False)
self.print_name_btn.setEnabled(False)
self.convert_prop_btn.setEnabled(False)
self.insert_force_btn.setEnabled(False)
self.load_result_btn.setEnabled(False)
self.design_wall_btn.setEnabled(False)
self.print_pdf_btn.setEnabled(False)
self.print_docx_btn.setEnabled(False)
self.preview_result_btn.setEnabled(False)
self.print_hwp_btn.setEnabled(False)
self.thread.finished.connect(lambda: self.import_midas_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.print_name_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.convert_prop_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.insert_force_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.load_result_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.design_wall_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.print_pdf_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.print_docx_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.preview_result_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.print_hwp_btn.setEnabled(True))
# 완료 메세지 print
self.worker.msg.connect(self.msg_fn)
#%% Tab3 - Preview
def run_worker9(self):
# 시작 메세지
time_start = time.time()
self.status_browser.append('Running.....')
# 변수 정리 (dictionary)
# story_gap = int(story_gap)
# max_shear = int(max_shear)
story_gap = 2
max_shear = 60000
result_xlsx_path = self.result_path_editbox.text()
result_xlsx_path = result_xlsx_path.split('"')
result_xlsx_path = [i.strip() for i in result_xlsx_path if len(i) > 2]
input_xlsx_path = self.data_conv_path_editbox.text().strip()
wall_design_xlsx_path = self.wall_design_path_editbox.text().strip()
beam_design_xlsx_path = self.beam_design_path_editbox.text().strip()
col_design_xlsx_path = self.col_design_path_editbox.text().strip()
get_base_SF = self.base_SF_checkbox.isChecked()
get_story_SF = self.story_SF_checkbox.isChecked()
get_IDR = self.IDR_checkbox.isChecked()
get_BR = self.BR_checkbox.isChecked()
get_BSF = self.BSF_checkbox.isChecked()
get_E_BSF = self.E_BSF_checkbox.isChecked()
get_CR = self.CR_checkbox.isChecked()
get_CSF = self.CSF_checkbox.isChecked()
get_E_CSF = self.E_CSF_checkbox.isChecked()
get_WAS = self.WAS_checkbox.isChecked()
get_WR = self.WR_checkbox.isChecked()
get_WSF = self.WSF_checkbox.isChecked()
# Worker 클래스에 입력할 Keyword Arguments Dict 생성
kwargs = {'result_xlsx_path':result_xlsx_path,
'input_xlsx_path':input_xlsx_path,
'wall_design_xlsx_path':wall_design_xlsx_path,
'beam_design_xlsx_path':beam_design_xlsx_path,
'col_design_xlsx_path':col_design_xlsx_path,
'get_base_SF':get_base_SF,
'get_story_SF':get_story_SF,
'get_IDR':get_IDR,
'get_BR':get_BR,
'get_BSF':get_BSF,
'get_E_BSF':get_E_BSF,
'get_CR':get_CR,
'get_CSF':get_CSF,
'get_E_CSF':get_E_CSF,
'get_WAS':get_WAS,
'get_WR':get_WR,
'get_WSF':get_WSF,
'story_gap':story_gap,
'max_shear':max_shear,
'time_start':time_start}
# checkbox or editbox 비어있는 경우 / pickle 파일 없는 경우 함수종료
while True:
if (get_base_SF == False) & (get_story_SF == False) & (get_IDR == False)\
& (get_BR == False) & (get_BSF == False) & (get_E_BSF == False)\
& (get_CR == False) & (get_CSF == False) & (get_E_CSF == False)\
& (get_WAS == False) & (get_WR == False) & (get_WSF == False):
msg = 'Nothing Checked!'
msg_colored = '<span style=\" color: #ff0000;\">%s</span>' % msg
self.status_browser.append(msg_colored)
return # 함수 종료
elif (input_xlsx_path == '') | (len(result_xlsx_path) == 0):
msg = 'Nothing Entered!'
msg_colored = '<span style=\" color: #ff0000;\">%s</span>' % msg
self.status_browser.append(msg_colored)
return
elif (wall_design_xlsx_path == '') & (beam_design_xlsx_path == '')\
& (col_design_xlsx_path == ''):
if (get_base_SF == True) | (get_story_SF == True) | (get_IDR == True):
break
else:
msg = 'Nothing Entered!'
msg_colored = '<span style=\" color: #ff0000;\">%s</span>' % msg
self.status_browser.append(msg_colored)
return
elif ((get_BR == True) | (get_BSF == True)) & (beam_design_xlsx_path == ''):
msg = 'Nothing Entered! (Seismic Design Coupling Beam)'
msg_colored = '<span style=\" color: #ff0000;\">%s</span>' % msg
self.status_browser.append(msg_colored)
return
elif ((get_WAS == True) | (get_WR == True) | (get_WSF == True)) & (wall_design_xlsx_path == ''):
msg = 'Nothing Entered! (Seismic Design Shear Wall)'
msg_colored = '<span style=\" color: #ff0000;\">%s</span>' % msg
self.status_browser.append(msg_colored)
return
else: break
# QThread 오브젝트 생성
self.thread = QThread(parent=self) # Create a QThread object
# InsertWorker 오브젝트 생성
self.worker = PreviewWorker(**kwargs) # Create a worker object
self.worker.moveToThread(self.thread) # Move worker to the thread
# Connect signals and slots
self.thread.started.connect(self.worker.preview_result_fn)
self.worker.finished.connect(self.thread.quit)
self.worker.finished.connect(self.worker.deleteLater)
self.thread.finished.connect(self.thread.deleteLater)
# Start the thread
self.thread.start()
# Send Signals(incl. result data) to plot_display/load_time_count functions
self.worker.result_data.connect(self.plot_display)
# self.worker.msg.connect(self.load_time_count)
# Enable/Disable the Button
self.import_midas_btn.setEnabled(False)
self.print_name_btn.setEnabled(False)
self.convert_prop_btn.setEnabled(False)
self.insert_force_btn.setEnabled(False)
self.load_result_btn.setEnabled(False)
self.design_wall_btn.setEnabled(False)
self.print_pdf_btn.setEnabled(False)
self.print_docx_btn.setEnabled(False)
self.preview_result_btn.setEnabled(False)
self.print_hwp_btn.setEnabled(False)
self.thread.finished.connect(lambda: self.import_midas_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.print_name_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.convert_prop_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.insert_force_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.load_result_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.design_wall_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.print_pdf_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.print_docx_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.preview_result_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.print_hwp_btn.setEnabled(True))
# 실패할 경우, 그냥 msg_fn 이용해서 오류 메세지 내보내기
# (단, 여기서 오류가 발생하는 경우, loadworker에서 데이터 처리하는 과정에서의 오류밖에 캐치 안됨)
self.worker.msg.connect(self.msg_fn)
#%% Tab3 - Print to hwp
def run_worker11(self):
# 시작 메세지
time_start = time.time()
self.status_browser.append('Running.....')
# 변수 정리
result_xlsx_path = self.result_path_editbox.text()
result_xlsx_path = result_xlsx_path.split('"')
result_xlsx_path = [i.strip() for i in result_xlsx_path if len(i) > 2]
get_base_SF = self.base_SF_checkbox.isChecked()
get_story_SF = self.story_SF_checkbox.isChecked()
get_IDR = self.IDR_checkbox.isChecked()
get_BR = self.BR_checkbox.isChecked()
get_BSF = self.BSF_checkbox.isChecked()
get_E_BSF = self.E_BSF_checkbox.isChecked()
get_CR = self.CR_checkbox.isChecked()
get_CSF = self.CSF_checkbox.isChecked()
get_E_CSF = self.E_CSF_checkbox.isChecked()
get_WAS = self.WAS_checkbox.isChecked()
get_WR = self.WR_checkbox.isChecked()
get_WSF = self.WSF_checkbox.isChecked()
project_name = self.win_print.project_name_editbox.text().strip()
bldg_name = self.win_print.bldg_name_editbox.text().strip()
story_gap = self.win_print.story_gap_editbox.text().strip()
max_shear = self.win_print.max_shear_editbox.text().strip()
story_gap = int(story_gap)
max_shear = int(max_shear)
# Worker 클래스에 입력할 Keyword Arguments Dict 생성
kwargs = {'result_xlsx_path': result_xlsx_path,
'get_base_SF': get_base_SF,
'get_story_SF': get_story_SF,
'get_IDR': get_IDR,
'get_BR': get_BR,
'get_BSF': get_BSF,
'get_E_BSF': get_E_BSF,
'get_CR': get_CR,
'get_CSF': get_CSF,
'get_E_CSF': get_E_CSF,
'get_WAS': get_WAS,
'get_WR': get_WR,
'get_WSF': get_WSF,
'project_name': project_name,
'bldg_name': bldg_name,
'story_gap': story_gap,
'max_shear': max_shear,
'time_start': time_start}
# checkbox or editbox 비어있는 경우 break
while True:
if (get_base_SF == False) & (get_story_SF == False) & (get_IDR == False)\
& (get_BR == False) & (get_BSF == False) & (get_E_BSF == False)\
& (get_CR == False) & (get_CSF == False) & (get_E_CSF == False)\
& (get_WAS == False) & (get_WR == False) & (get_WSF == False):
msg = 'Nothing Checked!'
msg_colored = '<span style=\" color: #ff0000;\">%s</span>' % msg
self.status_browser.append(msg_colored)
return
elif (len(result_xlsx_path) == 0)\
| (project_name == '') | (bldg_name == '')\
| (story_gap == '') | (max_shear == ''):
msg = 'Nothing Entered!'
msg_colored = '<span style=\" color: #ff0000;\">%s</span>' % msg
self.status_browser.append(msg_colored)
return
elif (os.path.isdir('pkl') == False) | (len(os.listdir('pkl')) == 0):
msg = 'Click "Preview" First!'
msg_colored = '<span style=\" color: #ff0000;\">%s</span>' % msg
self.status_browser.append(msg_colored)
return
else: break
# QThread 오브젝트 생성
self.thread = QThread(parent=self) # Create a QThread object
# PdfWorker 오브젝트 생성
self.worker = HwpWorker(**kwargs) # Create a worker object
self.worker.moveToThread(self.thread) # Move worker to the thread
# Connect signals and slots
self.thread.started.connect(self.worker.print_hwp_fn)
self.worker.finished.connect(self.thread.quit)
self.worker.finished.connect(self.worker.deleteLater)
self.thread.finished.connect(self.thread.deleteLater)
# Start the thread
self.thread.start()
# Enable/Disable the Button
self.import_midas_btn.setEnabled(False)
self.print_name_btn.setEnabled(False)
self.convert_prop_btn.setEnabled(False)
self.insert_force_btn.setEnabled(False)
self.load_result_btn.setEnabled(False)
self.design_wall_btn.setEnabled(False)
self.print_pdf_btn.setEnabled(False)
self.print_docx_btn.setEnabled(False)
self.preview_result_btn.setEnabled(False)
self.print_hwp_btn.setEnabled(False)
self.thread.finished.connect(lambda: self.import_midas_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.print_name_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.convert_prop_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.insert_force_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.load_result_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.design_wall_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.print_pdf_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.print_docx_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.preview_result_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.print_hwp_btn.setEnabled(True))
# 완료 메세지 print
self.worker.msg.connect(self.msg_fn)
#%% Tab2 - Macro
def run_worker10(self):
# 시작 메세지
time_start = time.time()
self.status_browser.append('Running.....')
# 변수 정리
input_xlsx_path = self.data_conv_path_editbox.text().strip()
macro_mode = self.macro_comboBox.currentText()
start_or_end = 'None'
pos_lefttop = self.up_left_coord_editbox.text()
pos_righttop = self.up_right_coord_editbox.text()
pos_leftbot = self.low_left_coord_editbox.text()
pos_rightbot = self.low_right_coord_editbox.text()
pos_p3dbar = self.p3d_bar_editbox.text()
pos_addcuts = self.add_cuts_editbox.text()
pos_deletecuts = self.delete_cuts_editbox.text()
pos_ok = self.ok_editbox.text()
pos_nextsection = self.next_section_editbox.text()
pos_nextframe = self.next_frame_editbox.text()
pos_ok_delete = self.ok_delete_editbox.text()
pos_missingdata = self.missing_data_editbox.text()
pos_assigncom = self.assign_comp_editbox.text()
pos_clearelem = self.clear_elem_editbox.text()
drag_duration = self.drag_duration_slider.value() / 100
offset = self.offset_slider.value()
wall_name = self.elem_name_editbox.text()
# checkbox or editbox 비어있는 경우 break
# while True:
# if (get_gbeam == False) & (get_gcol == False) & (get_ecol == False):
# msg = 'Nothing Checked!'
# msg_colored = '<span style=\" color: #ff0000;\">%s</span>' % msg
# self.status_browser.append(msg_colored)
# return
# elif (input_xlsx_path == '') | (len(result_xlsx_path) == 0):
# msg = 'Nothing Entered!'
# msg_colored = '<span style=\" color: #ff0000;\">%s</span>' % msg
# self.status_browser.append(msg_colored)
# return
# else: break
# QThread 오브젝트 생성
self.thread = QThread(parent=self) # Create a QThread object
# InsertWorker 오브젝트 생성
self.worker = MacroWorker(input_xlsx_path, start_or_end, macro_mode
, pos_lefttop, pos_righttop, pos_leftbot
, pos_rightbot, pos_p3dbar, pos_addcuts
, pos_deletecuts, pos_ok, pos_nextsection
, pos_nextframe, pos_ok_delete
, pos_missingdata, pos_assigncom
, pos_clearelem, drag_duration, offset
, wall_name, time_start) # Create a worker object
self.worker.moveToThread(self.thread) # Move worker to the thread
# Connect signals and slots
self.thread.started.connect(self.worker.macro_fn)
self.worker.finished.connect(self.thread.quit)
self.worker.finished.connect(self.worker.deleteLater)
self.thread.finished.connect(self.thread.deleteLater)
# Start the thread
self.thread.start()
# Enable/Disable the Button
self.import_midas_btn.setEnabled(False)
self.print_name_btn.setEnabled(False)
self.convert_prop_btn.setEnabled(False)
self.insert_force_btn.setEnabled(False)
self.load_result_btn.setEnabled(False)
self.design_wall_btn.setEnabled(False)
self.print_pdf_btn.setEnabled(False)
self.print_docx_btn.setEnabled(False)
self.print_hwp_btn.setEnabled(False)
self.thread.finished.connect(lambda: self.import_midas_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.print_name_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.convert_prop_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.insert_force_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.load_result_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.design_wall_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.print_pdf_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.print_docx_btn.setEnabled(True))
self.thread.finished.connect(lambda: self.print_hwp_btn.setEnabled(True))