def __init__(self, url): super().__init__() self.setWindowFlags(QtCore.Qt.FramelessWindowHint) mainVBox = GuiBuilder.makeBoxLayoutIn(self, True) GuiBuilder.makeLabelIn(mainVBox, "", QtCore.Qt.AlignCenter).setPixmap( QRBuilder.makeQRPixmapBy(url)) GuiBuilder.makePushButtonIn( mainVBox, 1, None, "닫기").clicked.connect(lambda: self.event_exit()) self.exec_()
def _addContents(self): vbox = GuiBuilder.makeBoxLayoutIn(self, isVertical=True) TitleBar(parent=vbox, stretch=0.5) LB_vd = VideoLabel(parent=vbox, stretch=14) RequestLayout(vbox, 5, LB_vd.getVideo(), LB_vd.getTemperautre())
def __init__(self,parent : QtWidgets.QVBoxLayout, stretch, *args, **kwargs): super().__init__(*args, **kwargs) self.addWidget(QtWidgets.QFrame(), stretch=8) BTN_setting = GuiBuilder.makePushButtonIn( self, 1, 'client/gui/resource/settings.png', "Setting") BTN_setting.clicked.connect(lambda: self.event_BTN_setting()) BTN_exit = GuiBuilder.makePushButtonIn( self, 1, 'client/gui/resource/exit.png', "Exit") BTN_exit.setStyleSheet("background-color: red;") BTN_exit.clicked.connect(lambda: self.event_BTN_exit()) parent.addLayout(self,stretch = stretch)
def _initLayout(self): hBoxTop = GuiBuilder.makeBoxLayoutIn(self, isVertical=False) hBoxBot = GuiBuilder.makeBoxLayoutIn(self, isVertical=False) GuiBuilder.makeLabelIn(hBoxTop, "상태", QtCore.Qt.AlignHCenter | QtCore.Qt.AlignVCenter) self.LB_state = GuiBuilder.makeLabelIn( hBoxTop, "...", QtCore.Qt.AlignHCenter | QtCore.Qt.AlignVCenter) GuiBuilder.makeLabelIn(hBoxBot, "검증 결과", QtCore.Qt.AlignHCenter | QtCore.Qt.AlignVCenter) self.LB_result = GuiBuilder.makeLabelIn( hBoxBot, "...", QtCore.Qt.AlignHCenter | QtCore.Qt.AlignVCenter)
def initUI(self): mainVBox = GuiBuilder.makeBoxLayoutIn(self, True) #TODO: Stretch 바꿔야 함 #TODO: 토글 이벤트 달기 facilitySelectHBox = GuiBuilder.makeBoxLayoutIn(mainVBox, False) BTN_fnum = self.__setFnumBtn(facilitySelectHBox) BTN_fName = self.__setFnameBtn(facilitySelectHBox) LE_facilityEdit = GuiBuilder.makeLineEditIn( mainVBox, 1, str(self.__config.getFacilityNum())) stateSelectHBox = GuiBuilder.makeBoxLayoutIn(mainVBox, False) BTN_stateIn = GuiBuilder.makePushButtonIn(stateSelectHBox, 1, None, "입구") BTN_stateOut = GuiBuilder.makePushButtonIn(stateSelectHBox, 1, None, "출구") closeHBox = GuiBuilder.makeBoxLayoutIn(mainVBox, False) BTN_save = self.__setSaveBtn(closeHBox) BTN_close = self.__setCloseBtn(closeHBox)
def __setFnameBtn(self, parent): btn = GuiBuilder.makePushButtonIn(parent, 1, None, "건물 이름") btn.setCheckable(True) return btn
def __setFnumBtn(self, parent): btn = GuiBuilder.makePushButtonIn(parent, 1, None, "건물 번호") btn.setCheckable(True) btn.toggle() return btn
def __setCloseBtn(self, parent): btn = GuiBuilder.makePushButtonIn(parent, 1, None, "닫기") btn.clicked.connect(lambda: self.close()) return btn
def __setSaveBtn(self, parent): btn = GuiBuilder.makePushButtonIn(parent, 1, None, "저장")