コード例 #1
0
    def DetMenu(self):

        Gfont = cpn.font['general']
        cpn.settext(self, 'StN', Gfont, (80, 300, 171, 31),
                    "<font color=%s>%s</font>" % ('#5F2F2D', "Stall Name"))
        cpn.settext(self, 'ItN', Gfont, (80, 360, 171, 31),
                    "<font color=%s>%s</font>" % ('#5F2F2D', "Item Name"))
        cpn.setTXbox(self, 'txt_S', (220, 300, 251, 41), "Enter here")
        cpn.setTXbox(self, 'txt_I', (220, 360, 251, 41), "Enter here")

        #lock stall Name
        cpn.txtbox['txt_S'].setDisabled(True)
        self.checkBox = QtWidgets.QCheckBox(self)
        self.checkBox.setGeometry(QtCore.QRect(530, 310, 85, 21))
        self.checkBox.setChecked(True)
        self.checkBox.toggled.connect(cpn.txtbox['txt_S'].setDisabled)

        self.checkBox_balel = QtWidgets.QLabel(self)
        self.checkBox_balel.setGeometry(QtCore.QRect(550, 310, 85, 21))
        self.checkBox_balel.setFont(QFont("Arial", 13, QFont.Bold))
        self.checkBox_balel.setText("<font color=%s>%s</font>" %
                                    ('#5F2F2D', "LOCK"))

        self.pushButton = QtWidgets.QPushButton(self)
        self.pushButton.setGeometry(QtCore.QRect(530, 360, 121, 70))
        self.pushButton.setText("DELETE\n The Menu")
        self.pushButton.setFont(QFont("Arial", 15, QFont.Bold))

        cpn.settext(
            self, 'delhead', QFont("Arial", 40, 100,
                                   QFont.Bold), (110, 40, 500, 90),
            "<font color=%s>%s</font>" % ('#5F2F2D', "DETELE THE MENU"))

        self.pushButton.clicked.connect(self.delfromDB)
コード例 #2
0
	def setup_Ui(self):
		self.setObjectName("Form")
		self.mainwidget = QtWidgets.QWidget(self)
		self.CartPay_BG = QtWidgets.QLabel(self)
		self.CartPay_BG.setGeometry(cpn.geometrysize)
		self.CartPay_BG.setPixmap(QtGui.QPixmap('./Pictures/northspine.jpg'))
		self.CartPay_BG.setScaledContents(True)

		#create lables
		cpn.setlable(self, 'ntulion', (50, 410, 141, 171), "./Pictures/ntu_lion.png", True)
		cpn.setlable(self, 'queue', (240, 400, 551, 221), "./Pictures/paidui1.png", True)

		#creat txt lables
		cpn.settext(self, 'QHead', Hfont, (100, 40, 631, 81), cpn.setcolor("Enter the number of people in front of you", '#FF1144'))
		cpn.settext(self, 'num', Afont, (180, 150, 121, 20), cpn.setcolor("Number: ", '#630030'))

		#create text box
		cpn.setTXbox(self, 'Qnumb', (310, 150, 195, 31), ' ')



		#create lables
		self.label_5 = QtWidgets.QLabel(self)
		self.label_5.setGeometry(QtCore.QRect(190, 270, 431, 71))
		self.label_6 = QtWidgets.QLabel(self)
		self.label_6.setGeometry(QtCore.QRect(190, 230, 431, 71))
		self.label_5.setFont(Bfont)
		self.label_6.setFont(Bfont)

		#create a click button
		cpn.newbuttonfunction(self,"Blueclik", (530, 130, 72, 72), "Click", None, **styleblue)

		self.setWindowTitle(_translate("Form", "Form"))

		'''
コード例 #3
0
	def menus(self):
		# setup text box and text lables
		for index, i in enumerate(menu_data.menuKeys):
			verIncrease = 60
			cpn.settext(self, i, cpn.Gefont, (80, 130 + index * verIncrease, 171, 31), "<font color=%s>%s</font>" %('#5F2F2D', i))
			cpn.setTXbox(self, i, (220, 130 + index * verIncrease, 251, 41), "Enter here")