Guest User

Untitled

a guest
Nov 14th, 2018
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. class Class1:
  2. def __init__(self):
  3. """Constructor."""
  4.  
  5. def get_location(self):
  6. canvas = iface.mapCanvas()
  7. clicked_points=canvas.setMapTool(Class2(self,canvas))
  8. print(clicked_points)
  9. iface.actionPan().trigger()
  10.  
  11. class Class2(QgsMapTool):
  12. def __init__(self,canvas):
  13. QgsMapTool.__init__(self, canvas)
  14. self.setCursor(Qt.CrossCursor)
  15. self.parent_class=parent_class
  16.  
  17. def canvasReleaseEvent(self, event):
  18. return [event.pos().x(),event.pos().y()]
Add Comment
Please, Sign In to add comment