def _update_subset_combo(self, msg=None): """ Set up the combo listing the subsets. """ # Prepare contents of combo box - we include a 'Create subset' item as # the last item labeldata = [(subset.label, subset) for subset in self._data_collection.subset_groups] labeldata.append(('None', None)) # We now update the combo box, but we block the signals as we don't want # this to cause the current subset being edited to be modified. self.subset_combo.blockSignals(True) # The block_signals here is to prevent signals from being turned back # on inside update_combobox. update_combobox(self.subset_combo, labeldata, block_signals=False) self.subset_combo.setIconSize(QtCore.QSize(12, 12)) for index, subset in enumerate(self._data_collection.subset_groups): self.subset_combo.setItemIcon(index, layer_icon(subset)) self.subset_combo.blockSignals(False)
def _update_subset_combo(self, msg=None): """ Set up the combo listing the subsets. """ # Prepare contents of combo box - we include a 'Create subset' item as # the last item labeldata = [(subset.label, subset) for subset in self._data_collection.subset_groups] labeldata.append(('None/Create New', None)) # We now update the combo box, but we block the signals as we don't want # this to cause the current subset being edited to be modified. self.subset_combo.blockSignals(True) # The block_signals here is to prevent signals from being turned back # on inside update_combobox. update_combobox(self.subset_combo, labeldata, block_signals=False) self.subset_combo.setIconSize(QtCore.QSize(12, 12)) for index, subset in enumerate(self._data_collection.subset_groups): self.subset_combo.setItemIcon(index, layer_icon(subset)) self.subset_combo.blockSignals(False)
def icon(self): return layer_icon(self.subset)
def icon(self): return layer_icon(self.data)