|
| 1 | +# Form implementation generated from reading ui file 'ui.ui' |
| 2 | +# |
| 3 | +# Created by: PyQt6 UI code generator 6.4.2 |
| 4 | +# |
| 5 | +# WARNING: Any manual changes made to this file will be lost when pyuic6 is |
| 6 | +# run again. Do not edit this file unless you know what you are doing. |
| 7 | + |
| 8 | + |
| 9 | +from PyQt6 import QtCore, QtGui, QtWidgets |
| 10 | +from PyQt6.QtGui import QPixmap, QFont, QFontDatabase, QIcon |
| 11 | + |
| 12 | + |
| 13 | +class Ui_MainWindow(object): |
| 14 | + def setupUi(self, MainWindow): |
| 15 | + MainWindow.setObjectName("MainWindow") |
| 16 | + MainWindow.resize(608, 504) |
| 17 | + MainWindow.setWindowIcon(QIcon('resource/clean.png')) |
| 18 | + |
| 19 | + # 加载字体文件 |
| 20 | + font_id = QFontDatabase.addApplicationFont("font/DingTalk_JinBuTi_Regular.ttf") |
| 21 | + # 获取字体家族名称 |
| 22 | + font_families = QFontDatabase.applicationFontFamilies(font_id) |
| 23 | + font_family = font_families[0] |
| 24 | + # 创建字体对象 |
| 25 | + self.font = QFont(font_family) |
| 26 | + |
| 27 | + # 加载字体文件 |
| 28 | + font_id1 = QFontDatabase.addApplicationFont("font/pmzd.ttf") |
| 29 | + # 获取字体家族名称 |
| 30 | + font_families1 = QFontDatabase.applicationFontFamilies(font_id1) |
| 31 | + font_family1 = font_families1[0] |
| 32 | + # 创建字体对象 |
| 33 | + self.font1 = QFont(font_family1) |
| 34 | + |
| 35 | + self.centralwidget = QtWidgets.QWidget(parent=MainWindow) |
| 36 | + self.centralwidget.setObjectName("centralwidget") |
| 37 | + self.label = QtWidgets.QLabel(parent=self.centralwidget) |
| 38 | + self.label.setGeometry(QtCore.QRect(60, 50, 321, 341)) |
| 39 | + self.label.setStyleSheet("background-color:rgba(255, 255, 255, 240);\n" |
| 40 | +"border-radius:30px;") |
| 41 | + self.label.setText("") |
| 42 | + self.label.setObjectName("label") |
| 43 | + self.pushButton = QtWidgets.QPushButton(parent=self.centralwidget) |
| 44 | + self.pushButton.setGeometry(QtCore.QRect(90, 126, 260, 90)) |
| 45 | + font = QtGui.QFont(self.font1) |
| 46 | + font.setPointSize(33) |
| 47 | + self.pushButton.setFont(font) |
| 48 | + self.pushButton.setStyleSheet("QPushButton{\n" |
| 49 | +" background-color:rgba(0,0,0,13);\n" |
| 50 | +" color:rgb(0, 0, 0);\n" |
| 51 | +" border-radius:13px;\n" |
| 52 | +"}\n" |
| 53 | +"QPushButton:hover{\n" |
| 54 | +" background-color:rgb(170, 170, 255);\n" |
| 55 | +"}") |
| 56 | + icon = QtGui.QIcon() |
| 57 | + icon.addPixmap(QtGui.QPixmap("resource/booster.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off) |
| 58 | + self.pushButton.setIcon(icon) |
| 59 | + self.pushButton.setIconSize(QtCore.QSize(66, 66)) |
| 60 | + self.pushButton.setObjectName("pushButton") |
| 61 | + self.pushButton_2 = QtWidgets.QPushButton(parent=self.centralwidget) |
| 62 | + self.pushButton_2.setGeometry(QtCore.QRect(90, 230, 260, 90)) |
| 63 | + font = QtGui.QFont(self.font1) |
| 64 | + font.setPointSize(33) |
| 65 | + self.pushButton_2.setFont(font) |
| 66 | + self.pushButton_2.setStyleSheet("QPushButton{\n" |
| 67 | +" background-color:rgba(0,0,0,13);\n" |
| 68 | +" color:rgb(0, 0, 0);\n" |
| 69 | +" border-radius:13px;\n" |
| 70 | +"}\n" |
| 71 | +"QPushButton:hover{\n" |
| 72 | +" background-color:rgb(170, 170, 255);\n" |
| 73 | +"}") |
| 74 | + icon1 = QtGui.QIcon() |
| 75 | + icon1.addPixmap(QtGui.QPixmap("resource/clean.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off) |
| 76 | + self.pushButton_2.setIcon(icon1) |
| 77 | + self.pushButton_2.setIconSize(QtCore.QSize(66, 66)) |
| 78 | + self.pushButton_2.setObjectName("pushButton_2") |
| 79 | + self.label_3 = QtWidgets.QLabel(parent=self.centralwidget) |
| 80 | + self.label_3.setGeometry(QtCore.QRect(90, 340, 261, 41)) |
| 81 | + font = QtGui.QFont() |
| 82 | + font.setBold(True) |
| 83 | + self.label_3.setFont(font) |
| 84 | + self.label_3.setObjectName("label_3") |
| 85 | + self.layoutWidget = QtWidgets.QWidget(parent=self.centralwidget) |
| 86 | + self.layoutWidget.setGeometry(QtCore.QRect(90, 70, 261, 35)) |
| 87 | + self.layoutWidget.setObjectName("layoutWidget") |
| 88 | + self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.layoutWidget) |
| 89 | + self.horizontalLayout_2.setContentsMargins(0, 0, 0, 0) |
| 90 | + self.horizontalLayout_2.setObjectName("horizontalLayout_2") |
| 91 | + self.label_2 = QtWidgets.QLabel(parent=self.layoutWidget) |
| 92 | + font = QtGui.QFont(self.font) |
| 93 | + font.setPointSize(16) |
| 94 | + self.label_2.setFont(font) |
| 95 | + self.label_2.setObjectName("label_2") |
| 96 | + self.horizontalLayout_2.addWidget(self.label_2) |
| 97 | + self.horizontalLayout = QtWidgets.QHBoxLayout() |
| 98 | + self.horizontalLayout.setObjectName("horizontalLayout") |
| 99 | + spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) |
| 100 | + self.horizontalLayout.addItem(spacerItem) |
| 101 | + self.hidewindow = QtWidgets.QPushButton(parent=self.layoutWidget) |
| 102 | + self.hidewindow.setMinimumSize(QtCore.QSize(31, 31)) |
| 103 | + self.hidewindow.setMaximumSize(QtCore.QSize(31, 31)) |
| 104 | + font = QtGui.QFont() |
| 105 | + font.setPointSize(30) |
| 106 | + font.setBold(False) |
| 107 | + self.hidewindow.setFont(font) |
| 108 | + self.hidewindow.setStyleSheet("QPushButton{\n" |
| 109 | +" background-color:rgba(0,0,0,6);\n" |
| 110 | +" color:rgb(0, 0, 0);\n" |
| 111 | +" border-radius:5px;\n" |
| 112 | +"}\n" |
| 113 | +"QPushButton:hover{\n" |
| 114 | +" background-color:rgb(170, 170, 255);\n" |
| 115 | +"}") |
| 116 | + self.hidewindow.setObjectName("hidewindow") |
| 117 | + self.horizontalLayout.addWidget(self.hidewindow) |
| 118 | + self.quit = QtWidgets.QPushButton(parent=self.layoutWidget) |
| 119 | + self.quit.setMinimumSize(QtCore.QSize(31, 31)) |
| 120 | + self.quit.setMaximumSize(QtCore.QSize(31, 31)) |
| 121 | + font = QtGui.QFont() |
| 122 | + font.setPointSize(15) |
| 123 | + font.setBold(True) |
| 124 | + self.quit.setFont(font) |
| 125 | + self.quit.setStyleSheet("QPushButton{\n" |
| 126 | +" background-color:rgba(0,0,0,6);\n" |
| 127 | +" color:rgb(0, 0, 0);\n" |
| 128 | +" border-radius:5px;\n" |
| 129 | +"}\n" |
| 130 | +"QPushButton:hover{\n" |
| 131 | +" background-color:rgb(255, 0, 0);\n" |
| 132 | +"}") |
| 133 | + self.quit.setObjectName("quit") |
| 134 | + self.horizontalLayout.addWidget(self.quit) |
| 135 | + self.horizontalLayout_2.addLayout(self.horizontalLayout) |
| 136 | + MainWindow.setCentralWidget(self.centralwidget) |
| 137 | + self.menubar = QtWidgets.QMenuBar(parent=MainWindow) |
| 138 | + self.menubar.setGeometry(QtCore.QRect(0, 0, 608, 22)) |
| 139 | + self.menubar.setObjectName("menubar") |
| 140 | + MainWindow.setMenuBar(self.menubar) |
| 141 | + self.statusbar = QtWidgets.QStatusBar(parent=MainWindow) |
| 142 | + self.statusbar.setSizeGripEnabled(False) |
| 143 | + self.statusbar.setObjectName("statusbar") |
| 144 | + MainWindow.setStatusBar(self.statusbar) |
| 145 | + |
| 146 | + self.retranslateUi(MainWindow) |
| 147 | + self.quit.clicked.connect(MainWindow.close) # type: ignore |
| 148 | + self.hidewindow.clicked.connect(MainWindow.showMinimized) # type: ignore |
| 149 | + QtCore.QMetaObject.connectSlotsByName(MainWindow) |
| 150 | + |
| 151 | + def retranslateUi(self, MainWindow): |
| 152 | + _translate = QtCore.QCoreApplication.translate |
| 153 | + MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow")) |
| 154 | + self.pushButton.setText(_translate("MainWindow", "优化加速")) |
| 155 | + self.pushButton_2.setText(_translate("MainWindow", "深度清理")) |
| 156 | + self.label_3.setText(_translate("MainWindow", "Developed By DaYe\n" |
| 157 | +"https://dyblog.netlify.app/")) |
| 158 | + self.label_2.setText(_translate("MainWindow", "WindowsCleaner")) |
| 159 | + self.hidewindow.setText(_translate("MainWindow", "-")) |
| 160 | + self.quit.setText(_translate("MainWindow", "X")) |
0 commit comments