-
Notifications
You must be signed in to change notification settings - Fork 1
/
design.py
181 lines (174 loc) · 11.1 KB
/
design.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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'design.ui'
#
# Created by: PyQt5 UI code generator 5.13.0
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.setEnabled(True)
MainWindow.resize(382, 552)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.centralwidget)
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.label = QtWidgets.QLabel(self.centralwidget)
self.label.setObjectName("label")
self.verticalLayout_2.addWidget(self.label, 0, QtCore.Qt.AlignHCenter)
self.line = QtWidgets.QFrame(self.centralwidget)
self.line.setFrameShape(QtWidgets.QFrame.HLine)
self.line.setFrameShadow(QtWidgets.QFrame.Sunken)
self.line.setObjectName("line")
self.verticalLayout_2.addWidget(self.line)
self.label_2 = QtWidgets.QLabel(self.centralwidget)
self.label_2.setObjectName("label_2")
self.verticalLayout_2.addWidget(self.label_2)
self.horizontalLayout = QtWidgets.QHBoxLayout()
self.horizontalLayout.setObjectName("horizontalLayout")
self.imgPath_field = QtWidgets.QLineEdit(self.centralwidget)
self.imgPath_field.setObjectName("imgPath_field")
self.horizontalLayout.addWidget(self.imgPath_field)
self.selectImgPath_button = QtWidgets.QPushButton(self.centralwidget)
self.selectImgPath_button.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
self.selectImgPath_button.setObjectName("selectImgPath_button")
self.horizontalLayout.addWidget(self.selectImgPath_button)
self.verticalLayout_2.addLayout(self.horizontalLayout)
self.aboutImgPath_label = QtWidgets.QLabel(self.centralwidget)
self.aboutImgPath_label.setText("")
self.aboutImgPath_label.setObjectName("aboutImgPath_label")
self.verticalLayout_2.addWidget(self.aboutImgPath_label)
self.label_3 = QtWidgets.QLabel(self.centralwidget)
self.label_3.setObjectName("label_3")
self.verticalLayout_2.addWidget(self.label_3)
self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.desktopPath_field = QtWidgets.QLineEdit(self.centralwidget)
self.desktopPath_field.setText("")
self.desktopPath_field.setObjectName("desktopPath_field")
self.horizontalLayout_2.addWidget(self.desktopPath_field)
self.selectDesktopPath_button = QtWidgets.QPushButton(self.centralwidget)
self.selectDesktopPath_button.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
self.selectDesktopPath_button.setObjectName("selectDesktopPath_button")
self.horizontalLayout_2.addWidget(self.selectDesktopPath_button)
self.verticalLayout_2.addLayout(self.horizontalLayout_2)
self.aboutDesktopPath_label = QtWidgets.QLabel(self.centralwidget)
self.aboutDesktopPath_label.setText("")
self.aboutDesktopPath_label.setObjectName("aboutDesktopPath_label")
self.verticalLayout_2.addWidget(self.aboutDesktopPath_label)
self.label_8 = QtWidgets.QLabel(self.centralwidget)
self.label_8.setObjectName("label_8")
self.verticalLayout_2.addWidget(self.label_8)
self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
self.verticalLayout = QtWidgets.QVBoxLayout()
self.verticalLayout.setContentsMargins(-1, -1, -1, 45)
self.verticalLayout.setObjectName("verticalLayout")
self.label_4 = QtWidgets.QLabel(self.centralwidget)
self.label_4.setObjectName("label_4")
self.verticalLayout.addWidget(self.label_4)
self.iconSize_field = QtWidgets.QSpinBox(self.centralwidget)
self.iconSize_field.setMinimum(1)
self.iconSize_field.setObjectName("iconSize_field")
self.verticalLayout.addWidget(self.iconSize_field)
self.horizontalLayout_3.addLayout(self.verticalLayout)
spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred)
self.horizontalLayout_3.addItem(spacerItem)
self.line_2 = QtWidgets.QFrame(self.centralwidget)
self.line_2.setFrameShape(QtWidgets.QFrame.VLine)
self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken)
self.line_2.setObjectName("line_2")
self.horizontalLayout_3.addWidget(self.line_2)
spacerItem1 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred)
self.horizontalLayout_3.addItem(spacerItem1)
self.verticalLayout_3 = QtWidgets.QVBoxLayout()
self.verticalLayout_3.setObjectName("verticalLayout_3")
self.label_5 = QtWidgets.QLabel(self.centralwidget)
self.label_5.setObjectName("label_5")
self.verticalLayout_3.addWidget(self.label_5)
self.label_7 = QtWidgets.QLabel(self.centralwidget)
self.label_7.setObjectName("label_7")
self.verticalLayout_3.addWidget(self.label_7)
self.cellX_field = QtWidgets.QSpinBox(self.centralwidget)
self.cellX_field.setMinimum(1)
self.cellX_field.setObjectName("cellX_field")
self.verticalLayout_3.addWidget(self.cellX_field)
self.label_6 = QtWidgets.QLabel(self.centralwidget)
self.label_6.setObjectName("label_6")
self.verticalLayout_3.addWidget(self.label_6)
self.cellY_field = QtWidgets.QSpinBox(self.centralwidget)
self.cellY_field.setMinimum(1)
self.cellY_field.setObjectName("cellY_field")
self.verticalLayout_3.addWidget(self.cellY_field)
self.horizontalLayout_3.addLayout(self.verticalLayout_3)
self.verticalLayout_2.addLayout(self.horizontalLayout_3)
self.calculate_button = QtWidgets.QPushButton(self.centralwidget)
self.calculate_button.setMaximumSize(QtCore.QSize(200, 16777215))
self.calculate_button.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
self.calculate_button.setObjectName("calculate_button")
self.verticalLayout_2.addWidget(self.calculate_button, 0, QtCore.Qt.AlignHCenter)
self.line_3 = QtWidgets.QFrame(self.centralwidget)
self.line_3.setFrameShape(QtWidgets.QFrame.HLine)
self.line_3.setFrameShadow(QtWidgets.QFrame.Sunken)
self.line_3.setObjectName("line_3")
self.verticalLayout_2.addWidget(self.line_3)
self.textBrowser = QtWidgets.QTextBrowser(self.centralwidget)
self.textBrowser.setEnabled(True)
self.textBrowser.setTextInteractionFlags(QtCore.Qt.NoTextInteraction)
self.textBrowser.setObjectName("textBrowser")
self.verticalLayout_2.addWidget(self.textBrowser)
self.progressBar = QtWidgets.QProgressBar(self.centralwidget)
self.progressBar.setObjectName("progressBar")
self.verticalLayout_2.addWidget(self.progressBar)
self.horizontalLayout_4 = QtWidgets.QHBoxLayout()
self.horizontalLayout_4.setObjectName("horizontalLayout_4")
self.createPuzzle_button = QtWidgets.QPushButton(self.centralwidget)
self.createPuzzle_button.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
self.createPuzzle_button.setObjectName("createPuzzle_button")
self.horizontalLayout_4.addWidget(self.createPuzzle_button)
spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred)
self.horizontalLayout_4.addItem(spacerItem2)
self.clearParams_button = QtWidgets.QPushButton(self.centralwidget)
self.clearParams_button.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
self.clearParams_button.setObjectName("clearParams_button")
self.horizontalLayout_4.addWidget(self.clearParams_button)
spacerItem3 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred)
self.horizontalLayout_4.addItem(spacerItem3)
self.delPrevPuzzle_button = QtWidgets.QPushButton(self.centralwidget)
self.delPrevPuzzle_button.setObjectName("delPrevPuzzle_button")
self.horizontalLayout_4.addWidget(self.delPrevPuzzle_button)
self.verticalLayout_2.addLayout(self.horizontalLayout_4)
self.label.raise_()
self.line.raise_()
self.label_3.raise_()
self.label_8.raise_()
self.line_3.raise_()
self.label_2.raise_()
self.calculate_button.raise_()
self.aboutImgPath_label.raise_()
self.aboutDesktopPath_label.raise_()
self.progressBar.raise_()
self.textBrowser.raise_()
MainWindow.setCentralWidget(self.centralwidget)
self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "Создание мозаики"))
self.label.setText(_translate("MainWindow", "<html><head/><body><p align=\"center\">Эта программа создаёт мозаику папок с иконками, составленными из <br>вашей картинки. Вам остаётся лишь собрать получившийся пазл.</p></body></html>"))
self.label_2.setText(_translate("MainWindow", "Выберите путь к картинке:"))
self.selectImgPath_button.setText(_translate("MainWindow", "Выбрать"))
self.label_3.setText(_translate("MainWindow", "Выберите путь к рабочему столу пользователя (если указан неверно):"))
self.selectDesktopPath_button.setText(_translate("MainWindow", "Выбрать"))
self.label_8.setText(_translate("MainWindow", "Заполните поля на одной из сторон:"))
self.label_4.setText(_translate("MainWindow", "Ввод размера иконки:"))
self.label_5.setText(_translate("MainWindow", "Ввод размера мозаики:"))
self.label_7.setText(_translate("MainWindow", "Ширина:"))
self.label_6.setText(_translate("MainWindow", "Высота:"))
self.calculate_button.setText(_translate("MainWindow", "Расcчитать"))
self.progressBar.setFormat(_translate("MainWindow", "%v/%m[%p%]"))
self.createPuzzle_button.setText(_translate("MainWindow", "Создать мозаику"))
self.clearParams_button.setText(_translate("MainWindow", "Сбросить значения"))
self.delPrevPuzzle_button.setToolTip(_translate("MainWindow", "Не работает, так как фунционал этой кнопки не реализован"))
self.delPrevPuzzle_button.setText(_translate("MainWindow", "Удалить мозаику"))