ClusteringControls

class ClusteringControls(parent = None)

Bases: QWidget

Public Methods

ClusteringControls.clear_popup_reference(comboBox)

Clears the reference to the popup when it is closed.

ClusteringControls.collect_parameters()

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()

Connects signals to corresponding methods.

ClusteringControls.createButton(parent, text, bold=False)
ClusteringControls.createLabel(parent, pointSize, text)
ClusteringControls.create_add_button(parent, comboBox, add_text, metaclass)

Creates an add button linked to the corresponding combobox.

ClusteringControls.create_comboBox(parent)
ClusteringControls.create_delete_button(parent, comboBox, info_text, metaclass)

Creates a delete button linked to the corresponding combobox.

ClusteringControls.create_info_button(parent, comboBox, info_text, metaclass)

Creates an info button linked to the corresponding combobox.

ClusteringControls.delete_plugin(comboBox, metaclass)

Deletes the plugin corresponding tot he current ComboBox selection

ClusteringControls.get_nested_value(keys, default=None)

Recursively fetches values from nested dictionaries. :param d: The dictionary to fetch data from. :param keys: List of keys to navigate through the nested dictionary. :param default: Default value if any key is not found. :return: Value fetched from the dictionary or default.

ClusteringControls.is_placeholder_item(comboBox)

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

ClusteringControls.on_button_clicked(button_type)

Handles button clicks and emits appropriate signals.

ClusteringControls.on_label_changed()

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()

Handles parameter changes and emits an action signal.

ClusteringControls.retranslateUi()

Update translated UI strings.

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

ClusteringControls.setupUi()
ClusteringControls.show_plugin_add_manager(comboBox, metaclass)

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

ClusteringControls.show_plugin_edit_manager(comboBox, metaclass)

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

ClusteringControls.toggle_info_button(button, comboBox)

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

ClusteringControls.update_clusters(clusters)

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

Parameters:

clusters (list[str]) – A list of cluster identifiers to populate the combo boxes.

ClusteringControls.update_labels()

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, units_label)

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

ClusteringControls.validate_inputs()

Validates input fields and enables/disables buttons accordingly.

Private Methods

ClusteringControls.__init__(parent=None)

Initialize the ClusteringControls widget.

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