-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtask_box.py
More file actions
38 lines (29 loc) · 1.23 KB
/
task_box.py
File metadata and controls
38 lines (29 loc) · 1.23 KB
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
import sys
from PyQt5.QtWidgets import QApplication, QMainWindow
from tasks import messbox, get_picture, cheak
class MyWidget(QMainWindow, messbox.Ui_MainWindow):
def __init__(self):
super().__init__()
self.setupUi(self)
self.pushButton.clicked.connect(self.run)
def run(self):
hight = self.lineEdit_3.text()
wight = self.lineEdit_4.text()
k1 = cheak.cheak_num(hight, wight)
k2, type = cheak.cheak_map(self.radioButton.isChecked(), self.radioButton_2.isChecked(),
self.radioButton_3.isChecked())
if k1 == 1 and k2 == 1:
self.close()
get_picture.get_picture(float(hight), float(wight), 10, type)
elif k1 == 0 and k2 == 1:
self.label.setText("Ведите правельные координаты")
elif k1 == 1 and k2 == 0:
self.label_2.setText("Выбирите вид карты")
else:
self.label.setText("Ведите правельные координаты")
self.label_2.setText("Выбирите вид карты")
if __name__ == '__main__':
app = QApplication(sys.argv)
ex = MyWidget()
ex.show()
sys.exit(app.exec_())