Skip to content

Commit feddff6

Browse files
committed
- 优化界面
为所有dialog添加了关闭按钮(解决mac系统下dialog没有顶栏关闭按钮的问题)
1 parent e3cc829 commit feddff6

31 files changed

+744
-315
lines changed

ISAT/ui/Converter_dialog.py

Lines changed: 47 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
class Ui_Dialog(object):
1515
def setupUi(self, Dialog):
1616
Dialog.setObjectName("Dialog")
17-
Dialog.resize(960, 600)
17+
Dialog.resize(1280, 720)
1818
font = QtGui.QFont()
1919
font.setFamily("Times New Roman")
2020
font.setPointSize(12)
@@ -81,7 +81,7 @@ def setupUi(self, Dialog):
8181
self.verticalLayout_2.addWidget(self.widget_3)
8282
self.toolBox_coco.addItem(self.toolbox_item_coco2isat, "")
8383
self.toolbox_item_isat2coco = QtWidgets.QWidget()
84-
self.toolbox_item_isat2coco.setGeometry(QtCore.QRect(0, 0, 920, 113))
84+
self.toolbox_item_isat2coco.setGeometry(QtCore.QRect(0, 0, 1240, 173))
8585
self.toolbox_item_isat2coco.setObjectName("toolbox_item_isat2coco")
8686
self.verticalLayout_5 = QtWidgets.QVBoxLayout(self.toolbox_item_isat2coco)
8787
self.verticalLayout_5.setObjectName("verticalLayout_5")
@@ -218,7 +218,7 @@ def setupUi(self, Dialog):
218218
self.verticalLayout_9.addWidget(self.widget_10)
219219
self.toolBox_yolo.addItem(self.toolbox_item_yolo2isat, "")
220220
self.toolbox_item_isat2yolo = QtWidgets.QWidget()
221-
self.toolbox_item_isat2yolo.setGeometry(QtCore.QRect(0, 0, 920, 113))
221+
self.toolbox_item_isat2yolo.setGeometry(QtCore.QRect(0, 0, 1240, 173))
222222
self.toolbox_item_isat2yolo.setObjectName("toolbox_item_isat2yolo")
223223
self.verticalLayout_11 = QtWidgets.QVBoxLayout(self.toolbox_item_isat2yolo)
224224
self.verticalLayout_11.setObjectName("verticalLayout_11")
@@ -274,7 +274,7 @@ def setupUi(self, Dialog):
274274
self.toolBox_labelme.setFrameShadow(QtWidgets.QFrame.Plain)
275275
self.toolBox_labelme.setObjectName("toolBox_labelme")
276276
self.toolbox_item_labelme2isat = QtWidgets.QWidget()
277-
self.toolbox_item_labelme2isat.setGeometry(QtCore.QRect(0, 0, 920, 113))
277+
self.toolbox_item_labelme2isat.setGeometry(QtCore.QRect(0, 0, 1240, 173))
278278
self.toolbox_item_labelme2isat.setObjectName("toolbox_item_labelme2isat")
279279
self.verticalLayout_16 = QtWidgets.QVBoxLayout(self.toolbox_item_labelme2isat)
280280
self.verticalLayout_16.setContentsMargins(9, 9, 9, 9)
@@ -341,6 +341,13 @@ def setupUi(self, Dialog):
341341
self.verticalLayout_15.addWidget(self.toolBox_labelme)
342342
self.verticalLayout_20.addWidget(self.widget_16)
343343
self.label_4 = QtWidgets.QLabel(self.tab_LABELME)
344+
font = QtGui.QFont()
345+
font.setFamily("Times New Roman")
346+
font.setPointSize(12)
347+
font.setBold(False)
348+
font.setItalic(False)
349+
font.setWeight(50)
350+
self.label_4.setFont(font)
344351
self.label_4.setStyleSheet("color: rgb(255, 0, 0);")
345352
self.label_4.setObjectName("label_4")
346353
self.verticalLayout_20.addWidget(self.label_4)
@@ -381,20 +388,36 @@ def setupUi(self, Dialog):
381388
self.checkBox_is_instance.setObjectName("checkBox_is_instance")
382389
self.horizontalLayout_4.addWidget(self.checkBox_is_instance)
383390
self.verticalLayout_14.addWidget(self.widget_15)
391+
spacerItem3 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
392+
self.verticalLayout_14.addItem(spacerItem3)
384393
self.widget_22 = QtWidgets.QWidget(self.tab_VOC)
385394
self.widget_22.setMinimumSize(QtCore.QSize(0, 0))
386-
self.widget_22.setMaximumSize(QtCore.QSize(16777215, 20))
395+
self.widget_22.setMaximumSize(QtCore.QSize(16777215, 16777215))
387396
self.widget_22.setObjectName("widget_22")
388397
self.horizontalLayout_5 = QtWidgets.QHBoxLayout(self.widget_22)
389398
self.horizontalLayout_5.setContentsMargins(0, 0, 0, 0)
390399
self.horizontalLayout_5.setSpacing(0)
391400
self.horizontalLayout_5.setObjectName("horizontalLayout_5")
392401
self.label_5 = QtWidgets.QLabel(self.widget_22)
393-
self.label_5.setMaximumSize(QtCore.QSize(16777215, 20))
402+
self.label_5.setMaximumSize(QtCore.QSize(16777215, 16777215))
403+
font = QtGui.QFont()
404+
font.setFamily("Times New Roman")
405+
font.setPointSize(12)
406+
font.setBold(False)
407+
font.setItalic(False)
408+
font.setWeight(50)
409+
self.label_5.setFont(font)
394410
self.label_5.setStyleSheet("color: rgb(255, 0, 0);")
395411
self.label_5.setObjectName("label_5")
396412
self.horizontalLayout_5.addWidget(self.label_5)
397413
self.label_10 = QtWidgets.QLabel(self.widget_22)
414+
font = QtGui.QFont()
415+
font.setFamily("Times New Roman")
416+
font.setPointSize(12)
417+
font.setBold(False)
418+
font.setItalic(False)
419+
font.setWeight(50)
420+
self.label_10.setFont(font)
398421
self.label_10.setStyleSheet("color: rgb(255, 0, 0);")
399422
self.label_10.setObjectName("label_10")
400423
self.horizontalLayout_5.addWidget(self.label_10)
@@ -426,6 +449,13 @@ def setupUi(self, Dialog):
426449
self.verticalLayout_21.addWidget(self.widget_19)
427450
self.label_6 = QtWidgets.QLabel(self.tab_VOC_DETECTION)
428451
self.label_6.setMaximumSize(QtCore.QSize(16777215, 20))
452+
font = QtGui.QFont()
453+
font.setFamily("Times New Roman")
454+
font.setPointSize(12)
455+
font.setBold(False)
456+
font.setItalic(False)
457+
font.setWeight(50)
458+
self.label_6.setFont(font)
429459
self.label_6.setStyleSheet("color: rgb(255, 0, 0);")
430460
self.label_6.setObjectName("label_6")
431461
self.verticalLayout_21.addWidget(self.label_6)
@@ -452,18 +482,21 @@ def setupUi(self, Dialog):
452482
self.horizontalLayout = QtWidgets.QHBoxLayout(self.widget_2)
453483
self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
454484
self.horizontalLayout.setObjectName("horizontalLayout")
455-
spacerItem3 = QtWidgets.QSpacerItem(308, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
456-
self.horizontalLayout.addItem(spacerItem3)
485+
spacerItem4 = QtWidgets.QSpacerItem(308, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
486+
self.horizontalLayout.addItem(spacerItem4)
487+
self.pushButton_start = QtWidgets.QPushButton(self.widget_2)
488+
self.pushButton_start.setObjectName("pushButton_start")
489+
self.horizontalLayout.addWidget(self.pushButton_start)
457490
self.pushButton_cancel = QtWidgets.QPushButton(self.widget_2)
458491
self.pushButton_cancel.setObjectName("pushButton_cancel")
459492
self.horizontalLayout.addWidget(self.pushButton_cancel)
460-
self.pushButton_convert = QtWidgets.QPushButton(self.widget_2)
461-
self.pushButton_convert.setObjectName("pushButton_convert")
462-
self.horizontalLayout.addWidget(self.pushButton_convert)
493+
self.pushButton_close = QtWidgets.QPushButton(self.widget_2)
494+
self.pushButton_close.setObjectName("pushButton_close")
495+
self.horizontalLayout.addWidget(self.pushButton_close)
463496
self.verticalLayout_13.addWidget(self.widget_2)
464497

465498
self.retranslateUi(Dialog)
466-
self.tabWidget.setCurrentIndex(1)
499+
self.tabWidget.setCurrentIndex(4)
467500
self.toolBox_coco.setCurrentIndex(1)
468501
self.toolBox_yolo.setCurrentIndex(1)
469502
self.toolBox_labelme.setCurrentIndex(0)
@@ -531,5 +564,6 @@ def retranslateUi(self, Dialog):
531564
self.pushButton_isat2vocod_voc_xml_root.setText(_translate("Dialog", "save root"))
532565
self.label_6.setText(_translate("Dialog", "VOC save annotations to multiple XML files for object detection."))
533566
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_VOC_DETECTION), _translate("Dialog", "VOC for object detection"))
567+
self.pushButton_start.setText(_translate("Dialog", "&Start"))
534568
self.pushButton_cancel.setText(_translate("Dialog", "Cancel"))
535-
self.pushButton_convert.setText(_translate("Dialog", "Convert"))
569+
self.pushButton_close.setText(_translate("Dialog", "&Close"))

ISAT/ui/Converter_dialog.ui

Lines changed: 69 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<rect>
77
<x>0</x>
88
<y>0</y>
9-
<width>960</width>
10-
<height>600</height>
9+
<width>1280</width>
10+
<height>720</height>
1111
</rect>
1212
</property>
1313
<property name="font">
@@ -23,7 +23,7 @@
2323
<item>
2424
<widget class="QTabWidget" name="tabWidget">
2525
<property name="currentIndex">
26-
<number>1</number>
26+
<number>4</number>
2727
</property>
2828
<widget class="QWidget" name="tab_COCO">
2929
<attribute name="title">
@@ -196,8 +196,8 @@
196196
<rect>
197197
<x>0</x>
198198
<y>0</y>
199-
<width>920</width>
200-
<height>113</height>
199+
<width>1240</width>
200+
<height>173</height>
201201
</rect>
202202
</property>
203203
<attribute name="label">
@@ -562,8 +562,8 @@
562562
<rect>
563563
<x>0</x>
564564
<y>0</y>
565-
<width>920</width>
566-
<height>113</height>
565+
<width>1240</width>
566+
<height>173</height>
567567
</rect>
568568
</property>
569569
<attribute name="label">
@@ -701,8 +701,8 @@
701701
<rect>
702702
<x>0</x>
703703
<y>0</y>
704-
<width>920</width>
705-
<height>113</height>
704+
<width>1240</width>
705+
<height>173</height>
706706
</rect>
707707
</property>
708708
<attribute name="label">
@@ -885,6 +885,15 @@
885885
</item>
886886
<item>
887887
<widget class="QLabel" name="label_4">
888+
<property name="font">
889+
<font>
890+
<family>Times New Roman</family>
891+
<pointsize>12</pointsize>
892+
<weight>50</weight>
893+
<italic>false</italic>
894+
<bold>false</bold>
895+
</font>
896+
</property>
888897
<property name="styleSheet">
889898
<string notr="true">color: rgb(255, 0, 0);</string>
890899
</property>
@@ -996,6 +1005,19 @@
9961005
</layout>
9971006
</widget>
9981007
</item>
1008+
<item>
1009+
<spacer name="verticalSpacer">
1010+
<property name="orientation">
1011+
<enum>Qt::Vertical</enum>
1012+
</property>
1013+
<property name="sizeHint" stdset="0">
1014+
<size>
1015+
<width>20</width>
1016+
<height>40</height>
1017+
</size>
1018+
</property>
1019+
</spacer>
1020+
</item>
9991021
<item>
10001022
<widget class="QWidget" name="widget_22" native="true">
10011023
<property name="minimumSize">
@@ -1007,7 +1029,7 @@
10071029
<property name="maximumSize">
10081030
<size>
10091031
<width>16777215</width>
1010-
<height>20</height>
1032+
<height>16777215</height>
10111033
</size>
10121034
</property>
10131035
<layout class="QHBoxLayout" name="horizontalLayout_5">
@@ -1031,9 +1053,18 @@
10311053
<property name="maximumSize">
10321054
<size>
10331055
<width>16777215</width>
1034-
<height>20</height>
1056+
<height>16777215</height>
10351057
</size>
10361058
</property>
1059+
<property name="font">
1060+
<font>
1061+
<family>Times New Roman</family>
1062+
<pointsize>12</pointsize>
1063+
<weight>50</weight>
1064+
<italic>false</italic>
1065+
<bold>false</bold>
1066+
</font>
1067+
</property>
10371068
<property name="styleSheet">
10381069
<string notr="true">color: rgb(255, 0, 0);</string>
10391070
</property>
@@ -1044,6 +1075,15 @@
10441075
</item>
10451076
<item>
10461077
<widget class="QLabel" name="label_10">
1078+
<property name="font">
1079+
<font>
1080+
<family>Times New Roman</family>
1081+
<pointsize>12</pointsize>
1082+
<weight>50</weight>
1083+
<italic>false</italic>
1084+
<bold>false</bold>
1085+
</font>
1086+
</property>
10471087
<property name="styleSheet">
10481088
<string notr="true">color: rgb(255, 0, 0);</string>
10491089
</property>
@@ -1122,6 +1162,15 @@
11221162
<height>20</height>
11231163
</size>
11241164
</property>
1165+
<property name="font">
1166+
<font>
1167+
<family>Times New Roman</family>
1168+
<pointsize>12</pointsize>
1169+
<weight>50</weight>
1170+
<italic>false</italic>
1171+
<bold>false</bold>
1172+
</font>
1173+
</property>
11251174
<property name="styleSheet">
11261175
<string notr="true">color: rgb(255, 0, 0);</string>
11271176
</property>
@@ -1185,6 +1234,13 @@
11851234
</property>
11861235
</spacer>
11871236
</item>
1237+
<item>
1238+
<widget class="QPushButton" name="pushButton_start">
1239+
<property name="text">
1240+
<string>&amp;Start</string>
1241+
</property>
1242+
</widget>
1243+
</item>
11881244
<item>
11891245
<widget class="QPushButton" name="pushButton_cancel">
11901246
<property name="text">
@@ -1193,9 +1249,9 @@
11931249
</widget>
11941250
</item>
11951251
<item>
1196-
<widget class="QPushButton" name="pushButton_convert">
1252+
<widget class="QPushButton" name="pushButton_close">
11971253
<property name="text">
1198-
<string>Convert</string>
1254+
<string>&amp;Close</string>
11991255
</property>
12001256
</widget>
12011257
</item>

0 commit comments

Comments
 (0)