ComponentIDComboHelper#
- class glue.core.data_combo_helper.ComponentIDComboHelper(state, selection_property, data_collection=None, data=None, numeric=True, datetime=True, categorical=True, pixel_coord=False, world_coord=False, derived=True, none=False)#
Bases:
ComboHelperThe purpose of this class is to set up a combo (represented by a SelectionCallbackProperty) showing componentIDs for one or more datasets, and to update these componentIDs if needed, for example if new components are added to a dataset, or if componentIDs are renamed. This is a GUI framework-independent implementation.
- Parameters:
- state
State The state to which the selection property belongs
- selection_property
SelectionCallbackProperty The selection property representing the combo.
- data_collection
DataCollection, optional The data collection to which the datasets belong - if specified, this is used to remove datasets from the combo when they are removed from the data collection.
- data
Data, optional If specified, set up the combo for this dataset only and don’t allow datasets to be added/removed
- numericbool, optional
Show numeric components
- datetimebool, optional
Show datetime components
- categoricalbool, optional
Show categorical components
- pixel_coordbool, optional
Show pixel coordinate components
- world_coordbool, optional
Show world coordinate components
- derivedbool, optional
Show derived components
- nonebool or str, optional
Add an entry that means None. If a string, this is the display string that will be shown for the None entry, otherwise an empty string is shown.
- state
Attributes Summary
Methods Summary
append_data(data[, refresh])clear()refresh(*args)register_to_hub(hub)remove_data(data)set_multiple_data(datasets)Add multiple datasets to the combo in one go (and clear any previous datasets).
unregister(hub)Default unregistration action.
Attributes Documentation
- categorical#
- datetime#
- derived#
- hub#
- none#
- numeric#
- pixel_coord#
- world_coord#
Methods Documentation
- append_data(data, refresh=True)#
- clear()#
- refresh(*args)#
- register_to_hub(hub)#
- remove_data(data)#
- set_multiple_data(datasets)#
Add multiple datasets to the combo in one go (and clear any previous datasets).
- Parameters:
- datasetslist
The list of
Dataobjects to add
- unregister(hub)#
Default unregistration action. Calls hub.unsubscribe_all on self