решение задания 7

This commit is contained in:
2023-01-30 21:54:17 +07:00
parent 11fd0dbce9
commit 799477de9e
4 changed files with 21 additions and 4 deletions
-4
View File
@@ -1,4 +0,0 @@
def get_a_useless_value(envelope):
l, b = envelope["lowerCorner"].split(" ")
r, t = envelope["upperCorner"].split(" ")
return [str(abs(float(l) - float(r)) / 2.0), str(abs(float(t) - float(b)) / 2.0)]
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 369 KiB

After

Width:  |  Height:  |  Size: 646 KiB

+5
View File
@@ -26,6 +26,7 @@ class Window(QMainWindow):
self.button_group.addButton(self.skl) self.button_group.addButton(self.skl)
self.button_group.buttonClicked.connect(self.push_button) self.button_group.buttonClicked.connect(self.push_button)
self.find.clicked.connect(self.search_organization) self.find.clicked.connect(self.search_organization)
self.drop.clicked.connect(self.drop_find)
def keyPressEvent(self, event): def keyPressEvent(self, event):
try: try:
@@ -70,6 +71,10 @@ class Window(QMainWindow):
self.org_point, self.lon, self.lat = search_organization_pos(self.plainTextEdit.toPlainText()) self.org_point, self.lon, self.lat = search_organization_pos(self.plainTextEdit.toPlainText())
self.update() self.update()
def drop_find(self):
self.org_point = "0.0,0.0"
self.update()
App = QApplication(sys.argv) App = QApplication(sys.argv)
window = Window() window = Window()
+16
View File
@@ -89,6 +89,22 @@
</rect> </rect>
</property> </property>
</widget> </widget>
<widget class="QPushButton" name="drop">
<property name="geometry">
<rect>
<x>610</x>
<y>160</y>
<width>191</width>
<height>71</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">font: 9pt &quot;Cantarell&quot;;</string>
</property>
<property name="text">
<string>Сброс поискового результата</string>
</property>
</widget>
</widget> </widget>
<widget class="QMenuBar" name="menubar"> <widget class="QMenuBar" name="menubar">
<property name="geometry"> <property name="geometry">