-
Notifications
You must be signed in to change notification settings - Fork 0
/
main_interface.py
970 lines (961 loc) · 53.2 KB
/
main_interface.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
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'main_interface.ui'
#
# Created by: PyQt5 UI code generator 5.15.9
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_main_window(object):
def setupUi(self, main_window):
main_window.setObjectName("main_window")
main_window.resize(1083, 857)
main_window.setMinimumSize(QtCore.QSize(1083, 857))
main_window.setMaximumSize(QtCore.QSize(1083, 857))
main_window.setStyleSheet("background-color : #EDEADE;")
self.central_widget = QtWidgets.QWidget(main_window)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.central_widget.sizePolicy().hasHeightForWidth())
self.central_widget.setSizePolicy(sizePolicy)
self.central_widget.setStyleSheet("background-color : #EDEADE;")
self.central_widget.setObjectName("central_widget")
self.layoutWidget = QtWidgets.QWidget(self.central_widget)
self.layoutWidget.setGeometry(QtCore.QRect(10, 0, 1061, 831))
self.layoutWidget.setObjectName("layoutWidget")
self.base_horizontal_layout = QtWidgets.QHBoxLayout(self.layoutWidget)
self.base_horizontal_layout.setSizeConstraint(QtWidgets.QLayout.SetDefaultConstraint)
self.base_horizontal_layout.setContentsMargins(0, 0, 0, 0)
self.base_horizontal_layout.setSpacing(10)
self.base_horizontal_layout.setObjectName("base_horizontal_layout")
self.board_base_horizontal_layout = QtWidgets.QHBoxLayout()
self.board_base_horizontal_layout.setSpacing(0)
self.board_base_horizontal_layout.setObjectName("board_base_horizontal_layout")
self.square_ranks_vertical_base_layout = QtWidgets.QVBoxLayout()
self.square_ranks_vertical_base_layout.setContentsMargins(-1, 80, -1, 100)
self.square_ranks_vertical_base_layout.setSpacing(7)
self.square_ranks_vertical_base_layout.setObjectName("square_ranks_vertical_base_layout")
self.rank_8_label = QtWidgets.QLabel(self.layoutWidget)
font = QtGui.QFont()
font.setPointSize(8)
self.rank_8_label.setFont(font)
self.rank_8_label.setStyleSheet("")
self.rank_8_label.setObjectName("rank_8_label")
self.square_ranks_vertical_base_layout.addWidget(self.rank_8_label, 0, QtCore.Qt.AlignHCenter)
self.rank_7_label = QtWidgets.QLabel(self.layoutWidget)
self.rank_7_label.setObjectName("rank_7_label")
self.square_ranks_vertical_base_layout.addWidget(self.rank_7_label, 0, QtCore.Qt.AlignHCenter)
self.rank_6_label = QtWidgets.QLabel(self.layoutWidget)
self.rank_6_label.setObjectName("rank_6_label")
self.square_ranks_vertical_base_layout.addWidget(self.rank_6_label, 0, QtCore.Qt.AlignHCenter)
self.rank_5_label = QtWidgets.QLabel(self.layoutWidget)
self.rank_5_label.setObjectName("rank_5_label")
self.square_ranks_vertical_base_layout.addWidget(self.rank_5_label, 0, QtCore.Qt.AlignHCenter)
self.rank_4_label = QtWidgets.QLabel(self.layoutWidget)
self.rank_4_label.setObjectName("rank_4_label")
self.square_ranks_vertical_base_layout.addWidget(self.rank_4_label, 0, QtCore.Qt.AlignHCenter)
self.rank_3_label = QtWidgets.QLabel(self.layoutWidget)
self.rank_3_label.setObjectName("rank_3_label")
self.square_ranks_vertical_base_layout.addWidget(self.rank_3_label, 0, QtCore.Qt.AlignHCenter)
self.rank_2_label = QtWidgets.QLabel(self.layoutWidget)
self.rank_2_label.setObjectName("rank_2_label")
self.square_ranks_vertical_base_layout.addWidget(self.rank_2_label, 0, QtCore.Qt.AlignHCenter)
self.rank_1_label = QtWidgets.QLabel(self.layoutWidget)
self.rank_1_label.setObjectName("rank_1_label")
self.square_ranks_vertical_base_layout.addWidget(self.rank_1_label, 0, QtCore.Qt.AlignHCenter)
self.board_base_horizontal_layout.addLayout(self.square_ranks_vertical_base_layout)
self.board_base_vertical_layout = QtWidgets.QVBoxLayout()
self.board_base_vertical_layout.setSpacing(0)
self.board_base_vertical_layout.setObjectName("board_base_vertical_layout")
self.computer_frame = QtWidgets.QFrame(self.layoutWidget)
self.computer_frame.setStyleSheet("background-color : #b58863;")
self.computer_frame.setFrameShape(QtWidgets.QFrame.StyledPanel)
self.computer_frame.setFrameShadow(QtWidgets.QFrame.Raised)
self.computer_frame.setObjectName("computer_frame")
self.computer_text_label = QtWidgets.QLabel(self.computer_frame)
self.computer_text_label.setGeometry(QtCore.QRect(10, 20, 111, 21))
font = QtGui.QFont()
font.setFamily("JetBrains Mono")
font.setPointSize(12)
self.computer_text_label.setFont(font)
self.computer_text_label.setStyleSheet("")
self.computer_text_label.setObjectName("computer_text_label")
self.board_base_vertical_layout.addWidget(self.computer_frame)
self.squares_vertical_layout = QtWidgets.QVBoxLayout()
self.squares_vertical_layout.setSpacing(0)
self.squares_vertical_layout.setObjectName("squares_vertical_layout")
self.rank_8_squares_horizontal_layout = QtWidgets.QHBoxLayout()
self.rank_8_squares_horizontal_layout.setSpacing(0)
self.rank_8_squares_horizontal_layout.setObjectName("rank_8_squares_horizontal_layout")
self.a8 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.a8.sizePolicy().hasHeightForWidth())
self.a8.setSizePolicy(sizePolicy)
self.a8.setStyleSheet("background-color : #f0d9b5;\n"
"border-top: 2px solid black;")
self.a8.setText("")
self.a8.setObjectName("a8")
self.rank_8_squares_horizontal_layout.addWidget(self.a8)
self.b8 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.b8.sizePolicy().hasHeightForWidth())
self.b8.setSizePolicy(sizePolicy)
self.b8.setStyleSheet("background-color : #b58863;\n"
"border-top: 2px solid black;")
self.b8.setText("")
self.b8.setObjectName("b8")
self.rank_8_squares_horizontal_layout.addWidget(self.b8)
self.c8 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.c8.sizePolicy().hasHeightForWidth())
self.c8.setSizePolicy(sizePolicy)
self.c8.setStyleSheet("background-color : #f0d9b5;\n"
"border-top: 2px solid black;\n"
"")
self.c8.setText("")
self.c8.setObjectName("c8")
self.rank_8_squares_horizontal_layout.addWidget(self.c8)
self.d8 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.d8.sizePolicy().hasHeightForWidth())
self.d8.setSizePolicy(sizePolicy)
self.d8.setStyleSheet("background-color : #b58863;\n"
"border-top: 2px solid black;\n"
"")
self.d8.setText("")
self.d8.setObjectName("d8")
self.rank_8_squares_horizontal_layout.addWidget(self.d8)
self.e8 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.e8.sizePolicy().hasHeightForWidth())
self.e8.setSizePolicy(sizePolicy)
self.e8.setStyleSheet("background-color : #f0d9b5;\n"
"border-top: 2px solid black;")
self.e8.setText("")
self.e8.setObjectName("e8")
self.rank_8_squares_horizontal_layout.addWidget(self.e8)
self.f8 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.f8.sizePolicy().hasHeightForWidth())
self.f8.setSizePolicy(sizePolicy)
self.f8.setStyleSheet("background-color : #b58863;\n"
"border-top: 2px solid black;")
self.f8.setText("")
self.f8.setObjectName("f8")
self.rank_8_squares_horizontal_layout.addWidget(self.f8)
self.g8 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.g8.sizePolicy().hasHeightForWidth())
self.g8.setSizePolicy(sizePolicy)
self.g8.setStyleSheet("background-color : #f0d9b5;\n"
"border-top: 2px solid black;")
self.g8.setText("")
self.g8.setObjectName("g8")
self.rank_8_squares_horizontal_layout.addWidget(self.g8)
self.h8 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.h8.sizePolicy().hasHeightForWidth())
self.h8.setSizePolicy(sizePolicy)
self.h8.setStyleSheet("background-color : #b58863;\n"
"border-top: 2px solid black;")
self.h8.setText("")
self.h8.setObjectName("h8")
self.rank_8_squares_horizontal_layout.addWidget(self.h8)
self.squares_vertical_layout.addLayout(self.rank_8_squares_horizontal_layout)
self.rank_7_squares_horizontal_layout = QtWidgets.QHBoxLayout()
self.rank_7_squares_horizontal_layout.setSpacing(0)
self.rank_7_squares_horizontal_layout.setObjectName("rank_7_squares_horizontal_layout")
self.a7 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.a7.sizePolicy().hasHeightForWidth())
self.a7.setSizePolicy(sizePolicy)
self.a7.setStyleSheet("background-color : #b58863;\n"
"border: 0px solid black;")
self.a7.setText("")
self.a7.setObjectName("a7")
self.rank_7_squares_horizontal_layout.addWidget(self.a7)
self.b7 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.b7.sizePolicy().hasHeightForWidth())
self.b7.setSizePolicy(sizePolicy)
self.b7.setStyleSheet("background-color : #f0d9b5;\n"
"border: 0px solid black;")
self.b7.setText("")
self.b7.setObjectName("b7")
self.rank_7_squares_horizontal_layout.addWidget(self.b7)
self.c7 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.c7.sizePolicy().hasHeightForWidth())
self.c7.setSizePolicy(sizePolicy)
self.c7.setStyleSheet("background-color : #b58863;\n"
"border: 0px solid black;")
self.c7.setText("")
self.c7.setObjectName("c7")
self.rank_7_squares_horizontal_layout.addWidget(self.c7)
self.d7 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.d7.sizePolicy().hasHeightForWidth())
self.d7.setSizePolicy(sizePolicy)
self.d7.setStyleSheet("background-color : #f0d9b5;\n"
"border: 0px solid black;")
self.d7.setText("")
self.d7.setObjectName("d7")
self.rank_7_squares_horizontal_layout.addWidget(self.d7)
self.e7 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.e7.sizePolicy().hasHeightForWidth())
self.e7.setSizePolicy(sizePolicy)
self.e7.setStyleSheet("background-color : #b58863;\n"
"border: 0px solid black;")
self.e7.setText("")
self.e7.setObjectName("e7")
self.rank_7_squares_horizontal_layout.addWidget(self.e7)
self.f7 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.f7.sizePolicy().hasHeightForWidth())
self.f7.setSizePolicy(sizePolicy)
self.f7.setStyleSheet("background-color : #f0d9b5;\n"
"border: 0px solid black;")
self.f7.setText("")
self.f7.setObjectName("f7")
self.rank_7_squares_horizontal_layout.addWidget(self.f7)
self.g7 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.g7.sizePolicy().hasHeightForWidth())
self.g7.setSizePolicy(sizePolicy)
self.g7.setStyleSheet("background-color : #b58863;\n"
"border: 0px solid black;")
self.g7.setText("")
self.g7.setObjectName("g7")
self.rank_7_squares_horizontal_layout.addWidget(self.g7)
self.h7 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.h7.sizePolicy().hasHeightForWidth())
self.h7.setSizePolicy(sizePolicy)
self.h7.setStyleSheet("background-color : #f0d9b5;\n"
"border: 0px solid black;")
self.h7.setText("")
self.h7.setObjectName("h7")
self.rank_7_squares_horizontal_layout.addWidget(self.h7)
self.squares_vertical_layout.addLayout(self.rank_7_squares_horizontal_layout)
self.rank_6_squares_horizontal_layout = QtWidgets.QHBoxLayout()
self.rank_6_squares_horizontal_layout.setSpacing(0)
self.rank_6_squares_horizontal_layout.setObjectName("rank_6_squares_horizontal_layout")
self.a6 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.a6.sizePolicy().hasHeightForWidth())
self.a6.setSizePolicy(sizePolicy)
self.a6.setStyleSheet("background-color : #f0d9b5;\n"
"border: 0px solid black;")
self.a6.setText("")
self.a6.setObjectName("a6")
self.rank_6_squares_horizontal_layout.addWidget(self.a6)
self.b6 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.b6.sizePolicy().hasHeightForWidth())
self.b6.setSizePolicy(sizePolicy)
self.b6.setStyleSheet("background-color : #b58863;\n"
"border: 0px solid black;")
self.b6.setText("")
self.b6.setObjectName("b6")
self.rank_6_squares_horizontal_layout.addWidget(self.b6)
self.c6 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.c6.sizePolicy().hasHeightForWidth())
self.c6.setSizePolicy(sizePolicy)
self.c6.setStyleSheet("background-color : #f0d9b5;\n"
"border: 0px solid black;")
self.c6.setText("")
self.c6.setObjectName("c6")
self.rank_6_squares_horizontal_layout.addWidget(self.c6)
self.d6 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.d6.sizePolicy().hasHeightForWidth())
self.d6.setSizePolicy(sizePolicy)
self.d6.setStyleSheet("background-color : #b58863;\n"
"border: 0px solid black;")
self.d6.setText("")
self.d6.setObjectName("d6")
self.rank_6_squares_horizontal_layout.addWidget(self.d6)
self.e6 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.e6.sizePolicy().hasHeightForWidth())
self.e6.setSizePolicy(sizePolicy)
self.e6.setStyleSheet("background-color : #f0d9b5;\n"
"border: 0px solid black;")
self.e6.setText("")
self.e6.setObjectName("e6")
self.rank_6_squares_horizontal_layout.addWidget(self.e6)
self.f6 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.f6.sizePolicy().hasHeightForWidth())
self.f6.setSizePolicy(sizePolicy)
self.f6.setStyleSheet("background-color : #b58863;\n"
"border: 0px solid black;")
self.f6.setText("")
self.f6.setObjectName("f6")
self.rank_6_squares_horizontal_layout.addWidget(self.f6)
self.g6 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.g6.sizePolicy().hasHeightForWidth())
self.g6.setSizePolicy(sizePolicy)
self.g6.setStyleSheet("background-color : #f0d9b5;\n"
"border: 0px solid black;")
self.g6.setText("")
self.g6.setObjectName("g6")
self.rank_6_squares_horizontal_layout.addWidget(self.g6)
self.h6 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.h6.sizePolicy().hasHeightForWidth())
self.h6.setSizePolicy(sizePolicy)
self.h6.setStyleSheet("background-color : #b58863;\n"
"border: 0px solid black;")
self.h6.setText("")
self.h6.setObjectName("h6")
self.rank_6_squares_horizontal_layout.addWidget(self.h6)
self.squares_vertical_layout.addLayout(self.rank_6_squares_horizontal_layout)
self.rank_5_squares_horizontal_layout = QtWidgets.QHBoxLayout()
self.rank_5_squares_horizontal_layout.setSpacing(0)
self.rank_5_squares_horizontal_layout.setObjectName("rank_5_squares_horizontal_layout")
self.a5 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.a5.sizePolicy().hasHeightForWidth())
self.a5.setSizePolicy(sizePolicy)
self.a5.setStyleSheet("background-color : #b58863;\n"
"border: 0px solid black;")
self.a5.setText("")
self.a5.setObjectName("a5")
self.rank_5_squares_horizontal_layout.addWidget(self.a5)
self.b5 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.b5.sizePolicy().hasHeightForWidth())
self.b5.setSizePolicy(sizePolicy)
self.b5.setStyleSheet("background-color : #f0d9b5;\n"
"border: 0px solid black;")
self.b5.setText("")
self.b5.setObjectName("b5")
self.rank_5_squares_horizontal_layout.addWidget(self.b5)
self.c5 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.c5.sizePolicy().hasHeightForWidth())
self.c5.setSizePolicy(sizePolicy)
self.c5.setStyleSheet("background-color : #b58863;\n"
"border: 0px solid black;")
self.c5.setText("")
self.c5.setObjectName("c5")
self.rank_5_squares_horizontal_layout.addWidget(self.c5)
self.d5 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.d5.sizePolicy().hasHeightForWidth())
self.d5.setSizePolicy(sizePolicy)
self.d5.setStyleSheet("background-color : #f0d9b5;\n"
"border: 0px solid black;")
self.d5.setText("")
self.d5.setObjectName("d5")
self.rank_5_squares_horizontal_layout.addWidget(self.d5)
self.e5 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.e5.sizePolicy().hasHeightForWidth())
self.e5.setSizePolicy(sizePolicy)
self.e5.setStyleSheet("background-color : #b58863;\n"
"border: 0px solid black;")
self.e5.setText("")
self.e5.setObjectName("e5")
self.rank_5_squares_horizontal_layout.addWidget(self.e5)
self.f5 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.f5.sizePolicy().hasHeightForWidth())
self.f5.setSizePolicy(sizePolicy)
self.f5.setStyleSheet("background-color : #f0d9b5;\n"
"border: 0px solid black;")
self.f5.setText("")
self.f5.setObjectName("f5")
self.rank_5_squares_horizontal_layout.addWidget(self.f5)
self.g5 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.g5.sizePolicy().hasHeightForWidth())
self.g5.setSizePolicy(sizePolicy)
self.g5.setStyleSheet("background-color : #b58863;\n"
"border: 0px solid black;")
self.g5.setText("")
self.g5.setObjectName("g5")
self.rank_5_squares_horizontal_layout.addWidget(self.g5)
self.h5 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.h5.sizePolicy().hasHeightForWidth())
self.h5.setSizePolicy(sizePolicy)
self.h5.setStyleSheet("background-color : #f0d9b5;\n"
"border: 0px solid black;")
self.h5.setText("")
self.h5.setObjectName("h5")
self.rank_5_squares_horizontal_layout.addWidget(self.h5)
self.squares_vertical_layout.addLayout(self.rank_5_squares_horizontal_layout)
self.rank_4_squares_horizontal_layout = QtWidgets.QHBoxLayout()
self.rank_4_squares_horizontal_layout.setSpacing(0)
self.rank_4_squares_horizontal_layout.setObjectName("rank_4_squares_horizontal_layout")
self.a4 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.a4.sizePolicy().hasHeightForWidth())
self.a4.setSizePolicy(sizePolicy)
self.a4.setStyleSheet("background-color : #f0d9b5;\n"
"border: 0px solid black;")
self.a4.setText("")
self.a4.setObjectName("a4")
self.rank_4_squares_horizontal_layout.addWidget(self.a4)
self.b4 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.b4.sizePolicy().hasHeightForWidth())
self.b4.setSizePolicy(sizePolicy)
self.b4.setStyleSheet("background-color : #b58863;\n"
"border: 0px solid black;")
self.b4.setText("")
self.b4.setObjectName("b4")
self.rank_4_squares_horizontal_layout.addWidget(self.b4)
self.c4 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.c4.sizePolicy().hasHeightForWidth())
self.c4.setSizePolicy(sizePolicy)
self.c4.setStyleSheet("background-color : #f0d9b5;\n"
"border: 0px solid black;")
self.c4.setText("")
self.c4.setObjectName("c4")
self.rank_4_squares_horizontal_layout.addWidget(self.c4)
self.d4 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.d4.sizePolicy().hasHeightForWidth())
self.d4.setSizePolicy(sizePolicy)
self.d4.setStyleSheet("background-color : #b58863;\n"
"border: 0px solid black;")
self.d4.setText("")
self.d4.setObjectName("d4")
self.rank_4_squares_horizontal_layout.addWidget(self.d4)
self.e4 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.e4.sizePolicy().hasHeightForWidth())
self.e4.setSizePolicy(sizePolicy)
self.e4.setStyleSheet("background-color : #f0d9b5;\n"
"border: 0px solid black;")
self.e4.setText("")
self.e4.setObjectName("e4")
self.rank_4_squares_horizontal_layout.addWidget(self.e4)
self.f4 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.f4.sizePolicy().hasHeightForWidth())
self.f4.setSizePolicy(sizePolicy)
self.f4.setStyleSheet("background-color : #b58863;\n"
"border: 0px solid black;")
self.f4.setText("")
self.f4.setObjectName("f4")
self.rank_4_squares_horizontal_layout.addWidget(self.f4)
self.g4 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.g4.sizePolicy().hasHeightForWidth())
self.g4.setSizePolicy(sizePolicy)
self.g4.setStyleSheet("background-color : #f0d9b5;\n"
"border: 0px solid black;")
self.g4.setText("")
self.g4.setObjectName("g4")
self.rank_4_squares_horizontal_layout.addWidget(self.g4)
self.h4 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.h4.sizePolicy().hasHeightForWidth())
self.h4.setSizePolicy(sizePolicy)
self.h4.setStyleSheet("background-color : #b58863;\n"
"border: 0px solid black;\n"
"")
self.h4.setText("")
self.h4.setObjectName("h4")
self.rank_4_squares_horizontal_layout.addWidget(self.h4)
self.squares_vertical_layout.addLayout(self.rank_4_squares_horizontal_layout)
self.rank_3_squares_horizontal_layout = QtWidgets.QHBoxLayout()
self.rank_3_squares_horizontal_layout.setSpacing(0)
self.rank_3_squares_horizontal_layout.setObjectName("rank_3_squares_horizontal_layout")
self.a3 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.a3.sizePolicy().hasHeightForWidth())
self.a3.setSizePolicy(sizePolicy)
self.a3.setStyleSheet("background-color : #b58863;\n"
"border: 0px solid black;")
self.a3.setText("")
self.a3.setObjectName("a3")
self.rank_3_squares_horizontal_layout.addWidget(self.a3)
self.b3 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.b3.sizePolicy().hasHeightForWidth())
self.b3.setSizePolicy(sizePolicy)
self.b3.setStyleSheet("background-color : #f0d9b5;\n"
"border: 0px solid black;")
self.b3.setText("")
self.b3.setObjectName("b3")
self.rank_3_squares_horizontal_layout.addWidget(self.b3)
self.c3 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.c3.sizePolicy().hasHeightForWidth())
self.c3.setSizePolicy(sizePolicy)
self.c3.setStyleSheet("background-color : #b58863;\n"
"border: 0px solid black;")
self.c3.setText("")
self.c3.setObjectName("c3")
self.rank_3_squares_horizontal_layout.addWidget(self.c3)
self.d3 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.d3.sizePolicy().hasHeightForWidth())
self.d3.setSizePolicy(sizePolicy)
self.d3.setStyleSheet("background-color : #f0d9b5;\n"
"border: 0px solid black;")
self.d3.setText("")
self.d3.setObjectName("d3")
self.rank_3_squares_horizontal_layout.addWidget(self.d3)
self.e3 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.e3.sizePolicy().hasHeightForWidth())
self.e3.setSizePolicy(sizePolicy)
self.e3.setStyleSheet("background-color : #b58863;\n"
"border: 0px solid black;")
self.e3.setText("")
self.e3.setObjectName("e3")
self.rank_3_squares_horizontal_layout.addWidget(self.e3)
self.f3 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.f3.sizePolicy().hasHeightForWidth())
self.f3.setSizePolicy(sizePolicy)
self.f3.setStyleSheet("background-color : #f0d9b5;\n"
"border: 0px solid black;")
self.f3.setText("")
self.f3.setObjectName("f3")
self.rank_3_squares_horizontal_layout.addWidget(self.f3)
self.g3 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.g3.sizePolicy().hasHeightForWidth())
self.g3.setSizePolicy(sizePolicy)
self.g3.setStyleSheet("background-color : #b58863;\n"
"border: 0px solid black;")
self.g3.setText("")
self.g3.setObjectName("g3")
self.rank_3_squares_horizontal_layout.addWidget(self.g3)
self.h3 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.h3.sizePolicy().hasHeightForWidth())
self.h3.setSizePolicy(sizePolicy)
self.h3.setStyleSheet("background-color : #f0d9b5;\n"
"border: 0px solid black;")
self.h3.setText("")
self.h3.setObjectName("h3")
self.rank_3_squares_horizontal_layout.addWidget(self.h3)
self.squares_vertical_layout.addLayout(self.rank_3_squares_horizontal_layout)
self.rank_2_squares_horizontal_layout = QtWidgets.QHBoxLayout()
self.rank_2_squares_horizontal_layout.setSpacing(0)
self.rank_2_squares_horizontal_layout.setObjectName("rank_2_squares_horizontal_layout")
self.a2 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.a2.sizePolicy().hasHeightForWidth())
self.a2.setSizePolicy(sizePolicy)
self.a2.setStyleSheet("background-color : #f0d9b5;\n"
"border: 0px solid black;")
self.a2.setText("")
self.a2.setObjectName("a2")
self.rank_2_squares_horizontal_layout.addWidget(self.a2)
self.b2 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.b2.sizePolicy().hasHeightForWidth())
self.b2.setSizePolicy(sizePolicy)
self.b2.setStyleSheet("background-color : #b58863;\n"
"border: 0px solid black;")
self.b2.setText("")
self.b2.setObjectName("b2")
self.rank_2_squares_horizontal_layout.addWidget(self.b2)
self.c2 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.c2.sizePolicy().hasHeightForWidth())
self.c2.setSizePolicy(sizePolicy)
self.c2.setStyleSheet("background-color : #f0d9b5;\n"
"border: 0px solid black;")
self.c2.setText("")
self.c2.setObjectName("c2")
self.rank_2_squares_horizontal_layout.addWidget(self.c2)
self.d2 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.d2.sizePolicy().hasHeightForWidth())
self.d2.setSizePolicy(sizePolicy)
self.d2.setStyleSheet("background-color : #b58863;\n"
"border: 0px solid black;")
self.d2.setText("")
self.d2.setObjectName("d2")
self.rank_2_squares_horizontal_layout.addWidget(self.d2)
self.e2 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.e2.sizePolicy().hasHeightForWidth())
self.e2.setSizePolicy(sizePolicy)
self.e2.setStyleSheet("background-color : #f0d9b5;\n"
"border: 0px solid black;")
self.e2.setText("")
self.e2.setObjectName("e2")
self.rank_2_squares_horizontal_layout.addWidget(self.e2)
self.f2 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.f2.sizePolicy().hasHeightForWidth())
self.f2.setSizePolicy(sizePolicy)
self.f2.setStyleSheet("background-color : #b58863;\n"
"border: 0px solid black;")
self.f2.setText("")
self.f2.setObjectName("f2")
self.rank_2_squares_horizontal_layout.addWidget(self.f2)
self.g2 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.g2.sizePolicy().hasHeightForWidth())
self.g2.setSizePolicy(sizePolicy)
self.g2.setStyleSheet("background-color : #f0d9b5;\n"
"border: 0px solid black;")
self.g2.setText("")
self.g2.setObjectName("g2")
self.rank_2_squares_horizontal_layout.addWidget(self.g2)
self.h2 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.h2.sizePolicy().hasHeightForWidth())
self.h2.setSizePolicy(sizePolicy)
self.h2.setStyleSheet("background-color : #b58863;\n"
"border: 0px solid black;")
self.h2.setText("")
self.h2.setObjectName("h2")
self.rank_2_squares_horizontal_layout.addWidget(self.h2)
self.squares_vertical_layout.addLayout(self.rank_2_squares_horizontal_layout)
self.rank_1_squares_horizontal_layout = QtWidgets.QHBoxLayout()
self.rank_1_squares_horizontal_layout.setSpacing(0)
self.rank_1_squares_horizontal_layout.setObjectName("rank_1_squares_horizontal_layout")
self.a1 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.a1.sizePolicy().hasHeightForWidth())
self.a1.setSizePolicy(sizePolicy)
self.a1.setStyleSheet("background-color : #b58863;\n"
"border: 0px solid black;\n")
self.a1.setText("")
self.a1.setObjectName("a1")
self.rank_1_squares_horizontal_layout.addWidget(self.a1)
self.b1 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.b1.sizePolicy().hasHeightForWidth())
self.b1.setSizePolicy(sizePolicy)
self.b1.setStyleSheet("background-color : #f0d9b5;\n"
"border: 0px solid black;\n")
self.b1.setText("")
self.b1.setDefault(False)
self.b1.setFlat(False)
self.b1.setObjectName("b1")
self.rank_1_squares_horizontal_layout.addWidget(self.b1)
self.c1 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.c1.sizePolicy().hasHeightForWidth())
self.c1.setSizePolicy(sizePolicy)
self.c1.setStyleSheet("background-color : #b58863;\n"
"border: 0px solid black;\n")
self.c1.setText("")
self.c1.setObjectName("c1")
self.rank_1_squares_horizontal_layout.addWidget(self.c1)
self.d1 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.d1.sizePolicy().hasHeightForWidth())
self.d1.setSizePolicy(sizePolicy)
self.d1.setStyleSheet("background-color : #f0d9b5;\n"
"border: 0px solid black;\n")
self.d1.setText("")
self.d1.setObjectName("d1")
self.rank_1_squares_horizontal_layout.addWidget(self.d1)
self.e1 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.e1.sizePolicy().hasHeightForWidth())
self.e1.setSizePolicy(sizePolicy)
self.e1.setStyleSheet("background-color : #b58863;\n"
"border: 0px solid black;\n")
self.e1.setText("")
self.e1.setObjectName("e1")
self.rank_1_squares_horizontal_layout.addWidget(self.e1)
self.f1 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.f1.sizePolicy().hasHeightForWidth())
self.f1.setSizePolicy(sizePolicy)
self.f1.setStyleSheet("background-color : #f0d9b5;\n"
"border: 0px solid black;\n")
self.f1.setText("")
self.f1.setObjectName("f1")
self.rank_1_squares_horizontal_layout.addWidget(self.f1)
self.g1 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.g1.sizePolicy().hasHeightForWidth())
self.g1.setSizePolicy(sizePolicy)
self.g1.setStyleSheet("background-color : #b58863;\n"
"border: 0px solid black;\n")
self.g1.setText("")
self.g1.setObjectName("g1")
self.rank_1_squares_horizontal_layout.addWidget(self.g1)
self.h1 = QtWidgets.QPushButton(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.h1.sizePolicy().hasHeightForWidth())
self.h1.setSizePolicy(sizePolicy)
self.h1.setStyleSheet("background-color : #f0d9b5;\n"
"border: 0px solid black;\n")
self.h1.setText("")
self.h1.setObjectName("h1")
self.rank_1_squares_horizontal_layout.addWidget(self.h1)
self.squares_vertical_layout.addLayout(self.rank_1_squares_horizontal_layout)
self.board_base_vertical_layout.addLayout(self.squares_vertical_layout)
self.square_files_horizontal_base_layout = QtWidgets.QHBoxLayout()
self.square_files_horizontal_base_layout.setObjectName("square_files_horizontal_base_layout")
self.file_a_label = QtWidgets.QLabel(self.layoutWidget)
self.file_a_label.setStyleSheet("")
self.file_a_label.setObjectName("file_a_label")
self.square_files_horizontal_base_layout.addWidget(self.file_a_label, 0, QtCore.Qt.AlignHCenter)
self.file_b_label = QtWidgets.QLabel(self.layoutWidget)
self.file_b_label.setStyleSheet("")
self.file_b_label.setObjectName("file_b_label")
self.square_files_horizontal_base_layout.addWidget(self.file_b_label, 0, QtCore.Qt.AlignHCenter)
self.file_c_label = QtWidgets.QLabel(self.layoutWidget)
self.file_c_label.setStyleSheet("")
self.file_c_label.setObjectName("file_c_label")
self.square_files_horizontal_base_layout.addWidget(self.file_c_label, 0, QtCore.Qt.AlignHCenter)
self.file_d_label = QtWidgets.QLabel(self.layoutWidget)
self.file_d_label.setStyleSheet("")
self.file_d_label.setObjectName("file_d_label")
self.square_files_horizontal_base_layout.addWidget(self.file_d_label, 0, QtCore.Qt.AlignHCenter)
self.file_e_label = QtWidgets.QLabel(self.layoutWidget)
self.file_e_label.setStyleSheet("")
self.file_e_label.setObjectName("file_e_label")
self.square_files_horizontal_base_layout.addWidget(self.file_e_label, 0, QtCore.Qt.AlignHCenter)
self.file_f_label = QtWidgets.QLabel(self.layoutWidget)
self.file_f_label.setObjectName("file_f_label")
self.square_files_horizontal_base_layout.addWidget(self.file_f_label, 0, QtCore.Qt.AlignHCenter)
self.file_g_label = QtWidgets.QLabel(self.layoutWidget)
self.file_g_label.setObjectName("file_g_label")
self.square_files_horizontal_base_layout.addWidget(self.file_g_label, 0, QtCore.Qt.AlignHCenter)
self.file_h_label = QtWidgets.QLabel(self.layoutWidget)
self.file_h_label.setObjectName("file_h_label")
self.square_files_horizontal_base_layout.addWidget(self.file_h_label, 0, QtCore.Qt.AlignHCenter)
self.board_base_vertical_layout.addLayout(self.square_files_horizontal_base_layout)
self.you_frame = QtWidgets.QFrame(self.layoutWidget)
self.you_frame.setStyleSheet("background-color : #f0d9b5;")
self.you_frame.setFrameShape(QtWidgets.QFrame.StyledPanel)
self.you_frame.setFrameShadow(QtWidgets.QFrame.Raised)
self.you_frame.setObjectName("you_frame")
self.you_text_label = QtWidgets.QLabel(self.you_frame)
self.you_text_label.setGeometry(QtCore.QRect(10, 20, 51, 21))
font = QtGui.QFont()
font.setFamily("JetBrains Mono")
font.setPointSize(12)
self.you_text_label.setFont(font)
self.you_text_label.setStyleSheet("")
self.you_text_label.setObjectName("you_text_label")
self.board_base_vertical_layout.addWidget(self.you_frame)
self.board_base_vertical_layout.setStretch(0, 1)
self.board_base_vertical_layout.setStretch(1, 10)
self.board_base_vertical_layout.setStretch(3, 1)
self.board_base_horizontal_layout.addLayout(self.board_base_vertical_layout)
self.board_base_horizontal_layout.setStretch(0, 1)
self.board_base_horizontal_layout.setStretch(1, 40)
self.base_horizontal_layout.addLayout(self.board_base_horizontal_layout)
self.history_section_horizontal_base_layout = QtWidgets.QHBoxLayout()
self.history_section_horizontal_base_layout.setContentsMargins(-1, 32, -1, 86)
self.history_section_horizontal_base_layout.setSpacing(5)
self.history_section_horizontal_base_layout.setObjectName("history_section_horizontal_base_layout")
self.white_history_section_vertical_layout = QtWidgets.QVBoxLayout()
self.white_history_section_vertical_layout.setObjectName("white_history_section_vertical_layout")
self.white_text_label = QtWidgets.QLabel(self.layoutWidget)
font = QtGui.QFont()
font.setFamily("JetBrains Mono")
font.setPointSize(14)
self.white_text_label.setFont(font)
self.white_text_label.setObjectName("white_text_label")
self.white_history_section_vertical_layout.addWidget(self.white_text_label, 0, QtCore.Qt.AlignHCenter|QtCore.Qt.AlignVCenter)
self.white_history_listwidget = QtWidgets.QListWidget(self.layoutWidget)
self.white_history_listwidget.setObjectName("white_history_listwidget")
self.white_history_section_vertical_layout.addWidget(self.white_history_listwidget)
self.history_section_horizontal_base_layout.addLayout(self.white_history_section_vertical_layout)
self.black_history_section_vertical_layout = QtWidgets.QVBoxLayout()
self.black_history_section_vertical_layout.setObjectName("black_history_section_vertical_layout")
self.black_text_label = QtWidgets.QLabel(self.layoutWidget)
font = QtGui.QFont()
font.setFamily("JetBrains Mono")
font.setPointSize(14)
self.black_text_label.setFont(font)
self.black_text_label.setObjectName("black_text_label")
self.black_history_section_vertical_layout.addWidget(self.black_text_label, 0, QtCore.Qt.AlignHCenter|QtCore.Qt.AlignVCenter)
self.black_history_listwidget = QtWidgets.QListWidget(self.layoutWidget)
self.black_history_listwidget.setObjectName("black_history_listwidget")
self.black_history_section_vertical_layout.addWidget(self.black_history_listwidget)
self.history_section_horizontal_base_layout.addLayout(self.black_history_section_vertical_layout)
self.base_horizontal_layout.addLayout(self.history_section_horizontal_base_layout)
self.base_horizontal_layout.setStretch(0, 10)
self.base_horizontal_layout.setStretch(1, 4)
main_window.setCentralWidget(self.central_widget)
self.menu_bar = QtWidgets.QMenuBar(main_window)
self.menu_bar.setGeometry(QtCore.QRect(0, 0, 1083, 26))
self.menu_bar.setObjectName("menu_bar")
self.menu_save = QtWidgets.QMenu(self.menu_bar)
self.menu_save.setObjectName("menu_save")
self.menu_load = QtWidgets.QMenu(self.menu_bar)
self.menu_load.setObjectName("menu_load")
main_window.setMenuBar(self.menu_bar)
self.menu_bar.addAction(self.menu_save.menuAction())
self.menu_bar.addAction(self.menu_load.menuAction())
self.retranslateUi(main_window)
QtCore.QMetaObject.connectSlotsByName(main_window)
def retranslateUi(self, main_window):
_translate = QtCore.QCoreApplication.translate
main_window.setWindowTitle(_translate("main_window", "MainWindow"))
self.rank_8_label.setText(_translate("main_window", "8"))
self.rank_7_label.setText(_translate("main_window", "7"))
self.rank_6_label.setText(_translate("main_window", "6"))
self.rank_5_label.setText(_translate("main_window", "5"))
self.rank_4_label.setText(_translate("main_window", "4"))
self.rank_3_label.setText(_translate("main_window", "3"))
self.rank_2_label.setText(_translate("main_window", "2"))
self.rank_1_label.setText(_translate("main_window", "1"))
self.computer_text_label.setText(_translate("main_window", "COMPUTER:"))
self.file_a_label.setText(_translate("main_window", "A"))
self.file_b_label.setText(_translate("main_window", "B"))
self.file_c_label.setText(_translate("main_window", "C"))
self.file_d_label.setText(_translate("main_window", "D"))
self.file_e_label.setText(_translate("main_window", "E"))
self.file_f_label.setText(_translate("main_window", "F"))
self.file_g_label.setText(_translate("main_window", "G"))
self.file_h_label.setText(_translate("main_window", "H"))
self.you_text_label.setText(_translate("main_window", "YOU:"))
self.white_text_label.setText(_translate("main_window", "WHITE"))
self.black_text_label.setText(_translate("main_window", "BLACK"))
self.menu_save.setTitle(_translate("main_window", "Save"))
self.menu_load.setTitle(_translate("main_window", "Load"))
if __name__ == "__main__":
import sys
app = QtWidgets.QApplication(sys.argv)
main_window = QtWidgets.QMainWindow()
ui = Ui_main_window()
ui.setupUi(main_window)
main_window.show()
sys.exit(app.exec_())