Page 117 - MDP2020-2
P. 117
················································································ 명장양성프로젝트 【MDP】 과제발표회 자료집 Ⅱ | 111
font = QtGui.QFont()
font.setFamily("나눔바른고딕")
font.setPointSize(24)
font.setBold(True)
font.setWeight(75)
self.notice.setFont(font)
self.notice.setObjectName("label_notice")
self.notice.setStyleSheet('color:black')
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtWidgets.QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 1920, 26))
self.menubar.setObjectName("menubar")
MainWindow.setMenuBar(self.menubar)
self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
self.showtime()
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
self.button_led.setText(_translate("MainWindow", " "))
self.label_test.setText(_translate("MainWindow", " "))
self.button_total.setText(_translate("MainWindow", "%d" % (i)))
# self.clothes_total.setText(_translate("MainWindow", " "))
self.button_fan.setText(_translate("MainWindow", " "))
self.label_time.setText(_translate("MainWindow", " "))
self.label_care1.setText(_translate("MainWindow", "케어중"))
s e l f . l a b e l _ d a t e . s e t T e x t ( _ t r a n s l a t e ( " M a i n W i n d o w " ,
f"{labeldate.year}/{labeldate.month}/{labeldate.day}"))
self.label_sec.setText(_translate("MainWindow", f"{labeldate.month}"))
self.notice.setText(_translate("MainWindow", "%d벌의 옷을 케어중입니다." % (i)))
def slot_toggle(self, state):
"""
toggle 상태에 따라 배경색과 상태 텍스트 변환
"""
# self.button_total.setStyleSheet("background-color: %s" % ({True: "green", False:
"red"}[state]))
if (state):
self.label_test.show()
self.label_test.setText("재고 상의 하의 아우터 기타")
self.anim = QPropertyAnimation(self.label_test, b"geometry")
self.anim.setDuration(300)