def take_student_id(self): # Вытаскивает из буфера и заполняет поля данными mas = dbd.buffer() for person in mas: key = person[0] code_n = self.code_line.text() date_start = self.start_date_line.text() date_end = self.end_date_line.text() day_start = date_start[:2] month_start = date_start[3:5] year_start = day_start[6:] day_end = date_end[:2] month_end = date_end[3:5] year_end = date_end[6:] room = self.RoomBox.currentText() cost = self.CostBox.currentText().split("- ")[1] facility = self.CostBox.currentText().split(" -")[0] sex = str(person[1]['Пол']) dbd.add_contract(key, date_start, date_end, room, cost, facility, sex, code=code_n) # self.code_line.clear() # self.start_date_line.clear() # self.end_date_line.clear() # self.RoomBox.setCurrentIndex(0) # self.CostBox.setCurrentIndex(0) from success import Ui_Error self.window = QtWidgets.QMainWindow() self.ui = Ui_Error() self.ui.setupUi(self.window) self.window.show()
def openAdd_Client(self): from Add_Client import Ui_add_client self.window = QtWidgets.QMainWindow() self.ui = Ui_add_client() self.ui.setupUi(self.window) self.window.show()
class Ui_add_contract(object): def set_code(self): self.code_line.setReadOnly(False) num = dbd.get_last_contract_num() self.code_line.setText("ОБ - " + str(num + 1)) def del_buff(self): dbd.delete_buffer() def take_student_id(self): # Вытаскивает из буфера и заполняет поля данными mas = dbd.buffer() for person in mas: key = person[0] code_n = self.code_line.text() date_start = self.start_date_line.text() date_end = self.end_date_line.text() day_start = date_start[:2] month_start = date_start[3:5] year_start = day_start[6:] day_end = date_end[:2] month_end = date_end[3:5] year_end = date_end[6:] room = self.RoomBox.currentText() cost = self.CostBox.currentText().split("- ")[1] facility = self.CostBox.currentText().split(" -")[0] sex = str(person[1]['Пол']) dbd.add_contract(key, date_start, date_end, room, cost, facility, sex, code=code_n) # self.code_line.clear() # self.start_date_line.clear() # self.end_date_line.clear() # self.RoomBox.setCurrentIndex(0) # self.CostBox.setCurrentIndex(0) from success import Ui_Error self.window = QtWidgets.QMainWindow() self.ui = Ui_Error() self.ui.setupUi(self.window) self.window.show() def openAdd_Client(self): from Add_Client import Ui_add_client self.window = QtWidgets.QMainWindow() self.ui = Ui_add_client() self.ui.setupUi(self.window) self.window.show() def setupUi(self, add_contract): add_contract.setObjectName("add_contract") add_contract.resize(680, 400) add_contract.setMinimumSize(QtCore.QSize(680, 400)) add_contract.setMaximumSize(QtCore.QSize(680, 400)) self.centralwidget = QtWidgets.QWidget(add_contract) self.centralwidget.setObjectName("centralwidget") self.label = QtWidgets.QLabel(self.centralwidget) self.label.setGeometry(QtCore.QRect(60, 80, 130, 30)) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.label.setFont(font) self.label.setAlignment(QtCore.Qt.AlignLeading | QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter) self.label.setObjectName("label") self.code_line = QtWidgets.QLineEdit(self.centralwidget) self.code_line.setGeometry(QtCore.QRect(220, 80, 400, 30)) palette = QtGui.QPalette() brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(120, 120, 120)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(120, 120, 120)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush) self.code_line.setPalette(palette) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.code_line.setFont(font) self.code_line.setStyleSheet("background-color: rgb(135, 206, 235);") self.code_line.setText("") self.code_line.setObjectName("code_line") self.label_2 = QtWidgets.QLabel(self.centralwidget) self.label_2.setGeometry(QtCore.QRect(60, 140, 130, 30)) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.label_2.setFont(font) self.label_2.setAlignment(QtCore.Qt.AlignLeading | QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter) self.label_2.setObjectName("label_2") self.start_date_line = QtWidgets.QLineEdit(self.centralwidget) self.start_date_line.setGeometry(QtCore.QRect(220, 140, 400, 30)) palette = QtGui.QPalette() brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(120, 120, 120)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(120, 120, 120)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush) self.start_date_line.setPalette(palette) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.start_date_line.setFont(font) self.start_date_line.setStyleSheet( "background-color: rgb(135, 206, 235);") self.start_date_line.setObjectName("start_date_line") self.label_3 = QtWidgets.QLabel(self.centralwidget) self.label_3.setGeometry(QtCore.QRect(60, 200, 130, 30)) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.label_3.setFont(font) self.label_3.setAlignment(QtCore.Qt.AlignLeading | QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter) self.label_3.setObjectName("label_3") self.end_date_line = QtWidgets.QLineEdit(self.centralwidget) self.end_date_line.setGeometry(QtCore.QRect(220, 200, 400, 30)) palette = QtGui.QPalette() brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(120, 120, 120)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(120, 120, 120)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush) self.end_date_line.setPalette(palette) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.end_date_line.setFont(font) self.end_date_line.setStyleSheet( "background-color: rgb(135, 206, 235);") self.end_date_line.setObjectName("end_date_line") self.label_6 = QtWidgets.QLabel(self.centralwidget) self.label_6.setGeometry(QtCore.QRect(60, 260, 130, 30)) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.label_6.setFont(font) self.label_6.setAlignment(QtCore.Qt.AlignLeading | QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter) self.label_6.setObjectName("label_6") self.label_7 = QtWidgets.QLabel(self.centralwidget) self.label_7.setGeometry(QtCore.QRect(60, 320, 130, 30)) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.label_7.setFont(font) self.label_7.setAlignment(QtCore.Qt.AlignLeading | QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter) self.label_7.setObjectName("label_7") self.RoomBox = QtWidgets.QComboBox(self.centralwidget) self.RoomBox.setGeometry(QtCore.QRect(220, 260, 400, 30)) palette = QtGui.QPalette() brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(120, 120, 120)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush) self.RoomBox.setPalette(palette) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.RoomBox.setFont(font) self.RoomBox.setToolTip("") self.RoomBox.setStatusTip("") self.RoomBox.setStyleSheet("background-color: rgb(135, 206, 235);") self.RoomBox.setEditable(False) self.RoomBox.setMaxCount(100) self.RoomBox.setIconSize(QtCore.QSize(16, 16)) self.RoomBox.setModelColumn(0) self.RoomBox.setObjectName("RoomBox") self.layoutWidget = QtWidgets.QWidget(self.centralwidget) self.layoutWidget.setGeometry(QtCore.QRect(110, 20, 451, 42)) self.layoutWidget.setObjectName("layoutWidget") self.horizontalLayout = QtWidgets.QHBoxLayout(self.layoutWidget) self.horizontalLayout.setContentsMargins(0, 0, 0, 0) self.horizontalLayout.setSpacing(17) self.horizontalLayout.setObjectName("horizontalLayout") self.add_contract_btn = QtWidgets.QPushButton(self.layoutWidget) self.add_contract_btn.setMinimumSize(QtCore.QSize(150, 40)) palette = QtGui.QPalette() brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(120, 120, 120)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush) self.add_contract_btn.setPalette(palette) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.add_contract_btn.setFont(font) self.add_contract_btn.setStyleSheet( "background-color: rgb(135, 206, 235);") self.add_contract_btn.setObjectName("add_contract_btn") self.add_contract_btn.clicked.connect(self.take_student_id) # self.add_contract_btn.clicked.connect(self.del_buff) self.horizontalLayout.addWidget(self.add_contract_btn) self.back_to_add_client_btn = QtWidgets.QPushButton(self.layoutWidget) self.back_to_add_client_btn.setMinimumSize(QtCore.QSize(150, 40)) palette = QtGui.QPalette() brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(120, 120, 120)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush) self.back_to_add_client_btn.setPalette(palette) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.back_to_add_client_btn.setFont(font) self.back_to_add_client_btn.setStyleSheet( "background-color: rgb(135, 206, 235);") self.back_to_add_client_btn.setObjectName("back_to_add_client_btn") #self.back_to_add_client_btn.clicked.connect(self.openAdd_Client) self.back_to_add_client_btn.clicked.connect(add_contract.close) self.back_to_add_client_btn.clicked.connect(self.del_buff) self.horizontalLayout.addWidget(self.back_to_add_client_btn) self.CostBox = QtWidgets.QComboBox(self.centralwidget) self.CostBox.setGeometry(QtCore.QRect(220, 320, 400, 30)) palette = QtGui.QPalette() brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(120, 120, 120)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush) self.CostBox.setPalette(palette) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.CostBox.setFont(font) self.CostBox.setToolTip("") self.CostBox.setStatusTip("") self.CostBox.setStyleSheet("background-color: rgb(135, 206, 235);") self.CostBox.setEditable(False) self.CostBox.setMaxCount(100) self.CostBox.setIconSize(QtCore.QSize(16, 16)) self.CostBox.setModelColumn(0) self.CostBox.setObjectName("CostBox") add_contract.setCentralWidget(self.centralwidget) self.statusbar = QtWidgets.QStatusBar(add_contract) self.statusbar.setObjectName("statusbar") add_contract.setStatusBar(self.statusbar) self.retranslateUi(add_contract) self.RoomBox.setCurrentIndex(0) self.CostBox.setCurrentIndex(0) QtCore.QMetaObject.connectSlotsByName(add_contract) self.set_code() self.code_line.setReadOnly(True) def retranslateUi(self, add_contract): _translate = QtCore.QCoreApplication.translate add_contract.setWindowTitle( _translate("add_contract", "Добавление договора")) self.label.setText(_translate("add_contract", "Шифр договора")) self.start_date_line.setInputMask( _translate("add_contract", "00.00.0000")) self.end_date_line.setInputMask( _translate("add_contract", "00.00.0000")) self.label_2.setText(_translate("add_contract", "Дата начала")) self.label_3.setText(_translate("add_contract", "Дата окончания")) self.label_6.setText(_translate("add_contract", "Комната")) self.label_7.setText(_translate("add_contract", "Стоимость")) mas = dbd.buffer() room_mas = dbd.list_of_empty_rooms_by_sex( dbd.search_student_by_id(mas[0][0])[1]['Пол'], dbd.search_student_by_id(mas[0][0])[1]['Общежитие']) i = 0 for fac in room_mas: self.RoomBox.addItem(f"{fac[1]}") i += 1 self.add_contract_btn.setText(_translate("add_contract", "Добавить")) self.back_to_add_client_btn.setText( _translate("add_contract", "Вернуться к добавлению клиента")) i = dbd.list_of_facilities()[1] for j in range(0, i): self.CostBox.addItem( f"{dbd.list_of_facilities()[0][j][0]} - {dbd.list_of_facilities()[0][j][1]}" )
class Ui_add_contract(object): def openAdd_Client(self): from Add_Client import Ui_add_client self.window = QtWidgets.QMainWindow() self.ui = Ui_add_client() self.ui.setupUi(self.window) self.window.show() def setupUi(self, add_contract): add_contract.setObjectName("add_contract") add_contract.resize(680, 400) add_contract.setMinimumSize(QtCore.QSize(680, 400)) add_contract.setMaximumSize(QtCore.QSize(680, 400)) self.centralwidget = QtWidgets.QWidget(add_contract) self.centralwidget.setObjectName("centralwidget") self.label = QtWidgets.QLabel(self.centralwidget) self.label.setGeometry(QtCore.QRect(60, 80, 130, 30)) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.label.setFont(font) self.label.setAlignment(QtCore.Qt.AlignLeading | QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter) self.label.setObjectName("label") self.code_line = QtWidgets.QLineEdit(self.centralwidget) self.code_line.setGeometry(QtCore.QRect(220, 80, 400, 30)) palette = QtGui.QPalette() brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(120, 120, 120)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(120, 120, 120)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush) self.code_line.setPalette(palette) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.code_line.setFont(font) self.code_line.setStyleSheet("background-color: rgb(135, 206, 235);") self.code_line.setText("") self.code_line.setObjectName("code_line") self.label_2 = QtWidgets.QLabel(self.centralwidget) self.label_2.setGeometry(QtCore.QRect(60, 140, 130, 30)) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.label_2.setFont(font) self.label_2.setAlignment(QtCore.Qt.AlignLeading | QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter) self.label_2.setObjectName("label_2") self.start_date_line = QtWidgets.QLineEdit(self.centralwidget) self.start_date_line.setGeometry(QtCore.QRect(220, 140, 400, 30)) palette = QtGui.QPalette() brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(120, 120, 120)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(120, 120, 120)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush) self.start_date_line.setPalette(palette) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.start_date_line.setFont(font) self.start_date_line.setStyleSheet( "background-color: rgb(135, 206, 235);") self.start_date_line.setObjectName("start_date_line") self.label_3 = QtWidgets.QLabel(self.centralwidget) self.label_3.setGeometry(QtCore.QRect(60, 200, 130, 30)) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.label_3.setFont(font) self.label_3.setAlignment(QtCore.Qt.AlignLeading | QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter) self.label_3.setObjectName("label_3") self.end_date_line = QtWidgets.QLineEdit(self.centralwidget) self.end_date_line.setGeometry(QtCore.QRect(220, 200, 400, 30)) palette = QtGui.QPalette() brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(120, 120, 120)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(120, 120, 120)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush) self.end_date_line.setPalette(palette) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.end_date_line.setFont(font) self.end_date_line.setStyleSheet( "background-color: rgb(135, 206, 235);") self.end_date_line.setObjectName("end_date_line") self.label_6 = QtWidgets.QLabel(self.centralwidget) self.label_6.setGeometry(QtCore.QRect(60, 260, 130, 30)) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.label_6.setFont(font) self.label_6.setAlignment(QtCore.Qt.AlignLeading | QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter) self.label_6.setObjectName("label_6") self.label_7 = QtWidgets.QLabel(self.centralwidget) self.label_7.setGeometry(QtCore.QRect(60, 320, 130, 30)) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.label_7.setFont(font) self.label_7.setAlignment(QtCore.Qt.AlignLeading | QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter) self.label_7.setObjectName("label_7") self.RoomBox = QtWidgets.QComboBox(self.centralwidget) self.RoomBox.setGeometry(QtCore.QRect(220, 260, 400, 30)) palette = QtGui.QPalette() brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(120, 120, 120)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush) self.RoomBox.setPalette(palette) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.RoomBox.setFont(font) self.RoomBox.setToolTip("") self.RoomBox.setStatusTip("") self.RoomBox.setStyleSheet("background-color: rgb(135, 206, 235);") self.RoomBox.setEditable(False) self.RoomBox.setMaxCount(2) self.RoomBox.setIconSize(QtCore.QSize(16, 16)) self.RoomBox.setModelColumn(0) self.RoomBox.setObjectName("RoomBox") self.RoomBox.addItem("") self.RoomBox.addItem("") self.layoutWidget = QtWidgets.QWidget(self.centralwidget) self.layoutWidget.setGeometry(QtCore.QRect(110, 20, 451, 42)) self.layoutWidget.setObjectName("layoutWidget") self.horizontalLayout = QtWidgets.QHBoxLayout(self.layoutWidget) self.horizontalLayout.setContentsMargins(0, 0, 0, 0) self.horizontalLayout.setSpacing(17) self.horizontalLayout.setObjectName("horizontalLayout") self.add_contract_btn = QtWidgets.QPushButton(self.layoutWidget) self.add_contract_btn.setMinimumSize(QtCore.QSize(150, 40)) palette = QtGui.QPalette() brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(120, 120, 120)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush) self.add_contract_btn.setPalette(palette) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.add_contract_btn.setFont(font) self.add_contract_btn.setStyleSheet( "background-color: rgb(135, 206, 235);") self.add_contract_btn.setObjectName("add_contract_btn") self.horizontalLayout.addWidget(self.add_contract_btn) self.back_to_add_client_btn = QtWidgets.QPushButton(self.layoutWidget) self.back_to_add_client_btn.setMinimumSize(QtCore.QSize(150, 40)) palette = QtGui.QPalette() brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(120, 120, 120)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush) self.back_to_add_client_btn.setPalette(palette) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.back_to_add_client_btn.setFont(font) self.back_to_add_client_btn.setStyleSheet( "background-color: rgb(135, 206, 235);") self.back_to_add_client_btn.setObjectName("back_to_add_client_btn") self.back_to_add_client_btn.clicked.connect(self.openAdd_Client) self.back_to_add_client_btn.clicked.connect(add_contract.close) self.horizontalLayout.addWidget(self.back_to_add_client_btn) self.CostBox = QtWidgets.QComboBox(self.centralwidget) self.CostBox.setGeometry(QtCore.QRect(220, 320, 400, 30)) palette = QtGui.QPalette() brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(120, 120, 120)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(135, 206, 235)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush) self.CostBox.setPalette(palette) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.CostBox.setFont(font) self.CostBox.setToolTip("") self.CostBox.setStatusTip("") self.CostBox.setStyleSheet("background-color: rgb(135, 206, 235);") self.CostBox.setEditable(False) self.CostBox.setMaxCount(2) self.CostBox.setIconSize(QtCore.QSize(16, 16)) self.CostBox.setModelColumn(0) self.CostBox.setObjectName("CostBox") self.CostBox.addItem("") self.CostBox.addItem("") add_contract.setCentralWidget(self.centralwidget) self.statusbar = QtWidgets.QStatusBar(add_contract) self.statusbar.setObjectName("statusbar") add_contract.setStatusBar(self.statusbar) self.retranslateUi(add_contract) self.RoomBox.setCurrentIndex(0) self.CostBox.setCurrentIndex(0) QtCore.QMetaObject.connectSlotsByName(add_contract) def retranslateUi(self, add_contract): _translate = QtCore.QCoreApplication.translate add_contract.setWindowTitle( _translate("add_contract", "Добавление договора")) self.label.setText(_translate("add_contract", "Шифр договора")) self.label_2.setText(_translate("add_contract", "Дата начала")) self.label_3.setText(_translate("add_contract", "Дата окончания")) self.label_6.setText(_translate("add_contract", "Комната")) self.label_7.setText(_translate("add_contract", "Стоимость")) self.RoomBox.setItemText(0, _translate("add_contract", "Бюджет")) self.RoomBox.setItemText( 1, _translate("add_contract", "Платное обучение")) self.add_contract_btn.setText(_translate("add_contract", "Добавить")) self.back_to_add_client_btn.setText( _translate("add_contract", "Вернуться к добавлению клиента")) self.CostBox.setItemText(0, _translate("add_contract", "Бюджет")) self.CostBox.setItemText( 1, _translate("add_contract", "Платное обучение"))