ClusteringControls

class ClusteringControls(parent: Optional[QWidget] = None)

Bases: QWidget

Public Methods

ClusteringControls.clear_popup_reference(comboBox: QComboBox) None

Clears the reference to the popup when it is closed.

ClusteringControls.collect_parameters() dict

Collect current input values from the UI widgets.

Gathers selected values from the database loader, X label, and Y label combo boxes. Defaults to “No Event Database” or None where appropriate.

Returns:

A dictionary containing the current selections.

Return type:

dict

ClusteringControls.connect_signals() None

Connects signals to corresponding methods.

ClusteringControls.createButton(parent: QWidget, text: str, bold: bool = False) QPushButton
ClusteringControls.createLabel(parent: QWidget, pointSize: int, text: str) QLabel
ClusteringControls.create_add_button(parent: QWidget, comboBox: QComboBox, add_text: str, metaclass: str) QToolButton

Creates an add button linked to the corresponding combobox.

ClusteringControls.create_comboBox(parent: QWidget) QComboBox
ClusteringControls.create_delete_button(parent: QWidget, comboBox: QComboBox, info_text: str, metaclass: str) QToolButton

Creates a delete button linked to the corresponding combobox.

ClusteringControls.create_info_button(parent: QWidget, comboBox: QComboBox, info_text: str, metaclass: str) QToolButton

Creates an info button linked to the corresponding combobox.

ClusteringControls.delete_plugin(comboBox: QComboBox, metaclass: str) None

Deletes the plugin corresponding tot he current ComboBox selection

ClusteringControls.get_current_loader() str | None

Return the currently selected DB loader key, or None if unset.

ClusteringControls.is_placeholder_item(comboBox: QComboBox) bool

Returns True if the combobox contains a placeholder like ‘No Reader’, ‘No Writer’, etc.

ClusteringControls.on_button_clicked(button_type: str) None

Handles button clicks and emits appropriate signals.

ClusteringControls.on_label_changed() None

Handle changes in either the X or Y label combo box.

This function can be extended to trigger updates or validations when a label selection changes.

ClusteringControls.on_loader_changed() None

Handles parameter changes and emits an action signal.

ClusteringControls.retranslateUi() None

Update translated UI strings.

Typically used in Qt for re-applying translations, currently unused.

ClusteringControls.setupUi() None
ClusteringControls.show_plugin_add_manager(comboBox: QComboBox, metaclass: str) None

Displays the plugin manager with details for the selected item from the combobox.

ClusteringControls.show_plugin_edit_manager(comboBox: QComboBox, metaclass: str) None

Displays the plugin manager with details for the selected item from the combobox.

ClusteringControls.toggle_info_button(button: QToolButton, comboBox: QComboBox) None

Enables or disables the info button based on the comboBox selection and item count.

ClusteringControls.update_clusters(clusters: Sequence[Any]) None

Update the X and Y label combo boxes with the provided cluster labels.

Parameters:

clusters (Sequence[Any]) – A sequence of cluster identifiers to populate the combo boxes. Values are stringified before display, so any type is accepted.

ClusteringControls.update_labels() None

Update both X and Y label combo boxes.

This method should be implemented to populate the combo boxes with available cluster labels, possibly from an external source or updated state.

ClusteringControls.update_loaders(loaders: list[str]) None

Update the database loader combo box with available loader names.

Preserves the current selection if it’s still valid; otherwise, defaults to the first available loader.

Parameters:

loaders (list[str]) – A list of loader names (strings) to populate the combo box.

ClusteringControls.update_units(comboBox: QComboBox, units_label: QLabel) None

Update units based on the selected column in the comboBox and emit an update signal.

ClusteringControls.validate_inputs() None

Validates input fields and enables/disables buttons accordingly.

Private Methods

ClusteringControls.__init__(parent: QWidget | None = None) None

Initialize the ClusteringControls widget.

Sets up the UI, connects signals, and performs initial input validation.

Parameters:

parent (Optional[QWidget]) – Parent widget that owns these controls.