Skip to content

Architecture

Samie Bee edited this page Nov 27, 2023 · 7 revisions

Click individual classes in the following diagram to access their individual documentation pages.

Diagram

View the Architecture diagram here.

Historical Diagram

View historical versions of the architecture here.

Key Files and Classes

The executable script that launches the ENLIGHTEN application is scripts/Enlighten.py.

This script defines an EnlightenApplication object which instantiates a Controller instance, which is the real heart of the show. This remains a somewhat bloated class and it remains a goal to continue shrinking it down into a more maintainable set of encapsulated objects.

The GUI itself is defined in enlighten/assets/enlighten_layout.ui, an XML file you will rarely (but occasionally) want to edit by-hand. Typically you edit it graphically using the Qt Designer utility ("make designer").

(Watch some YouTube videos on "Qt layouts" if you're new to this tool.)

Business Object Architecture

The goal is for a business object to "own" its own GUI elements, which is why many of them take long lists of QWidgets in their constructor. Once passed to the business object, that class is expected to:

  • bind widget callbacks to its own local functions
  • initialize widget values from enlighten.Configuration.Configuration, and save updated values back to that config so they're persisted at shutdown