def export_to_exel(self): hat_data = ["ФИО", "Дата начала", "Дата конца", "Шифр"] archive_mas = dbd.list_of_archive() export_file = xlwt.Workbook() sheet = export_file.add_sheet("Архив") i, j = 0, 0 for elem in hat_data: sheet.write(i, j, elem) j += 1 i, j = 1, 0 for archive in archive_mas: for elem in archive: sheet.write(i, j, elem) j += 1 i += 1 try: os.mkdir("exports") except: pass export_file.save("exports/Архив.xls") export_file.save("exports/Клиенты.xls") from success_action import Ui_Error self.window = QtWidgets.QMainWindow() self.ui = Ui_Error() self.ui.setupUi(self.window) self.window.show()
def export_to_exel(self): hat_data = [ "Шифр", "ФИО", "Общежитие", "Комната", "Дата начала", "Дата конца", "Льгота", "Стоимость", ] contract_mas = dbd.list_of_contracts() export_file = xlwt.Workbook() sheet = export_file.add_sheet("Договоры") i, j = 0, 0 for elem in hat_data: sheet.write(i, j, elem) j += 1 i, j = 1, 0 for contract in contract_mas: student = dbd.search_student_by_id(contract[0]) sheet.write(i, j, contract[2]["Шифр"]) sheet.write(i, j + 1, student[1]["ФИО"]) sheet.write(i, j + 2, contract[1]) sheet.write(i, j + 3, student[1]["Комната"]) sheet.write(i, j + 4, contract[2]["Дата начала"]) sheet.write(i, j + 5, contract[2]["Дата конца"]) sheet.write(i, j + 6, contract[2]["Льгота"]) sheet.write(i, j + 7, int(contract[2]["Стоимость"])) i += 1 try: os.mkdir("exports") except: pass export_file.save("exports/Договоры.xls") from success_action import Ui_Error self.window = QtWidgets.QMainWindow() self.ui = Ui_Error() self.ui.setupUi(self.window) self.window.show()
def openContract(self): from contract import Ui_contract self.window = QtWidgets.QMainWindow() self.ui = Ui_contract() self.ui.setupUi(self.window) self.window.show()
class Ui_list_contract(object): def fill_list(self): '''заполняет список''' mas = dbd.list_of_contracts() i = 1 for person in mas: key = dbd.search_student_by_id(person[0]) self.Contract_info.addItem(str(i) + '. ФИО: ' + key[1]['ФИО'] +";" + ' Договор: ' +str(person[2]['Шифр']) +";" +'\n' + 'Дата начала: ' + str(person[2]['Дата начала']) +";" + \ ' Дата конца: ' + str(person[2]['Дата конца']) +";" + ' Цена: ' + str(person[2]['Стоимость'])+"."+'\n') i = i + 1 def export_to_exel(self): hat_data = [ "Шифр", "ФИО", "Общежитие", "Комната", "Дата начала", "Дата конца", "Льгота", "Стоимость", ] contract_mas = dbd.list_of_contracts() export_file = xlwt.Workbook() sheet = export_file.add_sheet("Договоры") i, j = 0, 0 for elem in hat_data: sheet.write(i, j, elem) j += 1 i, j = 1, 0 for contract in contract_mas: student = dbd.search_student_by_id(contract[0]) sheet.write(i, j, contract[2]["Шифр"]) sheet.write(i, j + 1, student[1]["ФИО"]) sheet.write(i, j + 2, contract[1]) sheet.write(i, j + 3, student[1]["Комната"]) sheet.write(i, j + 4, contract[2]["Дата начала"]) sheet.write(i, j + 5, contract[2]["Дата конца"]) sheet.write(i, j + 6, contract[2]["Льгота"]) sheet.write(i, j + 7, int(contract[2]["Стоимость"])) i += 1 try: os.mkdir("exports") except: pass export_file.save("exports/Договоры.xls") from success_action import Ui_Error self.window = QtWidgets.QMainWindow() self.ui = Ui_Error() self.ui.setupUi(self.window) self.window.show() def openContract(self): from contract import Ui_contract self.window = QtWidgets.QMainWindow() self.ui = Ui_contract() self.ui.setupUi(self.window) self.window.show() def setupUi(self, list_contract): list_contract.setObjectName("list_contract") list_contract.resize(480, 491) list_contract.setMinimumSize(QtCore.QSize(300, 300)) list_contract.setMaximumSize(QtCore.QSize(1000, 500)) self.centralwidget = QtWidgets.QWidget(list_contract) self.centralwidget.setObjectName("centralwidget") self.layoutWidget = QtWidgets.QWidget(self.centralwidget) self.layoutWidget.setGeometry(QtCore.QRect(20, 20, 452, 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.import_contract_btn = QtWidgets.QPushButton(self.layoutWidget) self.import_contract_btn.setMinimumSize(QtCore.QSize(213, 40)) self.import_contract_btn.setMaximumSize(QtCore.QSize(213, 16777215)) 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.import_contract_btn.setPalette(palette) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.import_contract_btn.setFont(font) self.import_contract_btn.setStyleSheet( "background-color: rgb(135, 206, 235);") self.import_contract_btn.setObjectName("import_contract_btn") self.horizontalLayout.addWidget(self.import_contract_btn) self.back_to_contract_btn = QtWidgets.QPushButton(self.layoutWidget) self.back_to_contract_btn.setMinimumSize(QtCore.QSize(220, 40)) self.back_to_contract_btn.setMaximumSize(QtCore.QSize(220, 16777215)) 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_contract_btn.setPalette(palette) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.back_to_contract_btn.setFont(font) self.back_to_contract_btn.setStyleSheet( "background-color: rgb(135, 206, 235);") self.back_to_contract_btn.setObjectName("back_to_contract_btn") self.back_to_contract_btn.clicked.connect(self.openContract) self.import_contract_btn.clicked.connect(self.export_to_exel) self.back_to_contract_btn.clicked.connect(list_contract.close) self.horizontalLayout.addWidget(self.back_to_contract_btn) self.Contract_info = QtWidgets.QListWidget(self.centralwidget) self.Contract_info.setGeometry(QtCore.QRect(20, 89, 440, 371)) self.Contract_info.setAutoFillBackground(False) self.Contract_info.setStyleSheet("font: 75 10pt \"MS Shell Dlg 2\";\n" "selection-color: rgb(85, 170, 255);") self.Contract_info.setObjectName("Contract_info") list_contract.setCentralWidget(self.centralwidget) self.statusbar = QtWidgets.QStatusBar(list_contract) self.statusbar.setObjectName("statusbar") list_contract.setStatusBar(self.statusbar) self.retranslateUi(list_contract) QtCore.QMetaObject.connectSlotsByName(list_contract) self.fill_list() def retranslateUi(self, list_contract): _translate = QtCore.QCoreApplication.translate list_contract.setWindowTitle( _translate("list_contract", "Список договоров")) self.import_contract_btn.setText( _translate("list_contract", "Экспортировать в Excel")) self.back_to_contract_btn.setText( _translate("list_contract", "Вернуться в меню договора")) __sortingEnabled = self.Contract_info.isSortingEnabled() self.Contract_info.setSortingEnabled(False) self.Contract_info.setSortingEnabled(__sortingEnabled)
def openList(self): from list_facilities import Ui_list_facilities self.window = QtWidgets.QMainWindow() self.ui = Ui_list_facilities() self.ui.setupUi(self.window) self.window.show()
def openRed(self): from red_facility import Ui_red_facility self.window = QtWidgets.QMainWindow() self.ui = Ui_red_facility() self.ui.setupUi(self.window) self.window.show()
def openDel(self): from del_facility import Ui_del_facility self.window = QtWidgets.QMainWindow() self.ui = Ui_del_facility() self.ui.setupUi(self.window) self.window.show()
class Ui_Facilities(object): def openAdd(self): from add_facility import Ui_add_facility self.window = QtWidgets.QMainWindow() self.ui = Ui_add_facility() self.ui.setupUi(self.window) self.window.show() def openDel(self): from del_facility import Ui_del_facility self.window = QtWidgets.QMainWindow() self.ui = Ui_del_facility() self.ui.setupUi(self.window) self.window.show() def openRed(self): from red_facility import Ui_red_facility self.window = QtWidgets.QMainWindow() self.ui = Ui_red_facility() self.ui.setupUi(self.window) self.window.show() def openList(self): from list_facilities import Ui_list_facilities self.window = QtWidgets.QMainWindow() self.ui = Ui_list_facilities() self.ui.setupUi(self.window) self.window.show() def openContract(self): from contract import Ui_contract self.window = QtWidgets.QMainWindow() self.ui = Ui_contract() self.ui.setupUi(self.window) self.window.show() def setupUi(self, Facilities): Facilities.setObjectName("Facilities") Facilities.resize(450, 283) Facilities.setMinimumSize(QtCore.QSize(450, 283)) Facilities.setMaximumSize(QtCore.QSize(450, 283)) self.centralwidget = QtWidgets.QWidget(Facilities) self.centralwidget.setObjectName("centralwidget") self.layoutWidget = QtWidgets.QWidget(self.centralwidget) self.layoutWidget.setGeometry(QtCore.QRect(20, 10, 416, 226)) self.layoutWidget.setObjectName("layoutWidget") self.verticalLayout = QtWidgets.QVBoxLayout(self.layoutWidget) self.verticalLayout.setContentsMargins(0, 0, 0, 0) self.verticalLayout.setObjectName("verticalLayout") self.label = QtWidgets.QLabel(self.layoutWidget) self.label.setMinimumSize(QtCore.QSize(0, 40)) font = QtGui.QFont() font.setPointSize(18) self.label.setFont(font) self.label.setAlignment(QtCore.Qt.AlignCenter) self.label.setObjectName("label") self.verticalLayout.addWidget(self.label) self.gridLayout = QtWidgets.QGridLayout() self.gridLayout.setVerticalSpacing(28) self.gridLayout.setObjectName("gridLayout") self.add_facility_btn = QtWidgets.QPushButton(self.layoutWidget) self.add_facility_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_facility_btn.setPalette(palette) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.add_facility_btn.setFont(font) self.add_facility_btn.setStyleSheet("background-color: rgb(135, 206, 235);") self.add_facility_btn.setObjectName("add_facility_btn") self.add_facility_btn.clicked.connect(self.openAdd) self.add_facility_btn.clicked.connect(Facilities.close) self.gridLayout.addWidget(self.add_facility_btn, 0, 0, 1, 1) self.red_facility_btn = QtWidgets.QPushButton(self.layoutWidget) self.red_facility_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.red_facility_btn.setPalette(palette) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.red_facility_btn.setFont(font) self.red_facility_btn.setStyleSheet("background-color: rgb(135, 206, 235);") self.red_facility_btn.setObjectName("red_facility_btn") self.red_facility_btn.clicked.connect(self.openRed) self.red_facility_btn.clicked.connect(Facilities.close) self.gridLayout.addWidget(self.red_facility_btn, 1, 0, 1, 1) self.del_facility_btn = QtWidgets.QPushButton(self.layoutWidget) self.del_facility_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.del_facility_btn.setPalette(palette) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.del_facility_btn.setFont(font) self.del_facility_btn.setStyleSheet("background-color: rgb(135, 206, 235);") self.del_facility_btn.setObjectName("del_facility_btn") self.del_facility_btn.clicked.connect(self.openDel) self.del_facility_btn.clicked.connect(Facilities.close) self.gridLayout.addWidget(self.del_facility_btn, 2, 0, 1, 1) self.back_to_contract_btn = QtWidgets.QPushButton(self.layoutWidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.back_to_contract_btn.sizePolicy().hasHeightForWidth()) self.back_to_contract_btn.setSizePolicy(sizePolicy) self.back_to_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.back_to_contract_btn.setPalette(palette) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.back_to_contract_btn.setFont(font) self.back_to_contract_btn.setStyleSheet("background-color: rgb(135, 206, 235);") self.back_to_contract_btn.setObjectName("back_to_contract_btn") self.back_to_contract_btn.clicked.connect(self.openContract) self.back_to_contract_btn.clicked.connect(Facilities.close) self.gridLayout.addWidget(self.back_to_contract_btn, 2, 2, 1, 1) self.list_facilities_btn = QtWidgets.QPushButton(self.layoutWidget) self.list_facilities_btn.setMinimumSize(QtCore.QSize(0, 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.list_facilities_btn.setPalette(palette) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.list_facilities_btn.setFont(font) self.list_facilities_btn.setStyleSheet("background-color: rgb(135, 206, 235);") self.list_facilities_btn.setObjectName("list_facilities_btn") self.list_facilities_btn.clicked.connect(self.openList) self.list_facilities_btn.clicked.connect(Facilities.close) self.gridLayout.addWidget(self.list_facilities_btn, 0, 2, 1, 1) spacerItem = QtWidgets.QSpacerItem(100, 20, QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Minimum) self.gridLayout.addItem(spacerItem, 0, 1, 1, 1) self.verticalLayout.addLayout(self.gridLayout) Facilities.setCentralWidget(self.centralwidget) self.statusbar = QtWidgets.QStatusBar(Facilities) self.statusbar.setObjectName("statusbar") Facilities.setStatusBar(self.statusbar) self.retranslateUi(Facilities) QtCore.QMetaObject.connectSlotsByName(Facilities) def retranslateUi(self, Facilities): _translate = QtCore.QCoreApplication.translate Facilities.setWindowTitle(_translate("Facilities", "Льготы")) self.label.setText(_translate("Facilities", "Льготы")) self.add_facility_btn.setText(_translate("Facilities", "Добавить новую")) self.red_facility_btn.setText(_translate("Facilities", "Редактировать")) self.del_facility_btn.setText(_translate("Facilities", "Удалить")) self.back_to_contract_btn.setText(_translate("Facilities", "К меню договора")) self.list_facilities_btn.setText(_translate("Facilities", "Список льгот"))
class Ui_red_contract(object): def openRedContract(self): from red_contract_3 import Ui_red_contract_3 self.window = QtWidgets.QMainWindow() self.ui = Ui_red_contract_3() self.ui.setupUi(self.window) self.window.show() def openContract(self): from contract import Ui_contract self.window = QtWidgets.QMainWindow() self.ui = Ui_contract() self.ui.setupUi(self.window) self.window.show() def setupUi(self, red_contract): red_contract.setObjectName("red_contract") red_contract.resize(680, 300) red_contract.setMinimumSize(QtCore.QSize(680, 300)) red_contract.setMaximumSize(QtCore.QSize(680, 300)) self.centralwidget = QtWidgets.QWidget(red_contract) self.centralwidget.setObjectName("centralwidget") self.label_FIO = QtWidgets.QLabel(self.centralwidget) self.label_FIO.setGeometry(QtCore.QRect(60, 80, 130, 30)) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.label_FIO.setFont(font) self.label_FIO.setAlignment(QtCore.Qt.AlignCenter) self.label_FIO.setObjectName("label_FIO") self.FIO_line = QtWidgets.QLineEdit(self.centralwidget) self.FIO_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.FIO_line.setPalette(palette) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.FIO_line.setFont(font) self.FIO_line.setStyleSheet("background-color: rgb(135, 206, 235);") self.FIO_line.setText("") self.FIO_line.setObjectName("FIO_line") self.Contract_number_line = QtWidgets.QLineEdit(self.centralwidget) self.Contract_number_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.Contract_number_line.setPalette(palette) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.Contract_number_line.setFont(font) self.Contract_number_line.setStyleSheet( "background-color: rgb(135, 206, 235);") self.Contract_number_line.setObjectName("Contract_number_line") self.label_contract = QtWidgets.QLabel(self.centralwidget) self.label_contract.setGeometry(QtCore.QRect(60, 140, 130, 30)) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.label_contract.setFont(font) self.label_contract.setAlignment(QtCore.Qt.AlignCenter) self.label_contract.setObjectName("label_contract") self.layoutWidget = QtWidgets.QWidget(self.centralwidget) self.layoutWidget.setGeometry(QtCore.QRect(120, 20, 431, 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.find_contract_btn = QtWidgets.QPushButton(self.layoutWidget) self.find_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.find_contract_btn.setPalette(palette) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.find_contract_btn.setFont(font) self.find_contract_btn.setStyleSheet( "background-color: rgb(135, 206, 235);") self.find_contract_btn.setObjectName("find_contract_btn") self.horizontalLayout.addWidget(self.find_contract_btn) self.back_to_contract_btn = QtWidgets.QPushButton(self.layoutWidget) self.back_to_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.back_to_contract_btn.setPalette(palette) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.back_to_contract_btn.setFont(font) self.back_to_contract_btn.setStyleSheet( "background-color: rgb(135, 206, 235);") self.back_to_contract_btn.setObjectName("back_to_contract_btn") self.back_to_contract_btn.clicked.connect(self.openContract) self.back_to_contract_btn.clicked.connect(red_contract.close) self.horizontalLayout.addWidget(self.back_to_contract_btn) self.label_FIO_2 = QtWidgets.QLabel(self.centralwidget) self.label_FIO_2.setGeometry(QtCore.QRect(60, 110, 130, 30)) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.label_FIO_2.setFont(font) self.label_FIO_2.setAlignment(QtCore.Qt.AlignCenter) self.label_FIO_2.setObjectName("label_FIO_2") self.red_contract_btn = QtWidgets.QPushButton(self.centralwidget) self.red_contract_btn.setGeometry(QtCore.QRect(480, 210, 195, 40)) self.red_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.red_contract_btn.setPalette(palette) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.red_contract_btn.setFont(font) self.red_contract_btn.setStyleSheet( "background-color: rgb(135, 206, 235);") self.red_contract_btn.setObjectName("red_contract_btn") self.red_contract_btn.clicked.connect(self.openRedContract) self.red_contract_btn.clicked.connect(red_contract.close) self.Contract_list = QtWidgets.QListWidget(self.centralwidget) self.Contract_list.setGeometry(QtCore.QRect(60, 200, 400, 60)) sizePolicy = QtWidgets.QSizePolicy( QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Minimum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(21) sizePolicy.setHeightForWidth( self.Contract_list.sizePolicy().hasHeightForWidth()) self.Contract_list.setSizePolicy(sizePolicy) self.Contract_list.setMinimumSize(QtCore.QSize(400, 30)) self.Contract_list.setMaximumSize(QtCore.QSize(400, 60)) self.Contract_list.setSizeIncrement(QtCore.QSize(0, 30)) self.Contract_list.setBaseSize(QtCore.QSize(0, 30)) font = QtGui.QFont() font.setFamily("MS Shell Dlg 2") font.setPointSize(11) font.setBold(True) font.setWeight(75) self.Contract_list.setFont(font) self.Contract_list.setSizeAdjustPolicy( QtWidgets.QAbstractScrollArea.AdjustIgnored) self.Contract_list.setObjectName("Contract_list") red_contract.setCentralWidget(self.centralwidget) self.retranslateUi(red_contract) QtCore.QMetaObject.connectSlotsByName(red_contract) def retranslateUi(self, red_contract): _translate = QtCore.QCoreApplication.translate red_contract.setWindowTitle( _translate("red_contract", "Редактирование договоров")) self.label_FIO.setText(_translate("red_contract", "Введите ФИО")) self.label_contract.setText( _translate("red_contract", "Номер договора")) self.find_contract_btn.setText(_translate("red_contract", "Найти")) self.back_to_contract_btn.setText( _translate("red_contract", "Вернуться в меню договора")) self.label_FIO_2.setText(_translate("red_contract", "или")) self.red_contract_btn.setText( _translate("red_contract", "Редактировать"))
def openRed(self): from red_cost import Ui_red_cost self.window = QtWidgets.QMainWindow() self.ui = Ui_red_cost() self.ui.setupUi(self.window) self.window.show()
def openDel(self): from del_cost import Ui_del_cost self.window = QtWidgets.QMainWindow() self.ui = Ui_del_cost() self.ui.setupUi(self.window) self.window.show()
def openList(self): from list_cost import Ui_list_cost self.window = QtWidgets.QMainWindow() self.ui = Ui_list_cost() self.ui.setupUi(self.window) self.window.show()
class Ui_red_contract(object): def del_buff(self): dbd.delete_contract_buffer() def fill_list(self): '''заполняет список''' self.Contract_list.clear() fio = self.FIO_line.text() code = self.Contract_number_line.text() if fio != "": mas = dbd.search_student_by_fio(fio) if code != "": mas = dbd.search_student_by_code(code) i = 1 for person in mas: if "Договор" in person[1].keys(): self.Contract_list.addItem(str(i) + '. ФИО: ' + person[1]['ФИО'] + '\n' \ + 'Общежитие: ' + str(person[1]['Общежитие'])+' Договор: '+str(person[1]['Договор']['Шифр'])+'\n' \ + 'Адрес прописки: ' + str(person[1]['Адрес регистрации']) + '\n' \ + 'Комната: ' + str(person[1]['Комната']) \ + ' Пол: ' + str(person[1]['Пол']) + '\n') else: self.Contract_list.addItem(str(i) + '. ФИО: ' + person[1]['ФИО'] + '\n' \ + 'Общежитие: ' + str(person[1]['Общежитие']) + ' Договор: ' + str('') + \ '\n' + 'Адрес прописки: ' + str(person[1]['Адрес регистрации']) + '\n' \ + 'Комната: ' + str(person[1]['Комната']) \ + ' Пол: ' + str(person[1]['Пол']) + '\n') def redaction(self): # добавляет в буфер студента, который будет редактироваться, в red_contract_3 из буфера забираются данные и буфер удаляется fio = self.FIO_line.text() code = self.Contract_number_line.text() if fio != "": mas = dbd.search_student_by_fio(fio) if code != "": mas = dbd.search_student_by_code(code) n = self.Contract_list.currentRow() i = -1 for person in mas: if i == n - 1: dic = person[0] fio = str(person[1]['ФИО']) if "Договор" in person[1].keys(): code = str(person[1]['Договор']['Шифр']) start_date = str(person[1]['Договор']['Дата начала']) end_date = str(person[1]['Договор']['Дата конца']) cost = str(person[1]['Договор']['Стоимость']) facility = str(person[1]['Договор']['Льгота']) else: code = '' start_date = '' end_date = '' cost = '' facility = '' room = str(person[1]['Комната']) i = i + 1 dbd.add_contract_buffer(dic, fio, start_date, end_date, room, cost, facility, code) self.FIO_line.clear() self.Contract_list.clear() def openRedContract(self): from red_contract_3 import Ui_red_contract_3 self.window = QtWidgets.QMainWindow() self.ui = Ui_red_contract_3() self.ui.setupUi(self.window) self.window.show() def openContract(self): from contract import Ui_contract self.window = QtWidgets.QMainWindow() self.ui = Ui_contract() self.ui.setupUi(self.window) self.window.show() def setupUi(self, red_contract): red_contract.setObjectName("red_contract") red_contract.resize(680, 300) red_contract.setMinimumSize(QtCore.QSize(680, 300)) red_contract.setMaximumSize(QtCore.QSize(680, 300)) self.centralwidget = QtWidgets.QWidget(red_contract) self.centralwidget.setObjectName("centralwidget") self.label_FIO = QtWidgets.QLabel(self.centralwidget) self.label_FIO.setGeometry(QtCore.QRect(60, 80, 130, 30)) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.label_FIO.setFont(font) self.label_FIO.setAlignment(QtCore.Qt.AlignCenter) self.label_FIO.setObjectName("label_FIO") self.FIO_line = QtWidgets.QLineEdit(self.centralwidget) self.FIO_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.FIO_line.setPalette(palette) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.FIO_line.setFont(font) self.FIO_line.setStyleSheet("background-color: rgb(135, 206, 235);") self.FIO_line.setText("") self.FIO_line.setObjectName("FIO_line") self.Contract_number_line = QtWidgets.QLineEdit(self.centralwidget) self.Contract_number_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.Contract_number_line.setPalette(palette) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.Contract_number_line.setFont(font) self.Contract_number_line.setStyleSheet( "background-color: rgb(135, 206, 235);") self.Contract_number_line.setObjectName("Contract_number_line") self.label_contract = QtWidgets.QLabel(self.centralwidget) self.label_contract.setGeometry(QtCore.QRect(60, 140, 130, 30)) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.label_contract.setFont(font) self.label_contract.setAlignment(QtCore.Qt.AlignCenter) self.label_contract.setObjectName("label_contract") self.layoutWidget = QtWidgets.QWidget(self.centralwidget) self.layoutWidget.setGeometry(QtCore.QRect(120, 20, 431, 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.find_contract_btn = QtWidgets.QPushButton(self.layoutWidget) self.find_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.find_contract_btn.setPalette(palette) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.find_contract_btn.setFont(font) self.find_contract_btn.setStyleSheet( "background-color: rgb(135, 206, 235);") self.find_contract_btn.setObjectName("find_contract_btn") self.find_contract_btn.clicked.connect(self.fill_list) self.horizontalLayout.addWidget(self.find_contract_btn) self.back_to_contract_btn = QtWidgets.QPushButton(self.layoutWidget) self.back_to_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.back_to_contract_btn.setPalette(palette) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.back_to_contract_btn.setFont(font) self.back_to_contract_btn.setStyleSheet( "background-color: rgb(135, 206, 235);") self.back_to_contract_btn.setObjectName("back_to_contract_btn") self.back_to_contract_btn.clicked.connect(self.openContract) self.back_to_contract_btn.clicked.connect(red_contract.close) self.horizontalLayout.addWidget(self.back_to_contract_btn) self.label_FIO_2 = QtWidgets.QLabel(self.centralwidget) self.label_FIO_2.setGeometry(QtCore.QRect(60, 110, 130, 30)) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.label_FIO_2.setFont(font) self.label_FIO_2.setAlignment(QtCore.Qt.AlignCenter) self.label_FIO_2.setObjectName("label_FIO_2") self.red_contract_btn = QtWidgets.QPushButton(self.centralwidget) self.red_contract_btn.setGeometry(QtCore.QRect(500, 220, 175, 40)) self.red_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.red_contract_btn.setPalette(palette) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.red_contract_btn.setFont(font) self.red_contract_btn.setStyleSheet( "background-color: rgb(135, 206, 235);") self.red_contract_btn.setObjectName("red_contract_btn") self.red_contract_btn.clicked.connect(self.redaction) self.red_contract_btn.clicked.connect(self.openRedContract) self.red_contract_btn.clicked.connect(red_contract.close) self.Contract_list = QtWidgets.QListWidget(self.centralwidget) self.Contract_list.setGeometry(QtCore.QRect(60, 200, 420, 80)) sizePolicy = QtWidgets.QSizePolicy( QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Minimum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(21) sizePolicy.setHeightForWidth( self.Contract_list.sizePolicy().hasHeightForWidth()) self.Contract_list.setSizePolicy(sizePolicy) self.Contract_list.setMinimumSize(QtCore.QSize(420, 30)) self.Contract_list.setMaximumSize(QtCore.QSize(420, 80)) self.Contract_list.setSizeIncrement(QtCore.QSize(0, 80)) self.Contract_list.setBaseSize(QtCore.QSize(0, 80)) font = QtGui.QFont() font.setFamily("MS Shell Dlg 2") font.setPointSize(11) font.setBold(True) font.setWeight(75) self.Contract_list.setFont(font) self.Contract_list.setSizeAdjustPolicy( QtWidgets.QAbstractScrollArea.AdjustIgnored) self.Contract_list.setObjectName("Contract_list") red_contract.setCentralWidget(self.centralwidget) self.retranslateUi(red_contract) QtCore.QMetaObject.connectSlotsByName(red_contract) def retranslateUi(self, red_contract): _translate = QtCore.QCoreApplication.translate red_contract.setWindowTitle( _translate("red_contract", "Редактирование договоров")) self.label_FIO.setText(_translate("red_contract", "Введите ФИО")) self.label_contract.setText( _translate("red_contract", "Номер договора")) self.find_contract_btn.setText(_translate("red_contract", "Найти")) self.back_to_contract_btn.setText( _translate("red_contract", "Вернуться в меню договора")) self.label_FIO_2.setText(_translate("red_contract", "или")) self.red_contract_btn.setText( _translate("red_contract", "Редактирование"))
class Ui_list_contract(object): def openContract(self): from contract import Ui_contract self.window = QtWidgets.QMainWindow() self.ui = Ui_contract() self.ui.setupUi(self.window) self.window.show() def setupUi(self, list_contract): list_contract.setObjectName("list_contract") list_contract.resize(480, 491) list_contract.setMinimumSize(QtCore.QSize(300, 300)) list_contract.setMaximumSize(QtCore.QSize(1000, 500)) self.centralwidget = QtWidgets.QWidget(list_contract) self.centralwidget.setObjectName("centralwidget") self.layoutWidget = QtWidgets.QWidget(self.centralwidget) self.layoutWidget.setGeometry(QtCore.QRect(20, 20, 452, 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.import_contract_btn = QtWidgets.QPushButton(self.layoutWidget) self.import_contract_btn.setMinimumSize(QtCore.QSize(213, 40)) self.import_contract_btn.setMaximumSize(QtCore.QSize(213, 16777215)) 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.import_contract_btn.setPalette(palette) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.import_contract_btn.setFont(font) self.import_contract_btn.setStyleSheet( "background-color: rgb(135, 206, 235);") self.import_contract_btn.setObjectName("import_contract_btn") self.horizontalLayout.addWidget(self.import_contract_btn) self.back_to_contract_btn = QtWidgets.QPushButton(self.layoutWidget) self.back_to_contract_btn.setMinimumSize(QtCore.QSize(220, 40)) self.back_to_contract_btn.setMaximumSize(QtCore.QSize(220, 16777215)) 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_contract_btn.setPalette(palette) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.back_to_contract_btn.setFont(font) self.back_to_contract_btn.setStyleSheet( "background-color: rgb(135, 206, 235);") self.back_to_contract_btn.setObjectName("back_to_contract_btn") self.back_to_contract_btn.clicked.connect(self.openContract) self.back_to_contract_btn.clicked.connect(list_contract.close) self.horizontalLayout.addWidget(self.back_to_contract_btn) self.Contract_info = QtWidgets.QListWidget(self.centralwidget) self.Contract_info.setGeometry(QtCore.QRect(20, 89, 440, 371)) self.Contract_info.setAutoFillBackground(False) self.Contract_info.setStyleSheet("font: 75 10pt \"MS Shell Dlg 2\";\n" "selection-color: rgb(85, 170, 255);") self.Contract_info.setObjectName("Contract_info") item = QtWidgets.QListWidgetItem() self.Contract_info.addItem(item) item = QtWidgets.QListWidgetItem() self.Contract_info.addItem(item) list_contract.setCentralWidget(self.centralwidget) self.statusbar = QtWidgets.QStatusBar(list_contract) self.statusbar.setObjectName("statusbar") list_contract.setStatusBar(self.statusbar) self.retranslateUi(list_contract) QtCore.QMetaObject.connectSlotsByName(list_contract) def retranslateUi(self, list_contract): _translate = QtCore.QCoreApplication.translate list_contract.setWindowTitle( _translate("list_contract", "Список договоров")) self.import_contract_btn.setText( _translate("list_contract", "Импортировать в Excel")) self.back_to_contract_btn.setText( _translate("list_contract", "Вернуться в меню договора")) __sortingEnabled = self.Contract_info.isSortingEnabled() self.Contract_info.setSortingEnabled(False) item = self.Contract_info.item(0) item.setText(_translate("list_contract", "addawd")) item = self.Contract_info.item(1) item.setText(_translate("list_contract", "dtyjhn")) self.Contract_info.setSortingEnabled(__sortingEnabled)
class Ui_del_contract(object): def fill_list(self): '''заполняет список''' self.Contract_list.clear() fio = self.FIO_line.text() code = self.Contract_number_line.text() if fio != "": mas = dbd.search_student_by_fio(fio) if code != "": mas = dbd.search_student_by_code(code) i = 1 for person in mas: if "Договор" in person[1].keys(): self.Contract_list.addItem(str(i) + '. ФИО: ' + person[1]['ФИО'] + '\n' \ + 'Общежитие: ' + str(person[1]['Общежитие'])+' Договор: '+str(person[1]['Договор']['Шифр'])+'\n' \ + 'Адрес прописки: ' + str(person[1]['Адрес регистрации']) + '\n' \ + 'Комната: ' + str(person[1]['Комната']) \ + ' Пол: ' + str(person[1]['Пол']) + '\n') else: self.Contract_list.addItem(str(i) + '. ФИО: ' + person[1]['ФИО'] + '\n' \ + 'Общежитие: ' + str(person[1]['Общежитие']) + ' Договор: ' + str('') + \ '\n' + 'Адрес прописки: ' + str(person[1]['Адрес регистрации']) + '\n' \ + 'Комната: ' + str(person[1]['Комната']) \ + ' Пол: ' + str(person[1]['Пол']) + '\n') def delete_one(self): fio = self.FIO_line.text() code = self.Contract_number_line.text() if fio != "": mas = dbd.search_student_by_fio(fio) if code != "": mas = dbd.search_student_by_code(code) n = self.Contract_list.currentRow() i = -1 for person in mas: if i == n - 1: dic = person[0] dbd.delite_contract(dic) self.FIO_line.clear() self.Contract_number_line.clear() self.Contract_list.clear() def add_to_archive(self): fio = self.FIO_line.text() code = self.Contract_number_line.text() if fio != "": mas = dbd.search_student_by_fio(fio) if code != "": mas = dbd.search_student_by_code(code) n = self.Contract_list.currentRow() i = -1 for person in mas: if i == n - 1: dic = person[0] person_data = person[1] if code == "": code = person_data["Договор"]["Шифр"] if fio == "": fio = person_data["ФИО"] dbd.add_to_archive(fio, code, person_data["Договор"]["Дата начала"], person_data["Договор"]["Дата конца"]) dbd.delite_contract(dic) self.FIO_line.clear() self.Contract_number_line.clear() self.Contract_list.clear() def openContract(self): from contract import Ui_contract self.window = QtWidgets.QMainWindow() self.ui = Ui_contract() self.ui.setupUi(self.window) self.window.show() def setupUi(self, del_contract): del_contract.setObjectName("del_contract") del_contract.resize(680, 300) del_contract.setMinimumSize(QtCore.QSize(680, 300)) del_contract.setMaximumSize(QtCore.QSize(680, 300)) self.centralwidget = QtWidgets.QWidget(del_contract) self.centralwidget.setObjectName("centralwidget") self.label_FIO = QtWidgets.QLabel(self.centralwidget) self.label_FIO.setGeometry(QtCore.QRect(60, 80, 130, 30)) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.label_FIO.setFont(font) self.label_FIO.setAlignment(QtCore.Qt.AlignCenter) self.label_FIO.setObjectName("label_FIO") self.FIO_line = QtWidgets.QLineEdit(self.centralwidget) self.FIO_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.FIO_line.setPalette(palette) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.FIO_line.setFont(font) self.FIO_line.setStyleSheet("background-color: rgb(135, 206, 235);") self.FIO_line.setText("") self.FIO_line.setObjectName("FIO_line") self.Contract_number_line = QtWidgets.QLineEdit(self.centralwidget) self.Contract_number_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.Contract_number_line.setPalette(palette) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.Contract_number_line.setFont(font) self.Contract_number_line.setStyleSheet( "background-color: rgb(135, 206, 235);") self.Contract_number_line.setObjectName("Contract_number_line") self.label_contract = QtWidgets.QLabel(self.centralwidget) self.label_contract.setGeometry(QtCore.QRect(60, 140, 130, 30)) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.label_contract.setFont(font) self.label_contract.setAlignment(QtCore.Qt.AlignCenter) self.label_contract.setObjectName("label_contract") self.layoutWidget = QtWidgets.QWidget(self.centralwidget) self.layoutWidget.setGeometry(QtCore.QRect(120, 20, 431, 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.find_contract_btn = QtWidgets.QPushButton(self.layoutWidget) self.find_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.find_contract_btn.setPalette(palette) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.find_contract_btn.setFont(font) self.find_contract_btn.setStyleSheet( "background-color: rgb(135, 206, 235);") self.find_contract_btn.setObjectName("find_contract_btn") self.find_contract_btn.clicked.connect(self.fill_list) self.horizontalLayout.addWidget(self.find_contract_btn) self.back_to_contract_btn = QtWidgets.QPushButton(self.layoutWidget) self.back_to_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.back_to_contract_btn.setPalette(palette) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.back_to_contract_btn.setFont(font) self.back_to_contract_btn.setStyleSheet( "background-color: rgb(135, 206, 235);") self.back_to_contract_btn.setObjectName("back_to_contract_btn") self.back_to_contract_btn.clicked.connect(self.openContract) self.back_to_contract_btn.clicked.connect(del_contract.close) self.horizontalLayout.addWidget(self.back_to_contract_btn) self.label_FIO_2 = QtWidgets.QLabel(self.centralwidget) self.label_FIO_2.setGeometry(QtCore.QRect(60, 110, 130, 30)) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.label_FIO_2.setFont(font) self.label_FIO_2.setAlignment(QtCore.Qt.AlignCenter) self.label_FIO_2.setObjectName("label_FIO_2") self.del_contract_btn = QtWidgets.QPushButton(self.centralwidget) self.del_contract_btn.setGeometry(QtCore.QRect(500, 195, 175, 40)) self.del_contract_btn.setMinimumSize(QtCore.QSize(150, 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.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.del_contract_btn.setPalette(palette) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.del_contract_btn.setFont(font) self.del_contract_btn.setStyleSheet( "background-color: rgb(135, 206, 235);") self.del_contract_btn.setObjectName("del_contract_btn") self.del_contract_btn.clicked.connect(self.delete_one) self.arch_contract_btn = QtWidgets.QPushButton(self.centralwidget) self.arch_contract_btn.setGeometry(QtCore.QRect(500, 240, 175, 40)) self.arch_contract_btn.setMinimumSize(QtCore.QSize(150, 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.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.arch_contract_btn.setPalette(palette) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.arch_contract_btn.setFont(font) self.arch_contract_btn.setStyleSheet( "background-color: rgb(135, 206, 235);") self.arch_contract_btn.setObjectName("arch_contract_btn") self.arch_contract_btn.clicked.connect(self.add_to_archive) self.Contract_list = QtWidgets.QListWidget(self.centralwidget) self.Contract_list.setGeometry(QtCore.QRect(60, 195, 420, 85)) sizePolicy = QtWidgets.QSizePolicy( QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Minimum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(21) sizePolicy.setHeightForWidth( self.Contract_list.sizePolicy().hasHeightForWidth()) self.Contract_list.setSizePolicy(sizePolicy) self.Contract_list.setMinimumSize(QtCore.QSize(400, 30)) self.Contract_list.setMaximumSize(QtCore.QSize(420, 85)) self.Contract_list.setSizeIncrement(QtCore.QSize(0, 85)) self.Contract_list.setBaseSize(QtCore.QSize(0, 85)) font = QtGui.QFont() font.setFamily("MS Shell Dlg 2") font.setPointSize(11) font.setBold(True) font.setWeight(75) self.Contract_list.setFont(font) self.Contract_list.setSizeAdjustPolicy( QtWidgets.QAbstractScrollArea.AdjustIgnored) self.Contract_list.setObjectName("Contract_list") del_contract.setCentralWidget(self.centralwidget) self.retranslateUi(del_contract) QtCore.QMetaObject.connectSlotsByName(del_contract) def retranslateUi(self, del_contract): _translate = QtCore.QCoreApplication.translate del_contract.setWindowTitle( _translate("del_contract", "Удаление договора")) self.label_FIO.setText(_translate("del_contract", "Введите ФИО")) self.label_contract.setText( _translate("del_contract", "Номер договора")) self.find_contract_btn.setText(_translate("del_contract", "Найти")) self.back_to_contract_btn.setText( _translate("del_contract", "Вернуться в меню договора")) self.label_FIO_2.setText(_translate("del_contract", "или")) self.del_contract_btn.setText(_translate("del_contract", "Удалить")) self.arch_contract_btn.setText( _translate("del_contract", "Архивировать"))