Now, when dialogs are created and connected to our plugin, we can start implementing the main functionality—namely, feature selection using requirements defined by the user.
selectradiusdialog.py file located in the
gui subdirectory of the plugin source tree. Add the following code at the end of the
( 1) self.btnOk.setEnabled(False) ( 2) self.btnClose.setEnabled(False) ( 3) ( 4) request = QgsFeatureRequest() ( 5) request.setFlags( ( 6) request.flags() ^ QgsFeatureRequest.SubsetOfAttributes) ( 7) ( 8) index = QgsSpatialIndex(targetLayer.getFeatures(request)) ( 9) (10) selection =  (11) for f in referenceFeatures: (12) geom = QgsGeometry(f.geometry()) (13) bufferedGeometry = geom.buffer(self.spnRadius.value(), ...