MetaView¶
class MetaView()
Bases: QWidget, WalkthroughMixin
Abstract base class designed to provide a unified interface for different analysis tabs.
This class includes a blank plot canvas for visualizing data, a dedicated space for control elements, and an interface for dynamically updating the plot based on user interactions or analysis results.
Public Methods¶
Abstract Methods¶
These methods must be implemented by subclasses.
- abstractmethod MetaView.handle_parameter_change(submodel_name: str, action_name: str, args: tuple) None¶
React to an action the tab’s controls panel has emitted.
Abstract because
_set_control_areaconnects the panel’sactionTriggeredsignal straight to it while the View is still being constructed, so a tab that does not provide it raisesAttributeErrorout of__init__before it can ever be shown. Declaring it here is what turns that into a refusal to instantiate the class at all, which is the only form of the failure that names the cause. The three sibling handlers_set_control_areaconnects beside it -handle_edit_triggered,handle_add_triggeredandhandle_delete_triggered- are concrete on this class and need no implementation.A tab that lays out its own control area by overriding
_set_control_areanever has this connected, and may implement it as a no-op.
- abstractmethod MetaView.notify_plugin_state_changed(metaclass: str, plugin_key: str, reason: str) None¶
Called by MainController whenever any plugin instance’s internal state changed elsewhere in the app (e.g. new columns committed to a loader’s table). Must be implemented by subclasses, even if the correct implementation is a no-op (pass).
Where the implementation is not a no-op, it must make a deliberate decision about whether the notification applies to this tab, filter accordingly, and determine what the specific reaction should be.
Currently known (metaclass, reason) combinations in use:
(“MetaDatabaseLoader”, <loader_key>, “columns”) — emitted after columns are added to a loader’s table (see ClusteringView._commit_clusters, ProteinView._commit_fits).
- Parameters:
metaclass (str) – The metaclass of the plugin instance whose state changed (e.g. “MetaDatabaseLoader”).
plugin_key (str) – The unique key identifying the plugin instance that changed (e.g. “SQLiteDBLoader_0”).
reason (str) – A short string identifying what kind of change occurred (e.g. “columns”). Free-form; the emitter and every receiver must agree on the exact string used.
- Returns:
None
- Return type:
None
Concrete Methods¶
- MetaView.handle_add_triggered(metaclass: str) None¶
Trigger addition of a new plugin by prompting for a subclass.
- Parameters:
metaclass (str) – The type of plugin to add (e.g., ‘MetaReader’)
- MetaView.handle_delete_triggered(metaclass: str, key: str) None¶
Emit a signal to trigger the delete process for a data plugin, passing the identifier.
- MetaView.handle_edit_triggered(metaclass: str, key: str) None¶
Emit a signal to trigger the saving process for a data plugin, passing the appropriate arguments to handle editing plugin settings.
- MetaView.handle_kill_button(identifier: str) None¶
Handle the kill button click event for individual workers.
Private Methods¶
Abstract Methods¶
These methods must be implemented by subclasses.
- abstractmethod MetaView._init() None¶
Perform additional initialization specific to the algorithm being implemented. Must be implemented by subclasses.
This function is called at the end of the class constructor to perform additional initialization specific to the algorithm being implemented. kwargs provided to the base class constructor are available as class attributes.
- abstractmethod MetaView._reset_actions(axis_type: str = '2d') None¶
Clears the figure and reinitializes axes. This will also add a flag to the tab action history if @register_action is being used to keep track of actions. Only actions applied after the most recent call to this function will be recreated if the related file is loaded.
- Parameters:
axis_type (str) – Either ‘2d’ or ‘3d’ to determine plot projection.