-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathkid.py
125 lines (117 loc) · 8.27 KB
/
kid.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'kid.ui'
#
# Created by: PyQt5 UI code generator 5.12
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
class Ui_Dialog(object):
def setupUi(self, Dialog):
Dialog.setObjectName("Dialog")
Dialog.resize(981, 794)
palette = QtGui.QPalette()
brush = QtGui.QBrush(QtGui.QColor(135, 206, 250))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Button, brush)
brush = QtGui.QBrush(QtGui.QColor(135, 206, 250))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush)
brush = QtGui.QBrush(QtGui.QColor(135, 206, 250))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Window, brush)
brush = QtGui.QBrush(QtGui.QColor(135, 206, 250))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Button, brush)
brush = QtGui.QBrush(QtGui.QColor(135, 206, 250))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush)
brush = QtGui.QBrush(QtGui.QColor(135, 206, 250))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush)
brush = QtGui.QBrush(QtGui.QColor(135, 206, 250))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Button, brush)
brush = QtGui.QBrush(QtGui.QColor(135, 206, 250))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush)
brush = QtGui.QBrush(QtGui.QColor(135, 206, 250))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush)
Dialog.setPalette(palette)
Dialog.setStyleSheet("QDialog{background-color:rgb( 135,206,250);}")
self.label = QtWidgets.QLabel(Dialog)
self.label.setGeometry(QtCore.QRect(140, 20, 721, 111))
palette = QtGui.QPalette()
brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Text, brush)
brush = QtGui.QBrush(QtGui.QColor(0, 0, 0, 128))
brush.setStyle(QtCore.Qt.NoBrush)
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.Inactive, QtGui.QPalette.Text, brush)
brush = QtGui.QBrush(QtGui.QColor(0, 0, 0, 128))
brush.setStyle(QtCore.Qt.NoBrush)
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Text, 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(0, 0, 0, 128))
brush.setStyle(QtCore.Qt.NoBrush)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Text, brush)
self.label.setPalette(palette)
font = QtGui.QFont()
font.setFamily("Arial")
font.setPointSize(28)
font.setBold(True)
font.setWeight(75)
self.label.setFont(font)
self.label.setCursor(QtGui.QCursor(QtCore.Qt.UpArrowCursor))
self.label.setObjectName("label")
self.label_2 = QtWidgets.QLabel(Dialog)
self.label_2.setGeometry(QtCore.QRect(230, 130, 731, 591))
self.label_2.setObjectName("label_2")
self.label_3 = QtWidgets.QLabel(Dialog)
self.label_3.setGeometry(QtCore.QRect(0, 130, 211, 371))
self.label_3.setObjectName("label_3")
self.label_3.setPixmap(QPixmap("img/可回收垃圾.jpg"))
self.label_3.setScaledContents(True)
self.pushButton = QtWidgets.QPushButton(Dialog)
self.pushButton.setGeometry(QtCore.QRect(20, 60, 111, 51))
self.pushButton.setMinimumSize(QtCore.QSize(111, 51))
font = QtGui.QFont()
font.setFamily("Agency FB")
font.setPointSize(11)
font.setBold(False)
font.setWeight(50)
self.pushButton.setFont(font)
self.pushButton.setLayoutDirection(QtCore.Qt.RightToLeft)
self.pushButton.setStyleSheet("QPushButton{background:#e6f0fa;border:2px groove gray;border-radius:10px;padding:2px 4px} QPushButton:hover { background-color: rgb(30,144,255); }")
self.pushButton.setIconSize(QtCore.QSize(30, 30))
self.pushButton.setObjectName("pushButton")
self.pushButton_2 = QtWidgets.QPushButton(Dialog)
self.pushButton_2.setGeometry(QtCore.QRect(20, 10, 111, 51))
self.pushButton_2.setMinimumSize(QtCore.QSize(111, 51))
font = QtGui.QFont()
font.setFamily("Agency FB")
font.setPointSize(11)
font.setBold(False)
font.setWeight(50)
self.pushButton_2.setFont(font)
self.pushButton_2.setLayoutDirection(QtCore.Qt.RightToLeft)
self.pushButton_2.setStyleSheet("QPushButton{background:#e6f0fa;border:2px groove gray;border-radius:10px;padding:2px 4px} QPushButton:hover { background-color: rgb(30,144,255); }")
self.pushButton_2.setIconSize(QtCore.QSize(30, 30))
self.pushButton_2.setObjectName("pushButton_2")
self.retranslateUi(Dialog)
QtCore.QMetaObject.connectSlotsByName(Dialog)
def retranslateUi(self, Dialog):
_translate = QtCore.QCoreApplication.translate
Dialog.setWindowTitle(_translate("Dialog", "垃圾种类科普"))
self.label.setText(_translate("Dialog", "<html><head/><body><p align=\"center\"><span style=\" font-size:36pt; color:#428663;\">可回收垃圾介绍</span></p></body></html>"))
self.label_2.setText(_translate("Dialog", "<html><head/><body><p><span style=\" font-size:12pt; font-weight:600;\">可回收物主要包括废纸、塑料、玻璃、金属和布料五大类。</span></p><p><span style=\" font-size:12pt; font-weight:600;\">1. 废纸:主要包括报纸、期刊、图书、各种包装纸等。但是,要注意</span></p><p><span style=\" font-size:12pt; font-weight:600;\">纸巾和厕所纸由于水溶性太强不可回收。</span></p><p><span style=\" font-size:12pt; font-weight:600;\">2. 塑料:各种塑料袋、塑料泡沫、塑料包装(快递包装纸是其他垃圾/</span></p><p><span style=\" font-size:12pt; font-weight:600;\">干垃圾)、一次性塑料餐盒餐具、硬塑料、塑料牙刷、塑料杯子、矿</span></p><p><span style=\" font-size:12pt; font-weight:600;\">泉水瓶等。</span></p><p><span style=\" font-size:12pt; font-weight:600;\">3. 玻璃:主要包括各种玻璃瓶、碎玻璃片、暖瓶等。(镜子是其他垃</span></p><p><span style=\" font-size:12pt; font-weight:600;\">圾/干垃圾)</span></p><p><span style=\" font-size:12pt; font-weight:600;\">4. 金属物:主要包括易拉罐、罐头盒等。</span></p><p><span style=\" font-size:12pt; font-weight:600;\">5. 布料:主要包括废弃衣服、桌布、洗脸巾、书包、鞋等。</span></p><p><span style=\" font-size:12pt;\"><br/></span></p><p><span style=\" font-size:12pt; font-weight:600;\">这些垃圾通过综合处理回收利用,可以减少污染,节省资源。如每回</span></p><p><span style=\" font-size:12pt; font-weight:600;\">收1吨废纸可造好纸850公斤,节省木材300公斤,比等量生产减少污</span></p><p><span style=\" font-size:12pt; font-weight:600;\">染74%;每回收1吨塑料饮料瓶可获得0.7吨二级原料;每回收1吨废钢</span></p><p><span style=\" font-size:12pt; font-weight:600;\">铁可炼好钢0.9吨,比用矿石冶炼节约成本47%,减少空气污染75%,</span></p><p><span style=\" font-size:12pt; font-weight:600;\">减少97%的水污染和固体废物。</span></p></body></html>"))
self.label_3.setText(_translate("Dialog", "TextLabel"))
self.pushButton.setText(_translate("Dialog", "干垃圾"))
self.pushButton_2.setText(_translate("Dialog", "可回收垃圾"))