MetaSubsetTabControls

class MetaSubsetTabControls()

Bases: MetaControls

Shared base for the control panels of the two subset-filtering analysis tabs.

MetadataControls and ProteinControls build the same row of widgets below their tab’s plot: a database-loader combobox, a multi-select filter combobox with its edit, add and delete buttons, and a bins field that switches between integer and float validation. The two were written by copy-paste and carried ten methods verbatim between them; this base holds that shared half so there is one copy to fix.

It extends MetaControls rather than replacing it - the widget factories, the icon buttons and the placeholder guard all still come from there.

What a subclass inherits, on top of everything MetaControls gives it:

  • The filter combobox. update_filters repopulates it, and delete_filter_by_name and show_filter_info_dialog_single turn a click on one of its rows into a signal.

  • The three filter buttons. create_filter_info_button, create_add_filter_button and create_filter_delete_button build the pencil, plus and trash buttons beside that combobox.

  • The loader combobox. update_loaders keeps it in step with the database loaders instantiated elsewhere in the app.

  • Signals. edit_filter_requested carries (filter_name, loader_name) and delete_filter_requested carries a filter name, both into the tab’s View.

  • ``placeholder_texts``, which is ("No Event Database",) for both tabs.

What a subclass owes it:

  • Its own logger = logging.getLogger(__name__), as MetaControls already requires.

  • A ``setupUi`` that builds db_loader_comboBox, filter_comboBox, bins_lineEdit, int_validator and float_validator. They are declared below but not created here, because each tab lays its panel out differently.

ivar logger:

the module logger the shared methods below log under

Public Methods

Abstract Methods

These methods must be implemented by subclasses.

(none)

Concrete Methods

MetaSubsetTabControls.create_add_filter_button(parent: QWidget, comboBox: MultiSelectFilterComboBox, tooltip: str) → QToolButton
MetaSubsetTabControls.create_filter_delete_button(parent: QWidget, comboBox: MultiSelectFilterComboBox, tooltip: str) → QToolButton
MetaSubsetTabControls.create_filter_info_button(parent: QWidget, comboBox: MultiSelectFilterComboBox, tooltip: str) → QToolButton
MetaSubsetTabControls.delete_filter_by_name(name: str) → None
MetaSubsetTabControls.retranslateUi() → None
MetaSubsetTabControls.show_filter_info_dialog_single(name: str) → None
MetaSubsetTabControls.update_filters(filters: Sequence[Any]) → None
MetaSubsetTabControls.update_loaders(loaders: list[str]) → None

Private Methods

Abstract Methods

These methods must be implemented by subclasses.

(none)