def setLayer(self, layer): context = dataobjects.createContext() if isinstance(layer, str): layer = QgsProcessingUtils.mapLayerFromString( _resolveLayers(layer), context) self._layer = layer self.refreshItems()
def setLayer(self, layer): if isinstance(layer, str): layer = dataobjects.getObjectFromUri(_resolveLayers(layer)) self.widget.setLayer(layer)
def setLayer(self, layer): if isinstance(layer, str): layer = dataobjects.getObjectFromUri(_resolveLayers(layer)) self._layer = layer self.refreshItems()