Skip to content

Conversation

@rozyczko
Copy link
Member

Description

Created EventMediator Infrastructure for FittingWidget to modularize and simplify event handling between multiple widgets and sections.

The Event Mediator (sometimes called Event Aggregator or Publish-Subscribe with a central mediator) is a behavioral design pattern that allows objects (publishers) to emit named events with optional data, and other objects (subscribers/listeners) to register interest in those events — all without the publishers and subscribers knowing about each other directly.

At its core, EventMediator is a glorified dictionary whose keys are event names (or types) and whose values are lists of callables (the “slots”). Everything else (subscribe/unsubscribe/publish, error handling, weak references, async support, sender filtering, signal objects, etc.) is just sophisticated dressing on top of that one dictionary.

How Has This Been Tested?

Local tests + unit tests created

Review Checklist:

[if using the editor, use [x] in place of [ ] to check a box]

Documentation (check at least one)

  • [ X] There is nothing that needs documenting
  • Documentation changes are in this PR
  • There is an issue open for the documentation (link?)

Installers

  • There is a chance this will affect the installers, if so
    • Windows installer (GH artifact) has been tested (installed and worked)
    • MacOSX installer (GH artifact) has been tested (installed and worked)
    • Wheels installer (GH artifact) has been tested (installed and worked)

Licensing (untick if necessary)

  • The introduced changes comply with SasView license (BSD 3-Clause)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants