def startBtnAction(self): if len(self.setNumberLineEdit.text()) <= 0: _translate = QtCore.QCoreApplication.translate self.startBtn.setText(_translate("MainWindow", "Input Set Number")) else: self.mainWindow = QtWidgets.QMainWindow() self.ui = Ui_Main() # Params self.ui.setParams( self.setNumberLineEdit.text(), self.jumpingJacks.currentText(), self.squats.currentText(), self.weightCurls.currentText()) utils.tracker = utils.ExerciseTracker( int(self.setNumberLineEdit.text()), int(self.jumpingJacks.currentText()), int(self.squats.currentText()), int(self.weightCurls.currentText()), self) print("tracker created") # Ui self.ui.setupUi(self.mainWindow) # Window MainWindow.hide() self.mainWindow.show() self.bool = True
def openMain(self): from Main import Ui_Main self.window = QtWidgets.QMainWindow() self.ui = Ui_Main() self.ui.setupUi(self.window) self.window.show()
def openList(self): from list_hostel import Ui_list_hostel self.window = QtWidgets.QMainWindow() self.ui = Ui_list_hostel() self.ui.setupUi(self.window) self.window.show()
def openRed(self): from red_hostel import Ui_red_hostel self.window = QtWidgets.QMainWindow() self.ui = Ui_red_hostel() self.ui.setupUi(self.window) self.window.show()
def openDel(self): from del_hostel import Ui_del_hostel self.window = QtWidgets.QMainWindow() self.ui = Ui_del_hostel() self.ui.setupUi(self.window) self.window.show()
def openRoom(self): from rooms import Ui_Rooms self.window = QtWidgets.QMainWindow() self.ui = Ui_Rooms() self.ui.setupUi(self.window) self.window.show()
class Ui_hostel(object): def openRoom(self): from rooms import Ui_Rooms self.window = QtWidgets.QMainWindow() self.ui = Ui_Rooms() self.ui.setupUi(self.window) self.window.show() def openAdd(self): from add_hostel import Ui_add_hostel self.window = QtWidgets.QMainWindow() self.ui = Ui_add_hostel() self.ui.setupUi(self.window) self.window.show() def openDel(self): from del_hostel import Ui_del_hostel self.window = QtWidgets.QMainWindow() self.ui = Ui_del_hostel() self.ui.setupUi(self.window) self.window.show() def openRed(self): from red_hostel import Ui_red_hostel self.window = QtWidgets.QMainWindow() self.ui = Ui_red_hostel() self.ui.setupUi(self.window) self.window.show() def openList(self): from list_hostel import Ui_list_hostel self.window = QtWidgets.QMainWindow() self.ui = Ui_list_hostel() self.ui.setupUi(self.window) self.window.show() def openMain(self): from Main import Ui_Main self.window = QtWidgets.QMainWindow() self.ui = Ui_Main() self.ui.setupUi(self.window) self.window.show() def setupUi(self, hostel): hostel.setObjectName("hostel") hostel.resize(450, 283) hostel.setMinimumSize(QtCore.QSize(450, 283)) hostel.setMaximumSize(QtCore.QSize(450, 283)) self.centralwidget = QtWidgets.QWidget(hostel) self.centralwidget.setObjectName("centralwidget") self.layoutWidget = QtWidgets.QWidget(self.centralwidget) self.layoutWidget.setGeometry(QtCore.QRect(10, 10, 422, 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_hostel_btn = QtWidgets.QPushButton(self.layoutWidget) self.add_hostel_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_hostel_btn.setPalette(palette) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.add_hostel_btn.setFont(font) self.add_hostel_btn.setStyleSheet( "background-color: rgb(135, 206, 235);") self.add_hostel_btn.setObjectName("add_hostel_btn") self.add_hostel_btn.clicked.connect(self.openAdd) self.add_hostel_btn.clicked.connect(hostel.close) self.gridLayout.addWidget(self.add_hostel_btn, 0, 0, 1, 1) self.red_hostel_btn = QtWidgets.QPushButton(self.layoutWidget) self.red_hostel_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_hostel_btn.setPalette(palette) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.red_hostel_btn.setFont(font) self.red_hostel_btn.setStyleSheet( "background-color: rgb(135, 206, 235);") self.red_hostel_btn.setObjectName("red_hostel_btn") self.red_hostel_btn.clicked.connect(self.openRed) self.red_hostel_btn.clicked.connect(hostel.close) self.gridLayout.addWidget(self.red_hostel_btn, 1, 0, 1, 1) self.del_hostel_btn = QtWidgets.QPushButton(self.layoutWidget) self.del_hostel_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_hostel_btn.setPalette(palette) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.del_hostel_btn.setFont(font) self.del_hostel_btn.setStyleSheet( "background-color: rgb(135, 206, 235);") self.del_hostel_btn.setObjectName("del_hostel_btn") self.del_hostel_btn.clicked.connect(self.openDel) self.del_hostel_btn.clicked.connect(hostel.close) self.gridLayout.addWidget(self.del_hostel_btn, 2, 0, 1, 1) self.main_hostel_btn = QtWidgets.QPushButton(self.layoutWidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.main_hostel_btn.sizePolicy().hasHeightForWidth()) self.main_hostel_btn.setSizePolicy(sizePolicy) self.main_hostel_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.main_hostel_btn.setPalette(palette) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.main_hostel_btn.setFont(font) self.main_hostel_btn.setStyleSheet( "background-color: rgb(135, 206, 235);") self.main_hostel_btn.setObjectName("main_hostel_btn") self.main_hostel_btn.clicked.connect(self.openMain) self.main_hostel_btn.clicked.connect(hostel.close) self.gridLayout.addWidget(self.main_hostel_btn, 2, 2, 1, 1) self.list_hostel_btn = QtWidgets.QPushButton(self.layoutWidget) self.list_hostel_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_hostel_btn.setPalette(palette) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.list_hostel_btn.setFont(font) self.list_hostel_btn.setStyleSheet( "background-color: rgb(135, 206, 235);") self.list_hostel_btn.setObjectName("list_hostel_btn") self.list_hostel_btn.clicked.connect(self.openList) self.list_hostel_btn.clicked.connect(hostel.close) self.gridLayout.addWidget(self.list_hostel_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.room_hostel_btn = QtWidgets.QPushButton(self.layoutWidget) self.room_hostel_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.room_hostel_btn.setPalette(palette) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.room_hostel_btn.setFont(font) self.room_hostel_btn.setStyleSheet( "background-color: rgb(135, 206, 235);") self.room_hostel_btn.setObjectName("room_hostel_btn") self.room_hostel_btn.clicked.connect(self.openRoom) self.room_hostel_btn.clicked.connect(hostel.close) self.gridLayout.addWidget(self.room_hostel_btn, 1, 2, 1, 1) self.verticalLayout.addLayout(self.gridLayout) hostel.setCentralWidget(self.centralwidget) self.statusbar = QtWidgets.QStatusBar(hostel) self.statusbar.setObjectName("statusbar") hostel.setStatusBar(self.statusbar) self.retranslateUi(hostel) QtCore.QMetaObject.connectSlotsByName(hostel) def retranslateUi(self, hostel): _translate = QtCore.QCoreApplication.translate hostel.setWindowTitle(_translate("hostel", "Общежития")) self.label.setText(_translate("hostel", "Общежития")) self.add_hostel_btn.setText(_translate("hostel", "Добавить новую")) self.red_hostel_btn.setText(_translate("hostel", "Редактировать")) self.del_hostel_btn.setText(_translate("hostel", "Удалить")) self.main_hostel_btn.setText(_translate("hostel", "Рабочий стол")) self.list_hostel_btn.setText(_translate("hostel", "Список общежитий")) self.room_hostel_btn.setText(_translate("hostel", "Комнаты"))
def openRed(self): from red_contract import Ui_red_contract self.window = QtWidgets.QMainWindow() self.ui = Ui_red_contract() self.ui.setupUi(self.window) self.window.show()
def openDel(self): from del_contract import Ui_del_contract self.window = QtWidgets.QMainWindow() self.ui = Ui_del_contract() self.ui.setupUi(self.window) self.window.show()
def openArch(self): from list_archive import Ui_list_contract self.window = QtWidgets.QMainWindow() self.ui = Ui_list_contract() self.ui.setupUi(self.window) self.window.show()
def openHelp(self): from facilities import Ui_Facilities self.window = QtWidgets.QMainWindow() self.ui = Ui_Facilities() self.ui.setupUi(self.window) self.window.show()
class Ui_contract(object): def openHelp(self): from facilities import Ui_Facilities self.window = QtWidgets.QMainWindow() self.ui = Ui_Facilities() self.ui.setupUi(self.window) self.window.show() def openList(self): from list_contract import Ui_list_contract self.window = QtWidgets.QMainWindow() self.ui = Ui_list_contract() self.ui.setupUi(self.window) self.window.show() def openArch(self): from list_archive import Ui_list_contract self.window = QtWidgets.QMainWindow() self.ui = Ui_list_contract() self.ui.setupUi(self.window) self.window.show() def openDel(self): from del_contract import Ui_del_contract self.window = QtWidgets.QMainWindow() self.ui = Ui_del_contract() self.ui.setupUi(self.window) self.window.show() def openRed(self): from red_contract import Ui_red_contract self.window = QtWidgets.QMainWindow() self.ui = Ui_red_contract() self.ui.setupUi(self.window) self.window.show() def openMain(self): from Main import Ui_Main self.window = QtWidgets.QMainWindow() self.ui = Ui_Main() self.ui.setupUi(self.window) self.window.show() def setupUi(self, contract): contract.setObjectName("contract") contract.resize(450, 360) contract.setMinimumSize(QtCore.QSize(450, 360)) contract.setMaximumSize(QtCore.QSize(450, 360)) self.centralwidget = QtWidgets.QWidget(contract) self.centralwidget.setObjectName("centralwidget") self.layoutWidget = QtWidgets.QWidget(self.centralwidget) self.layoutWidget.setGeometry(QtCore.QRect(20, 10, 416, 316)) self.layoutWidget.setObjectName("layoutWidget") self.verticalLayout = QtWidgets.QVBoxLayout(self.layoutWidget) self.verticalLayout.setContentsMargins(0, 0, 0, 0) self.verticalLayout.setSpacing(0) self.verticalLayout.setObjectName("verticalLayout") self.label = QtWidgets.QLabel(self.layoutWidget) self.label.setMinimumSize(QtCore.QSize(0, 60)) self.label.setMaximumSize(QtCore.QSize(16777215, 60)) 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") spacerItem = QtWidgets.QSpacerItem(100, 20, QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Minimum) self.gridLayout.addItem(spacerItem, 0, 1, 1, 1) self.list_contract_btn = QtWidgets.QPushButton(self.layoutWidget) self.list_contract_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_contract_btn.setPalette(palette) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.list_contract_btn.setFont(font) self.list_contract_btn.setStyleSheet( "background-color: rgb(135, 206, 235);") self.list_contract_btn.setObjectName("list_contract_btn") self.list_contract_btn.clicked.connect(self.openList) self.list_contract_btn.clicked.connect(contract.close) self.gridLayout.addWidget(self.list_contract_btn, 3, 0, 1, 1) self.main_contract_btn = QtWidgets.QPushButton(self.layoutWidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.main_contract_btn.sizePolicy().hasHeightForWidth()) self.main_contract_btn.setSizePolicy(sizePolicy) self.main_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.main_contract_btn.setPalette(palette) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.main_contract_btn.setFont(font) self.main_contract_btn.setStyleSheet( "background-color: rgb(135, 206, 235);") self.main_contract_btn.setObjectName("main_contract_btn") self.main_contract_btn.clicked.connect(self.openMain) self.main_contract_btn.clicked.connect(contract.close) self.gridLayout.addWidget(self.main_contract_btn, 3, 2, 1, 1) self.cost_btn = QtWidgets.QPushButton(self.layoutWidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.cost_btn.sizePolicy().hasHeightForWidth()) self.cost_btn.setSizePolicy(sizePolicy) self.cost_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.cost_btn.setPalette(palette) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.cost_btn.setFont(font) self.cost_btn.setStyleSheet("background-color: rgb(135, 206, 235);") self.cost_btn.setObjectName("cost_btn") self.cost_btn.clicked.connect(self.openHelp) self.cost_btn.clicked.connect(contract.close) self.gridLayout.addWidget(self.cost_btn, 0, 2, 1, 1) self.red_contract_btn = QtWidgets.QPushButton(self.layoutWidget) 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.openRed) self.red_contract_btn.clicked.connect(contract.close) self.gridLayout.addWidget(self.red_contract_btn, 0, 0, 1, 1) self.del_contract_btn = QtWidgets.QPushButton(self.layoutWidget) self.del_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.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.openDel) self.del_contract_btn.clicked.connect(contract.close) self.gridLayout.addWidget(self.del_contract_btn, 1, 0, 1, 1) self.arch_contract_btn = QtWidgets.QPushButton(self.layoutWidget) self.arch_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.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.openArch) self.arch_contract_btn.clicked.connect(contract.close) self.gridLayout.addWidget(self.arch_contract_btn, 1, 2, 1, 1) self.verticalLayout.addLayout(self.gridLayout) contract.setCentralWidget(self.centralwidget) self.statusbar = QtWidgets.QStatusBar(contract) self.statusbar.setObjectName("statusbar") contract.setStatusBar(self.statusbar) self.retranslateUi(contract) QtCore.QMetaObject.connectSlotsByName(contract) def retranslateUi(self, contract): _translate = QtCore.QCoreApplication.translate contract.setWindowTitle(_translate("contract", "Договор")) self.label.setText(_translate("contract", "Договор")) self.list_contract_btn.setText( _translate("contract", "Список договоров")) self.main_contract_btn.setText(_translate("contract", "Рабочий стол")) self.cost_btn.setText(_translate("contract", "Стоимости/Льготы")) self.red_contract_btn.setText(_translate("contract", "Редактирование")) self.del_contract_btn.setText(_translate("contract", "Удалить")) self.arch_contract_btn.setText(_translate("contract", "Архив"))
class Ui_reference(object): def openMain(self): from Main import Ui_Main self.window = QtWidgets.QMainWindow() self.ui = Ui_Main() self.ui.setupUi(self.window) self.window.show() def setupUi(self, reference): reference.setObjectName("reference") reference.resize(480, 491) reference.setMinimumSize(QtCore.QSize(300, 300)) reference.setMaximumSize(QtCore.QSize(1000, 500)) self.centralwidget = QtWidgets.QWidget(reference) self.centralwidget.setObjectName("centralwidget") self.layoutWidget = QtWidgets.QWidget(self.centralwidget) self.layoutWidget.setGeometry(QtCore.QRect(20, 20, 445, 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.back_to_main_btn = QtWidgets.QPushButton(self.layoutWidget) self.back_to_main_btn.setMinimumSize(QtCore.QSize(213, 40)) self.back_to_main_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.back_to_main_btn.setPalette(palette) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.back_to_main_btn.setFont(font) self.back_to_main_btn.setStyleSheet( "background-color: rgb(135, 206, 235);") self.back_to_main_btn.setObjectName("back_to_main_btn") self.back_to_main_btn.clicked.connect(self.openMain) self.back_to_main_btn.clicked.connect(reference.close) self.horizontalLayout.addWidget(self.back_to_main_btn) self.textEdit = QtWidgets.QTextEdit(self.centralwidget) self.textEdit.setGeometry(QtCore.QRect(20, 90, 440, 370)) self.textEdit.setStyleSheet("") self.textEdit.setObjectName("textEdit") reference.setCentralWidget(self.centralwidget) self.statusbar = QtWidgets.QStatusBar(reference) self.statusbar.setObjectName("statusbar") reference.setStatusBar(self.statusbar) self.retranslateUi(reference) QtCore.QMetaObject.connectSlotsByName(reference) def retranslateUi(self, reference): _translate = QtCore.QCoreApplication.translate reference.setWindowTitle(_translate("reference", "Справка")) self.back_to_main_btn.setText( _translate("reference", "Вернуться на рабочий стол")) self.textEdit.setHtml( _translate( "reference", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n" "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n" "p, li { white-space: pre-wrap; }\n" "</style></head><body style=\" font-family:\'MS Shell Dlg 2\'; font-size:8.25pt; font-weight:400; font-style:normal;\">\n" "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:8pt;\">Данное приложение предназначено для пользования сотрудниками отдела по работе с общежитиями университета для ведения электронной записи занятости общежитий вуза и хранения договоров.</span></p>\n" "<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;\"><br /></p>\n" "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:8pt;\">Чтобы добавить или удалить клиента, редактировать информацию о имеющемся клиенте или просмотреть список всех клиентов перейдите в соответствующий раздел, нажав кнопку «Клиент».</span></p>\n" "<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;\"><br /></p>\n" "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:8pt;\">Чтобы редактировать договор или просмотреть список всех договоров перейдите в соответствующий раздел "Договор". Внимание: договор создается с заведением нового клиента в системе или во время редактирования информации о клиенте, без клиента договор не может существовать.</span></p>\n" "<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;\"><br /></p>\n" "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:8pt;\">Чтобы добавить, удалить, редактировать информацию о стоимостях и льготах или сформировать списки всех стоимостей и льгот, для начала перейдите в раздел "Договор", затем выберите соответствующий раздел "Стоимости" или "Льготы".</span></p>\n" "<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;\"><br /></p>\n" "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:8pt;\">Чтобы добавить, удалить или редактировать информацию об общежитии, а также сформировать список всех общежитий, перейдите в соответствующий раздел "Общежития".</span></p>\n" "<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;\"><br /></p>\n" "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:8pt;\">Чтобы добавить, удалить, редактировать информацию о комнатах общежитий, а также сформировать список всех комнат, для начала перейдите в раздел "Общежития", затем выберите соответствующий раздел "Комнаты".</span></p>\n" "<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;\"><br /></p>\n" "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:8pt;\">В случае иных вопросов по пользованию программой см. Руководство пользователя.</span></p></body></html>" ))
def openCost(self): from cost import Ui_Cost self.window = QtWidgets.QMainWindow() self.ui = Ui_Cost() self.ui.setupUi(self.window) self.window.show()
class Ui_Initial(object): def setupUi(self, MainWindow): self._frameTimer = QtCore.QTimer() self._frameTimer.start(10) self._frameTimer.timeout.connect(self.checkMainClosed) MainWindow.setObjectName("MainWindow") MainWindow.setFixedSize(654, 470) self.workoutLabel = QtWidgets.QLabel(MainWindow) self.workoutLabel.setGeometry(QtCore.QRect(120, 10, 401, 51)) self.workoutLabel.setAutoFillBackground(False) self.workoutLabel.setAlignment(QtCore.Qt.AlignCenter) self.workoutLabel.setMidLineWidth(4) self.workoutLabel.setObjectName("workoutLabel") self.startBtn = QtWidgets.QPushButton(MainWindow) self.startBtn.setGeometry(QtCore.QRect(210, 330, 211, 51)) self.startBtn.setObjectName("startBtn") self.setNumberLineEdit = QtWidgets.QLineEdit(MainWindow) self.setNumberLineEdit.setValidator(QRegExpValidator(QRegExp("[0-9]*"))) self.setNumberLineEdit.setGeometry(QtCore.QRect(220, 80, 111, 31)) self.setNumberLineEdit.setObjectName("setNumberLineEdit") self.setNumberLabel = QtWidgets.QLabel(MainWindow) self.setNumberLabel.setGeometry(QtCore.QRect(330, 80, 61, 31)) self.setNumberLabel.setAlignment(QtCore.Qt.AlignCenter) self.setNumberLabel.setObjectName("setNumberLabel") self.jumpingJacksLabel = QtWidgets.QLabel(MainWindow) self.jumpingJacksLabel.setGeometry(QtCore.QRect(170, 140, 141, 31)) self.jumpingJacksLabel.setObjectName("jumpingJacksLabel") self.jumpingJacks = QtWidgets.QComboBox(MainWindow) self.jumpingJacks.setGeometry(QtCore.QRect(330, 140, 101, 31)) self.jumpingJacks.setObjectName("jumpingJacks") self.weightCurlsLabel = QtWidgets.QLabel(MainWindow) self.weightCurlsLabel.setGeometry(QtCore.QRect(170, 240, 141, 31)) self.weightCurlsLabel.setObjectName("weightCurlsLabel") self.weightCurls = QtWidgets.QComboBox(MainWindow) self.weightCurls.setGeometry(QtCore.QRect(330, 240, 101, 31)) self.weightCurls.setObjectName("weightCurls") self.squats = QtWidgets.QComboBox(MainWindow) self.squats.setGeometry(QtCore.QRect(330, 190, 101, 31)) self.squats.setObjectName("squats") self.squatsLabel = QtWidgets.QLabel(MainWindow) self.squatsLabel.setGeometry(QtCore.QRect(170, 190, 141, 31)) self.squatsLabel.setObjectName("squatsLabel") for i in range(5, 30, 5): self.jumpingJacks.addItem(str(i)) self.squats.addItem(str(i)) self.weightCurls.addItem(str(i)) # This section is devoted to button connections self.startBtn.clicked.connect(self.startBtnAction) self.reTranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow) def startBtnAction(self): if len(self.setNumberLineEdit.text()) <= 0: _translate = QtCore.QCoreApplication.translate self.startBtn.setText(_translate("MainWindow", "Input Set Number")) else: self.mainWindow = QtWidgets.QMainWindow() self.ui = Ui_Main() # Params self.ui.setParams( self.setNumberLineEdit.text(), self.jumpingJacks.currentText(), self.squats.currentText(), self.weightCurls.currentText()) utils.tracker = utils.ExerciseTracker( int(self.setNumberLineEdit.text()), int(self.jumpingJacks.currentText()), int(self.squats.currentText()), int(self.weightCurls.currentText()), self) print("tracker created") # Ui self.ui.setupUi(self.mainWindow) # Window MainWindow.hide() self.mainWindow.show() self.bool = True def checkMainClosed(self): try: if self.mainWindow.isActiveWindow() == False and self.bool: MainWindow.show() self.bool = False except: pass def reTranslateUi(self, MainWindow): _translate = QtCore.QCoreApplication.translate MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow")) self.workoutLabel.setText(_translate("MainWindow", htmlf([("Virtual", 4), ("Workout", "ib")]))) self.startBtn.setText(_translate("MainWindow", "START")) self.setNumberLabel.setText(_translate("MainWindow", "SETS")) self.jumpingJacksLabel.setText(_translate("MainWindow", "Jumping Jacks")) self.squatsLabel.setText(_translate("MainWindow", "Squats")) self.weightCurlsLabel.setText(_translate("MainWindow", "Weight Curls"))