-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui.py
174 lines (168 loc) · 8.6 KB
/
ui.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
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow) -> None:
MainWindow.setObjectName("MainWindow")
MainWindow.setEnabled(True)
MainWindow.resize(900, 600)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.background_lab = QtWidgets.QLabel(self.centralwidget)
self.background_lab.setGeometry(QtCore.QRect(0, 0, 900, 600))
self.background_lab.setLayoutDirection(QtCore.Qt.LeftToRight)
self.background_lab.setAutoFillBackground(False)
self.background_lab.setFrameShape(QtWidgets.QFrame.NoFrame)
self.background_lab.setFrameShadow(QtWidgets.QFrame.Plain)
self.background_lab.setLineWidth(0)
self.background_lab.setText("")
self.background_lab.setTextFormat(QtCore.Qt.AutoText)
pixmap_bg = QtGui.QPixmap(r"src\resources\nyuton.jpg")
self.background_lab.setPixmap((pixmap_bg))
self.background_lab.setScaledContents(True)
self.background_lab.setAlignment(QtCore.Qt.AlignCenter)
self.background_lab.setIndent(0)
self.background_lab.setObjectName("background_lab")
self.caption_lab = QtWidgets.QLabel(self.centralwidget)
self.caption_lab.setGeometry(QtCore.QRect(10, 10, 340, 40))
font = QtGui.QFont()
font.setPointSize(16)
self.caption_lab.setFont(font)
self.caption_lab.setStyleSheet("color: rgb(255, 255, 255)")
self.caption_lab.setScaledContents(False)
self.caption_lab.setObjectName("caption_lab")
self.variant_lab = QtWidgets.QLabel(self.centralwidget)
self.variant_lab.setGeometry(QtCore.QRect(10, 60, 270, 30))
font = QtGui.QFont()
font.setPointSize(16)
self.variant_lab.setFont(font)
self.variant_lab.setStyleSheet("color: rgb(255, 255, 255)")
self.variant_lab.setScaledContents(False)
self.variant_lab.setObjectName("variant_lab")
self.completed_lab = QtWidgets.QLabel(self.centralwidget)
self.completed_lab.setGeometry(QtCore.QRect(10, 100, 400, 30))
font = QtGui.QFont()
font.setPointSize(16)
self.completed_lab.setFont(font)
self.completed_lab.setStyleSheet("color: rgb(255, 255, 255)")
self.completed_lab.setScaledContents(False)
self.completed_lab.setObjectName("completed_lab")
self.group_lab = QtWidgets.QLabel(self.centralwidget)
self.group_lab.setGeometry(QtCore.QRect(10, 150, 400, 30))
font = QtGui.QFont()
font.setPointSize(16)
self.group_lab.setFont(font)
self.group_lab.setStyleSheet("color: rgb(255, 255, 255)")
self.group_lab.setScaledContents(False)
self.group_lab.setObjectName("group_lab")
self.fio_lab = QtWidgets.QLabel(self.centralwidget)
self.fio_lab.setGeometry(QtCore.QRect(10, 200, 200, 30))
font = QtGui.QFont()
font.setPointSize(16)
self.fio_lab.setFont(font)
self.fio_lab.setStyleSheet("color: rgb(255, 255, 255)")
self.fio_lab.setScaledContents(False)
self.fio_lab.setObjectName("fio_lab")
self.enter_lab = QtWidgets.QLabel(self.centralwidget)
self.enter_lab.setGeometry(QtCore.QRect(550, 20, 900, 40))
font = QtGui.QFont()
font.setPointSize(16)
self.enter_lab.setFont(font)
self.enter_lab.setStyleSheet("color: rgb(255, 255, 255)")
self.enter_lab.setScaledContents(False)
self.enter_lab.setObjectName("enter_lab")
self.c_lab = QtWidgets.QLabel(self.centralwidget)
self.c_lab.setGeometry(QtCore.QRect(550, 60, 600, 40))
font = QtGui.QFont()
font.setPointSize(16)
self.c_lab.setFont(font)
self.c_lab.setStyleSheet("color: rgb(255, 255, 255)")
self.c_lab.setScaledContents(False)
self.c_lab.setObjectName("c_lab")
self.plus_lab = QtWidgets.QLabel(self.centralwidget)
self.plus_lab.setGeometry(QtCore.QRect(680, 70, 30, 30))
font = QtGui.QFont()
font.setPointSize(16)
self.plus_lab.setFont(font)
self.plus_lab.setStyleSheet("color: rgb(255, 255, 255);")
self.plus_lab.setScaledContents(False)
self.plus_lab.setObjectName("plus_lab")
self.real_edit = QtWidgets.QLineEdit(self.centralwidget)
self.real_edit.setGeometry(QtCore.QRect(620, 70, 50, 30))
self.real_edit.setText("1")
self.real_edit.setObjectName("real_edit")
self.image_edit = QtWidgets.QLineEdit(self.centralwidget)
self.image_edit.setGeometry(QtCore.QRect(720, 70, 50, 30))
self.image_edit.setText("0")
self.image_edit.setObjectName("image_edit")
self.i_lab = QtWidgets.QLabel(self.centralwidget)
self.i_lab.setGeometry(QtCore.QRect(755, 70, 50, 30))
font = QtGui.QFont()
font.setPointSize(16)
self.i_lab.setFont(font)
self.i_lab.setStyleSheet("color: rgb(255, 255, 255)")
self.i_lab.setScaledContents(False)
self.i_lab.setAlignment(QtCore.Qt.AlignCenter)
self.i_lab.setObjectName("i_lab")
self.r_lab = QtWidgets.QLabel(self.centralwidget)
self.r_lab.setGeometry(QtCore.QRect(550, 150, 50, 30))
font = QtGui.QFont()
font.setPointSize(16)
self.r_lab.setFont(font)
self.r_lab.setStyleSheet("color: rgb(255, 255, 255)")
self.r_lab.setScaledContents(False)
self.r_lab.setObjectName("r_lab")
self.r_edit = QtWidgets.QLineEdit(self.centralwidget)
self.r_edit.setGeometry(QtCore.QRect(620, 150, 100, 30))
self.r_edit.setText("0.00001")
self.r_edit.setObjectName("r_edit")
self.buld_fractal_btn = QtWidgets.QPushButton(self.centralwidget)
self.buld_fractal_btn.setGeometry(QtCore.QRect(0, 400, 900, 200))
font = QtGui.QFont()
font.setPointSize(22)
self.buld_fractal_btn.setFont(font)
self.buld_fractal_btn.setAutoDefault(True)
self.buld_fractal_btn.setDefault(False)
self.buld_fractal_btn.setFlat(True)
self.buld_fractal_btn.setObjectName("buld_fractal_btn")
self.buld_fractal_btn.setStyleSheet("color: rgb(255, 255, 255)")
self.r_lab_2 = QtWidgets.QLabel(self.centralwidget)
self.r_lab_2.setGeometry(QtCore.QRect(550, 220, 300, 40))
font = QtGui.QFont()
font.setPointSize(16)
self.r_lab_2.setFont(font)
self.r_lab_2.setStyleSheet("color: rgb(255, 255, 255)")
self.r_lab_2.setScaledContents(False)
self.r_lab_2.setObjectName("r_lab_2")
self.doubleSpinBox = QtWidgets.QDoubleSpinBox(self.centralwidget)
self.doubleSpinBox.setGeometry(QtCore.QRect(580, 280, 150, 40))
font = QtGui.QFont()
font.setPointSize(12)
self.doubleSpinBox.setFont(font)
self.doubleSpinBox.setSingleStep(0.125)
self.doubleSpinBox.setDecimals(5)
self.doubleSpinBox.setProperty("value", 1.0)
self.doubleSpinBox.setObjectName("doubleSpinBox")
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtWidgets.QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 510, 18))
self.menubar.setObjectName("menubar")
MainWindow.setMenuBar(self.menubar)
self.statusbar = QtWidgets.QStatusBar(MainWindow)
self.statusbar.setObjectName("statusbar")
MainWindow.setStatusBar(self.statusbar)
self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "Бассейны Ньютона"))
self.caption_lab.setText(_translate("MainWindow", "Бассейны Ньютона - 3"))
self.variant_lab.setText(_translate("MainWindow", "Вариант №16."))
self.completed_lab.setText(_translate("MainWindow", "Выполнил: студент"))
self.group_lab.setText(_translate("MainWindow", "группы ПМИ-22 БО"))
self.fio_lab.setText(_translate("MainWindow", "Шубин В.С"))
self.enter_lab.setText(_translate("MainWindow", "Введите параметры:"))
self.c_lab.setText(_translate("MainWindow", "C = "))
self.plus_lab.setText(_translate("MainWindow", "+"))
self.i_lab.setText(_translate("MainWindow", "i"))
self.r_lab.setText(_translate("MainWindow", "R = "))
self.buld_fractal_btn.setText(_translate("MainWindow", "Построить фрактал!"))
self.r_lab_2.setText(_translate("MainWindow", "Масштабирование:"))