forked from mpetroff/qgsazimuth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui_control.py
36 lines (25 loc) · 889 Bytes
/
ui_control.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
from qgis.PyQt.QtCore import pyqtSignal
from qgis.PyQt.QtWidgets import QWidget, QDockWidget, QApplication
from .dock import Ui_Form
class Widget(QWidget, Ui_Form):
def __init__(self, parent):
QWidget.__init__(self, parent)
self.setupUi(self)
def update_startpoint(self, point, z=90):
self.lineEdit_vertexX0.setText(str(point.x()))
self.lineEdit_vertexY0.setText(str(point.y()))
self.lineEdit_vertexZ0.setText(str(z))
class Dock(QDockWidget):
closed = pyqtSignal()
def __init__(self, parent):
QDockWidget.__init__(self, parent)
self.setWidget(Widget(self))
self.setWindowTitle("Azimuth and distance")
def closeEvent(self, event):
self.closed.emit()
if __name__ == "__main__":
import sys, os
app = QApplication(sys.argv)
c = Dock(None)
c.show()
sys.exit(app.exec_())