dtmovenodebyarea_dialog.py 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # -*- coding: utf-8 -*-
  2. """
  3. dtmovenodebyarea_dialog
  4. ```````````````````````
  5. """
  6. """
  7. Part of DigitizingTools, a QGIS plugin that
  8. subsumes different tools neded during digitizing sessions
  9. * begin : 2013-08-14
  10. * copyright : (C) 2013 by Angelos Tzotsos
  11. * email : tzotsos@gmail.com
  12. This program is free software; you can redistribute it and/or modify
  13. it under the terms of the GNU General Public License as published by
  14. the Free Software Foundation; either version 2 of the License, or
  15. (at your option) any later version.
  16. """
  17. from builtins import str
  18. from qgis.PyQt import QtCore, QtWidgets, uic
  19. import os
  20. FORM_CLASS, _ = uic.loadUiType(os.path.join(
  21. os.path.dirname(__file__), 'ui_dtmovenodebyarea.ui'))
  22. class DtMoveNodeByArea_Dialog(QtWidgets.QDialog, FORM_CLASS):
  23. unsetTool = QtCore.pyqtSignal()
  24. moveNode = QtCore.pyqtSignal()
  25. def __init__(self, parent, flags):
  26. super().__init__(parent, flags)
  27. self.setupUi(self)
  28. def initGui(self):
  29. pass
  30. def writeArea(self, area):
  31. self.area_label.setText(str(area))
  32. self.targetArea.setText(str(area))
  33. @QtCore.pyqtSlot()
  34. def on_buttonClose_clicked(self):
  35. self.unsetTool.emit()
  36. self.close()
  37. @QtCore.pyqtSlot()
  38. def on_moveButton_clicked(self):
  39. self.moveNode.emit()
  40. pass