Update layer description label

        .. note:: This is an automatic Qt slot
           executed when the category selection changes.
346083
def on_lstCanvasHazLayers_itemSelectionChanged(self):
        

        self.parent.hazard_layer = self.selected_canvas_hazlayer()
        lblText = self.parent.get_layer_description_from_canvas(
            self.parent.hazard_layer, 'hazard')
        self.lblDescribeCanvasHazLayer.setText(lblText)
        self.parent.pbnNext.setEnabled(True)
1156946
def on_lstCanvasAggLayers_itemSelectionChanged(self):
        
        self.parent.aggregation_layer = self.selected_canvas_agglayer()
        lblText = self.parent.get_layer_description_from_canvas(
            self.parent.aggregation_layer, 'aggregation')
        self.lblDescribeCanvasAggLayer.setText(lblText)
        self.parent.pbnNext.setEnabled(True)
267926
public void update(Object feature) throws LayerException {
		Session session = getSessionFactory().getCurrentSession();
		session.update(feature);
	}
897420
private void updateConnectionDetails() {
        Stage stage = (Stage)platformLabel.getScene().getWindow();

        connectedLabel.setText(connected ? "YES" : "NO");
        remoteInfo.ifPresent(remote -> {
            remoteNameLabel.setText(remote.getName());
            versionLabel.setText(remote.getMajorVersion() + "." + remote.getMinorVersion());
            platformLabel.setText(remote.getPlatform().getDescription());
            stage.setTitle("Connected to " + remote.getName());
        });

        if (!connected) {
            stage.setTitle("Disconnected [" + remoteControl.getConnector().getConnectionName() + "]");
            menuLoadLabel.setText("NO");
            versionLabel.setText("");
            remoteNameLabel.setText("");
        }
    }
255561
def set_widgets(self):
        """"""
        self.clear()
        self.description_label.setText(
            'In this step you can set some extra keywords for the layer. This '
            'keywords can be used for creating richer reporting or map.')
        subcategory = self.parent.step_kw_subcategory.selected_subcategory()
        extra_keywords = subcategory.get('extra_keywords')
        for extra_keyword in extra_keywords:
            check_box, input_widget = extra_keywords_to_widgets(extra_keyword)
            self.widgets_dict[extra_keyword['key']] = [
                check_box,
                input_widget,
                extra_keyword
            ]

        # Add to layout
        index = 0
        for key, widgets in list(self.widgets_dict.items()):
            self.extra_keywords_layout.addWidget(widgets[0], index, 0)
            self.extra_keywords_layout.addWidget(widgets[1], index, 1)
            index += 1

        self.set_existing_extra_keywords()
786455
def on_lstSubcategories_itemSelectionChanged(self):
        
        self.clear_further_steps()
        # Set widgets
        subcategory = self.selected_subcategory()
        # Exit if no selection
        if not subcategory:
            return
        # Set description label
        self.lblDescribeSubcategory.setText(subcategory['description'])

        icon_path = get_image_path(subcategory)

        self.lblIconSubcategory.setPixmap(QPixmap(icon_path))
        # Enable the next button
        self.parent.pbnNext.setEnabled(True)
500098
def selected_layermode(self):
        
        item = self.lstLayerModes.currentItem()
        try:
            return definition(item.data(QtCore.Qt.UserRole))
        except (AttributeError, NameError):
            return None
363472
def _on_changed(self):
        
        self._updating = True
        to_collapse = []
        self.clear()
        if self._editor and self._outline_mode and self._folding_panel:
            items, to_collapse = self.to_tree_widget_items(
                self._outline_mode.definitions, to_collapse=to_collapse)
            if len(items):
                self.addTopLevelItems(items)
                self.expandAll()
                for item in reversed(to_collapse):
                    self.collapseItem(item)
                self._updating = False
                return

        # no data
        root = QtWidgets.QTreeWidgetItem()
        root.setText(0, _('No data'))
        root.setIcon(0, icons.icon(
            'dialog-information', ':/pyqode-icons/rc/dialog-info.png',
            'fa.info-circle'))
        self.addTopLevelItem(root)
        self._updating = False
        self.sync()
174493
def update_catagory(netid, category_code, status):
    
    url = "{0}/category".format(url_version())
    body = {
        "categoryCode": category_code,
        "status": status,
        "categoryList": [{"netid": netid}]
    }

    response = post_resource(url, json.dumps(body))
    return json.loads(response)
1305719
def add_active_label(self, active_label):
        

        if not issubclass(active_label.__class__, Active_QLabel):
            raise foundations.exceptions.ProgrammingError("{0} | '{1}' must be a '{2}' subclass!".format(
                self.__class__.__name__, active_label, Active_QLabel.__name__))

        if active_label in self.__active_labels:
            raise foundations.exceptions.ProgrammingError("{0} | '{1}' is already in the collection!".format(
                self.__class__.__name__, active_label))

        active_label.checkable = True
        not self.__active_labels and active_label.set_checked(True) or active_label.set_checked(False)
        self.__active_labels.append(active_label)

        # Signals / Slots.
        active_label.toggled.connect(functools.partial(self.__active_label__toggled, active_label))

        active_label.clicked.connect(functools.partial(self.active_label_clicked.emit, active_label))
        active_label.pressed.connect(functools.partial(self.active_label_pressed.emit, active_label))
        active_label.released.connect(functools.partial(self.active_label_released.emit, active_label))
        active_label.toggled.connect(functools.partial(self.active_label_toggled.emit, active_label))

        return True
504747
def update(self, label=None, name=None, disabled=None, metadata=None,
            monitoring_zones_poll=None, timeout=None, period=None,
            target_alias=None, target_hostname=None, target_receiver=None):
        
        self.manager.update(self, label=label, name=name,
                disabled=disabled, metadata=metadata,
                monitoring_zones_poll=monitoring_zones_poll, timeout=timeout,
                period=period, target_alias=target_alias,
                target_hostname=target_hostname,
                target_receiver=target_receiver)
1184123
def set_wizard_step_description(self):
        """"""
        subcategory = self.parent.step_kw_subcategory.selected_subcategory()
        field = self.parent.step_kw_field.selected_fields()
        is_raster = is_raster_layer(self.parent.layer)

        if is_raster:
            if self.layer_mode == layer_mode_continuous:
                text_label = multiple_continuous_hazard_classifications_raster
            else:
                text_label = multiple_classified_hazard_classifications_raster
            # noinspection PyAugmentAssignment
            text_label = text_label % (
                subcategory['name'], self.layer_purpose['name'])
        else:
            if self.layer_mode == layer_mode_continuous:
                text_label = multiple_continuous_hazard_classifications_vector
            else:
                text_label = multiple_classified_hazard_classifications_vector
            # noinspection PyAugmentAssignment
            text_label = text_label % (
                subcategory['name'], self.layer_purpose['name'], field)

        self.multi_classifications_label.setText(text_label)
1271321
public void updateLabel(String oldLabel, String newLabel)
	{
		if (hasLabel(newLabel)) throw new IllegalArgumentException(
			"The label \"" + newLabel + "\" already exists.");

		int i = indexOf(oldLabel);
		labelMap.remove(oldLabel);
		labelMap.put(newLabel, i);
	}
654873
def __update_siblings_active_labels_states(self, active_label):
        

        LOGGER.debug("> Clicked 'Active_QLabel': '{0}'.".format(active_label))

        for item in self.__active_labels:
            if item is active_label:
                continue

            umbra.ui.common.signals_blocker(item, item.set_checked, False)
1099704
def on_lstClassifications_itemSelectionChanged(self):
        
        self.clear_further_steps()
        classification = self.selected_classification()
        # Exit if no selection
        if not classification:
            return
        # Set description label
        self.lblDescribeClassification.setText(classification["description"])
        # Enable the next button
        self.parent.pbnNext.setEnabled(True)
211784
def _update_labels(self, label, pad_box, height, width):
        """"""
        out = label.copy()
        out[:, (1, 3)] = (out[:, (1, 3)] * width + pad_box[0]) / pad_box[2]
        out[:, (2, 4)] = (out[:, (2, 4)] * height + pad_box[1]) / pad_box[3]
        return out
711980
def update(self, label = '', forceRefresh = False, log = False) :
		""""""
		self.currEpoch += 1
		tim = time.time()
		if (tim - self.lastPrintTime > self.minRefeshTime) or forceRefresh :
			self._update()
			
			wheelState = self.wheel[self.currEpoch%len(self.wheel)]
			
			if label == '' :
				slabel = self.label
			else :
				slabel = label
			
			if self.nbEpochs > 1 :
				ratio = self.currEpoch/self.nbEpochs
				snakeLen = int(self.width*ratio)
				voidLen = int(self.width - (self.width*ratio))

				if snakeLen + voidLen < self.width :
					snakeLen = self.width - voidLen
				
				self.bar = "%s %s[%s:>%s] %.2f%% (%d/%d) runtime: %s, remaining: %s, avg: %s" %(wheelState, slabel, "~-" * snakeLen, "  " * voidLen, ratio*100, self.currEpoch, self.nbEpochs, self.runtime_hr, self.remtime_hr, self.formatTime(self.avg))
				if self.currEpoch == self.nbEpochs :
					self.close()
				
			else :
				w = self.width - len(self.miniSnake)
				v = self.currEpoch%(w+1)
				snake = "%s%s%s" %("  " * (v), self.miniSnake, "  " * (w-v))
				self.bar = "%s %s[%s] %s%% (%d/%s) runtime: %s, remaining: %s, avg: %s" %(wheelState, slabel, snake, '?', self.currEpoch, '?', self.runtime_hr, '?', self.formatTime(self.avg))
			
			sys.stdout.write("\b" * (len(self.bar)+1))
			sys.stdout.write(" " * (len(self.bar)+1))
			sys.stdout.write("\b" * (len(self.bar)+1))
			sys.stdout.write(self.bar)
			sys.stdout.flush()
			self.lastPrintTime = time.time()
			
			if log :
				self.log()