<reponame>xincyu/Qt-Calculator<gh_stars>1-10
# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 'calculator_design.ui'
#
# Created by: PyQt5 UI code generator 5.6
#
# WARNING! All changes made in this file will be lost!

from PyQt5 import QtCore, QtGui, QtWidgets

class Ui_MainWindow(object):
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.setEnabled(True)
        MainWindow.resize(251, 331)
        MainWindow.setMinimumSize(QtCore.QSize(251, 331))
        MainWindow.setMaximumSize(QtCore.QSize(251, 331))
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.number_0 = QtWidgets.QPushButton(self.centralwidget)
        self.number_0.setGeometry(QtCore.QRect(10, 270, 51, 51))
        self.number_0.setObjectName("number_0")
        self.numbers = QtWidgets.QButtonGroup(MainWindow)
        self.numbers.setObjectName("numbers")
        self.numbers.addButton(self.number_0)
        self.number_1 = QtWidgets.QPushButton(self.centralwidget)
        self.number_1.setGeometry(QtCore.QRect(10, 210, 51, 51))
        self.number_1.setObjectName("number_1")
        self.numbers.addButton(self.number_1)
        self.number_5 = QtWidgets.QPushButton(self.centralwidget)
        self.number_5.setGeometry(QtCore.QRect(70, 150, 51, 51))
        self.number_5.setObjectName("number_5")
        self.numbers.addButton(self.number_5)
        self.number_3 = QtWidgets.QPushButton(self.centralwidget)
        self.number_3.setGeometry(QtCore.QRect(130, 210, 51, 51))
        self.number_3.setObjectName("number_3")
        self.numbers.addButton(self.number_3)
        self.number_4 = QtWidgets.QPushButton(self.centralwidget)
        self.number_4.setGeometry(QtCore.QRect(10, 150, 51, 51))
        self.number_4.setObjectName("number_4")
        self.numbers.addButton(self.number_4)
        self.number_2 = QtWidgets.QPushButton(self.centralwidget)
        self.number_2.setGeometry(QtCore.QRect(70, 210, 51, 51))
        self.number_2.setObjectName("number_2")
        self.numbers.addButton(self.number_2)
        self.number_6 = QtWidgets.QPushButton(self.centralwidget)
        self.number_6.setGeometry(QtCore.QRect(130, 150, 51, 51))
        self.number_6.setObjectName("number_6")
        self.numbers.addButton(self.number_6)
        self.number_7 = QtWidgets.QPushButton(self.centralwidget)
        self.number_7.setGeometry(QtCore.QRect(10, 90, 51, 51))
        self.number_7.setObjectName("number_7")
        self.numbers.addButton(self.number_7)
        self.number_8 = QtWidgets.QPushButton(self.centralwidget)
        self.number_8.setGeometry(QtCore.QRect(70, 90, 51, 51))
        self.number_8.setObjectName("number_8")
        self.numbers.addButton(self.number_8)
        self.number_9 = QtWidgets.QPushButton(self.centralwidget)
        self.number_9.setGeometry(QtCore.QRect(130, 90, 51, 51))
        self.number_9.setObjectName("number_9")
        self.numbers.addButton(self.number_9)
        self.dot = QtWidgets.QPushButton(self.centralwidget)
        self.dot.setGeometry(QtCore.QRect(70, 270, 51, 51))
        self.dot.setObjectName("dot")
        self.equals = QtWidgets.QPushButton(self.centralwidget)
        self.equals.setGeometry(QtCore.QRect(130, 270, 51, 51))
        self.equals.setObjectName("equals")
        self.subtract = QtWidgets.QPushButton(self.centralwidget)
        self.subtract.setGeometry(QtCore.QRect(190, 270, 51, 51))
        self.subtract.setObjectName("subtract")
        self.operations = QtWidgets.QButtonGroup(MainWindow)
        self.operations.setObjectName("operations")
        self.operations.addButton(self.subtract)
        self.add = QtWidgets.QPushButton(self.centralwidget)
        self.add.setGeometry(QtCore.QRect(190, 210, 51, 51))
        self.add.setObjectName("add")
        self.operations.addButton(self.add)
        self.divide = QtWidgets.QPushButton(self.centralwidget)
        self.divide.setGeometry(QtCore.QRect(190, 150, 51, 51))
        self.divide.setObjectName("divide")
        self.operations.addButton(self.divide)
        self.multiply = QtWidgets.QPushButton(self.centralwidget)
        self.multiply.setGeometry(QtCore.QRect(190, 90, 51, 51))
        self.multiply.setObjectName("multiply")
        self.operations.addButton(self.multiply)
        self.lcd = QtWidgets.QLCDNumber(self.centralwidget)
        self.lcd.setGeometry(QtCore.QRect(10, 2, 231, 51))
        self.lcd.setSmallDecimalPoint(True)
        self.lcd.setDigitCount(8)
        self.lcd.setSegmentStyle(QtWidgets.QLCDNumber.Filled)
        self.lcd.setProperty("value", 0.0)
        self.lcd.setProperty("intValue", 0)
        self.lcd.setObjectName("lcd")
        self.clear = QtWidgets.QPushButton(self.centralwidget)
        self.clear.setGeometry(QtCore.QRect(170, 60, 71, 23))
        self.clear.setObjectName("clear")
        MainWindow.setCentralWidget(self.centralwidget)

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)

    def retranslateUi(self, MainWindow):
        _translate = QtCore.QCoreApplication.translate
        MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
        self.number_0.setText(_translate("MainWindow", "0"))
        self.number_1.setText(_translate("MainWindow", "1"))
        self.number_5.setText(_translate("MainWindow", "5"))
        self.number_3.setText(_translate("MainWindow", "3"))
        self.number_4.setText(_translate("MainWindow", "4"))
        self.number_2.setText(_translate("MainWindow", "2"))
        self.number_6.setText(_translate("MainWindow", "6"))
        self.number_7.setText(_translate("MainWindow", "7"))
        self.number_8.setText(_translate("MainWindow", "8"))
        self.number_9.setText(_translate("MainWindow", "9"))
        self.dot.setText(_translate("MainWindow", "."))
        self.equals.setText(_translate("MainWindow", "="))
        self.subtract.setText(_translate("MainWindow", "-"))
        self.add.setText(_translate("MainWindow", "+"))
        self.divide.setText(_translate("MainWindow", "/"))
        self.multiply.setText(_translate("MainWindow", "*"))
        self.clear.setText(_translate("MainWindow", "Clear"))


if __name__ == "__main__":
    import sys
    app = QtWidgets.QApplication(sys.argv)
    MainWindow = QtWidgets.QMainWindow()
    ui = Ui_MainWindow()
    ui.setupUi(MainWindow)
    MainWindow.show()
    sys.exit(app.exec_())

