parameters: (self)
docstring: record clicked signal
docstring_summary: record clicked signal
docstring_tokens: record clicked signal
function: def record_clicked(self):
          """record clicked signal"""
  
          # disable only service buttons
          self.reset_buttons(True, False, False)
  
          self.rubber_band.reset()
  
          if not self.treeRecords.selectedItems():
              return
  
          item = self.treeRecords.currentItem()
          if not item:
              return
  
          identifier = get_item_data(item, 'identifier')
          try:
              record = next(item for item in self.catalog.records()
                            if item['identifier'] == identifier)
          except KeyError:
              QMessageBox.warning(self,
                                  self.tr('Record parsing error'),
                                  'Unable to locate record identifier')
              return
  
          # if the record has a bbox, show a footprint on the map
          if record['bbox'] is not None:
              bx = record['bbox']
              rt = QgsRectangle(float(bx['minx']), float(bx['miny']),
                                float(bx['maxx']), float(bx['maxy']))
              geom = QgsGeometry.fromRect(rt)
  
              if geom is not None:
                  src = QgsCoordinateReferenceSystem("EPSG:4326")
                  dst = self.map.mapSettings().destinationCrs()
                  if src.postgisSrid() != dst.postgisSrid():
                      ctr = QgsCoordinateTransform(
                          src, dst, QgsProject.instance())
                      try:
                          geom.transform(ctr)
                      except Exception as err:
                          QMessageBox.warning(
                              self,
                              self.tr('Coordinate Transformation Error'),
                              str(err))
                  self.rubber_band.setToGeometry(geom, None)
  
          # figure out if the data is interactive and can be operated on
          self.find_services(record, item)
function_tokens: def record_clicked ( self ) : # disable only service buttons self . reset_buttons ( True , False , False ) self . rubber_band . reset ( ) if not self . treeRecords . selectedItems ( ) : return item = self . treeRecords . currentItem ( ) if not item : return identifier = get_item_data ( item , 'identifier' ) try : record = next ( item for item in self . catalog . records ( ) if item [ 'identifier' ] == identifier ) except KeyError : QMessageBox . warning ( self , self . tr ( 'Record parsing error' ) , 'Unable to locate record identifier' ) return # if the record has a bbox, show a footprint on the map if record [ 'bbox' ] is not None : bx = record [ 'bbox' ] rt = QgsRectangle ( float ( bx [ 'minx' ] ) , float ( bx [ 'miny' ] ) , float ( bx [ 'maxx' ] ) , float ( bx [ 'maxy' ] ) ) geom = QgsGeometry . fromRect ( rt ) if geom is not None : src = QgsCoordinateReferenceSystem ( "EPSG:4326" ) dst = self . map . mapSettings ( ) . destinationCrs ( ) if src . postgisSrid ( ) != dst . postgisSrid ( ) : ctr = QgsCoordinateTransform ( src , dst , QgsProject . instance ( ) ) try : geom . transform ( ctr ) except Exception as err : QMessageBox . warning ( self , self . tr ( 'Coordinate Transformation Error' ) , str ( err ) ) self . rubber_band . setToGeometry ( geom , None ) # figure out if the data is interactive and can be operated on self . find_services ( record , item )