def __init__(self, parent=None): """Constructor.""" super(ResumenFinalTramosDialog, self).__init__(parent) # Set up the user interface from Designer. # After setupUI you can access any designer object by doing # self.<objectname>, and you can use autoconnect slots - see # http://qt-project.org/doc/qt-4.8/designer-using-a-ui-file.html # #widgets-and-dialogs-with-auto-connect self.setupUi(self) self.cota_cano_inicio.setValidator(QtGui.QDoubleValidator()) self.cota_cano_final.setValidator(QtGui.QDoubleValidator()) self.diametro.setValidator(QtGui.QDoubleValidator())
def __init__(self, parent=None): super(AreaWidget, self).__init__(parent) self.setupUi(self) self.canvas = iface.mapCanvas() self.admin_bounds_key = get_admin_bounds() if not self.admin_bounds_key: raise ValueError('Admin boundaries not available') self.area_admin_0.addItems(sorted(self.admin_bounds_key.keys())) self.populate_admin_1() self.area_admin_0.currentIndexChanged.connect(self.populate_admin_1) self.area_fromfile_browse.clicked.connect(self.open_vector_browse) self.area_fromadmin.toggled.connect(self.area_fromadmin_toggle) self.area_fromfile.toggled.connect(self.area_fromfile_toggle) icon = QtGui.QIcon( QtGui.QPixmap(':/plugins/LDMP/icons/map-marker.svg')) self.area_frompoint_choose_point.setIcon(icon) self.area_frompoint_choose_point.clicked.connect(self.point_chooser) #TODO: Set range to only accept valid coordinates for current map coordinate system self.area_frompoint_point_x.setValidator(QtGui.QDoubleValidator()) #TODO: Set range to only accept valid coordinates for current map coordinate system self.area_frompoint_point_y.setValidator(QtGui.QDoubleValidator()) self.area_frompoint.toggled.connect(self.area_frompoint_toggle) self.area_frompoint_toggle() # Setup point chooser self.choose_point_tool = QgsMapToolEmitPoint(self.canvas) self.choose_point_tool.canvasClicked.connect(self.set_point_coords) proj_crs = QgsCoordinateReferenceSystem( self.canvas.mapSettings().destinationCrs().authid()) self.mQgsProjectionSelectionWidget.setCrs( QgsCoordinateReferenceSystem('epsg:4326'))
def __init__(self, parent=None, iface=None): """Constructor.""" super(OpenEODialog, self).__init__(parent) # Set up the user interface from Designer through FORM_CLASS. # After self.setupUi() you can access any designer object by doing # self.<objectname>, and you can use autoconnect slots - see # http://qt-project.org/doc/qt-4.8/designer-using-a-ui-file.html # #widgets-and-dialogs-with-auto-connect self.iface = iface self.connection = Connection() self.processgraph = Processgraph() self.processes = None self.setupUi(self) self.connectButton.clicked.connect(self.connect) self.addButton.clicked.connect(self.add_process) self.processBox.currentTextChanged.connect(self.process_selected) # self.collectionBox.currentTextChanged.connect(self.collection_selected) self.refreshButton.clicked.connect(self.refresh_jobs) self.clearButton.clicked.connect(self.collection_selected) self.sendButton.clicked.connect(self.send_job) self.loadButton.clicked.connect(self.load_collection) self.processgraphEdit.textChanged.connect(self.update_processgraph) # Init filter boxes validators self.westEdit.setValidator(QtGui.QDoubleValidator()) self.eastEdit.setValidator(QtGui.QDoubleValidator()) self.southEdit.setValidator(QtGui.QDoubleValidator()) self.northEdit.setValidator(QtGui.QDoubleValidator()) self.crsEdit.setValidator(QtGui.QIntValidator()) # Jobs Tab self.init_jobs()