# romanolorenzo/truesignal architecture

> Architecture diagram of the GitHub repository romanolorenzo/truesignal, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/romanolorenzo/truesignal
- Repository: https://github.com/romanolorenzo/truesignal

## Overview

TrueSignal’s SignaLab is a PySide6 desktop oscilloscope for viewing two channels in time or FFT mode, adjusting scales and triggers, and saving plots or sampled data. The main runtime path starts in main.py, which builds the UI and connects GUI and menu behavior; GuiFunctions supplies a simulated signal source to the tabbed oscilloscope widgets, which render and analyze it. Menu actions provide export and recording. README capabilities such as themes and informational overlays are included, but their implementation paths are not established by the sampled excerpts, so links are omitted where unsupported.

Main entry points: [`main.py`](https://github.com/romanolorenzo/truesignal/blob/main/main.py) (App window), [`src/Functions.py`](https://github.com/romanolorenzo/truesignal/blob/main/src/Functions.py) (Signal source), [`src/MenuFunctions.py`](https://github.com/romanolorenzo/truesignal/blob/main/src/MenuFunctions.py) (Menu actions), [`src/trigger_handler.py`](https://github.com/romanolorenzo/truesignal/blob/main/src/trigger_handler.py) (Trigger detection)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_entry["App window<br/>[main.py]"]
  node_ui["UI layout<br/>[ui_interface.py]"]
  node_gui["GUI functions<br/>[Functions.py]"]
  node_style["JSON themes<br/>[style.json]"]
end

subgraph group_signal["Signal and plots"]
  node_source["Signal source<br/>[Functions.py]"]
  node_tabs["Tabbed views<br/>[Functions.py]"]
  node_combined["Combined plot"]
  node_channel1["Channel 1 plot"]
  node_channel2["Channel 2 plot"]
  node_overlay["Recording overlay"]
end

subgraph group_controls["Controls and analysis"]
  node_trigger["Trigger detection<br/>[trigger_handler.py]"]
  node_scales["Scale controls<br/>[Functions.py]"]
  node_spinbox["Stepped spinbox<br/>[custom_spinbox.py]"]
end

subgraph group_actions["User actions"]
  node_menu["Menu actions<br/>[MenuFunctions.py]"]
  node_record["Data recording<br/>[MenuFunctions.py]"]
  node_export["Plot export<br/>[MenuFunctions.py]"]
end

node_user(("Operator"))
node_external["USB oscilloscope"]

node_user -->|"launches"| node_entry
node_entry -->|"sets up"| node_ui
node_entry -->|"creates"| node_gui
node_entry -->|"creates"| node_menu
node_gui -->|"creates"| node_source
node_gui -->|"builds"| node_tabs
node_tabs -->|"adds"| node_combined
node_tabs -->|"adds"| node_channel1
node_tabs -->|"adds"| node_channel2
node_source -->|"emits plot data"| node_combined
node_source -->|"emits plot data"| node_channel1
node_source -->|"emits plot data"| node_channel2
node_combined -->|"checks triggers"| node_trigger
node_channel1 -->|"checks triggers"| node_trigger
node_channel2 -->|"checks triggers"| node_trigger
node_entry -->|"installs"| node_spinbox
node_gui -->|"connects controls"| node_scales
node_menu -->|"exports plots"| node_export
node_menu -->|"records data"| node_record
node_user -->|"selects actions"| node_menu
node_user -->|"adjusts display"| node_scales
node_user -->|"sets trigger"| node_trigger
node_user -.->|"customizes theme"| node_style
node_user -.->|"records screen"| node_overlay
node_external -.->|"provides samples"| node_source

click node_entry "https://github.com/romanolorenzo/truesignal/blob/main/main.py"
click node_ui "https://github.com/romanolorenzo/truesignal/blob/main/src/ui_interface.py"
click node_gui "https://github.com/romanolorenzo/truesignal/blob/main/src/Functions.py"
click node_source "https://github.com/romanolorenzo/truesignal/blob/main/src/Functions.py"
click node_tabs "https://github.com/romanolorenzo/truesignal/blob/main/src/Functions.py"
click node_combined "https://github.com/romanolorenzo/truesignal/blob/main/src/OscilloscopeWidget.py"
click node_channel1 "https://github.com/romanolorenzo/truesignal/blob/main/src/OscilloscopeWidget.py"
click node_channel2 "https://github.com/romanolorenzo/truesignal/blob/main/src/OscilloscopeWidget.py"
click node_trigger "https://github.com/romanolorenzo/truesignal/blob/main/src/trigger_handler.py"
click node_scales "https://github.com/romanolorenzo/truesignal/blob/main/src/Functions.py"
click node_spinbox "https://github.com/romanolorenzo/truesignal/blob/main/src/custom_spinbox.py"
click node_menu "https://github.com/romanolorenzo/truesignal/blob/main/src/MenuFunctions.py"
click node_record "https://github.com/romanolorenzo/truesignal/blob/main/src/MenuFunctions.py"
click node_export "https://github.com/romanolorenzo/truesignal/blob/main/src/MenuFunctions.py"
click node_style "https://github.com/romanolorenzo/truesignal/blob/main/json-styles/style.json"
click node_overlay "https://github.com/romanolorenzo/truesignal/blob/main/src/OscilloscopeWidget.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_entry,node_ui,node_gui,node_style toneBlue
class node_source,node_tabs,node_combined,node_channel1,node_channel2,node_overlay toneAmber
class node_trigger,node_scales,node_spinbox toneMint
class node_menu,node_record,node_export toneRose
class node_user,node_external toneIndigo
```

## Components

### Application

- [App window](https://github.com/romanolorenzo/truesignal/blob/main/main.py): `main.py`
- [UI layout](https://github.com/romanolorenzo/truesignal/blob/main/src/ui_interface.py): `src/ui_interface.py`
- [GUI functions](https://github.com/romanolorenzo/truesignal/blob/main/src/Functions.py): `src/Functions.py`
- [JSON themes](https://github.com/romanolorenzo/truesignal/blob/main/json-styles/style.json): `json-styles/style.json`

### Signal and plots

- [Signal source](https://github.com/romanolorenzo/truesignal/blob/main/src/Functions.py): `src/Functions.py`
- [Tabbed views](https://github.com/romanolorenzo/truesignal/blob/main/src/Functions.py): `src/Functions.py`
- [Combined plot](https://github.com/romanolorenzo/truesignal/blob/main/src/OscilloscopeWidget.py): `src/OscilloscopeWidget.py`
- [Channel 1 plot](https://github.com/romanolorenzo/truesignal/blob/main/src/OscilloscopeWidget.py): `src/OscilloscopeWidget.py`
- [Channel 2 plot](https://github.com/romanolorenzo/truesignal/blob/main/src/OscilloscopeWidget.py): `src/OscilloscopeWidget.py`
- [Recording overlay](https://github.com/romanolorenzo/truesignal/blob/main/src/OscilloscopeWidget.py): `src/OscilloscopeWidget.py`

### Controls and analysis

- [Trigger detection](https://github.com/romanolorenzo/truesignal/blob/main/src/trigger_handler.py): `src/trigger_handler.py`
- [Scale controls](https://github.com/romanolorenzo/truesignal/blob/main/src/Functions.py): `src/Functions.py`
- [Stepped spinbox](https://github.com/romanolorenzo/truesignal/blob/main/src/custom_spinbox.py): `src/custom_spinbox.py`

### User actions

- [Menu actions](https://github.com/romanolorenzo/truesignal/blob/main/src/MenuFunctions.py): `src/MenuFunctions.py`
- [Data recording](https://github.com/romanolorenzo/truesignal/blob/main/src/MenuFunctions.py): `src/MenuFunctions.py`
- [Plot export](https://github.com/romanolorenzo/truesignal/blob/main/src/MenuFunctions.py): `src/MenuFunctions.py`

### Other components

- **Operator**
- **USB oscilloscope**

## Connections

- Operator → App window: launches (evidence: `README.md`)
- App window → UI layout: sets up (evidence: `main.py`)
- App window → GUI functions: creates (evidence: `main.py`)
- App window → Menu actions: creates (evidence: `main.py`)
- GUI functions → Signal source: creates (evidence: `src/Functions.py`)
- GUI functions → Tabbed views: builds (evidence: `src/Functions.py`)
- Tabbed views → Combined plot: adds (evidence: `src/Functions.py`)
- Tabbed views → Channel 1 plot: adds (evidence: `src/Functions.py`)
- Tabbed views → Channel 2 plot: adds (evidence: `src/Functions.py`)
- Signal source → Combined plot: emits plot data (evidence: `src/OscilloscopeWidget.py`)
- Signal source → Channel 1 plot: emits plot data (evidence: `src/OscilloscopeWidget.py`)
- Signal source → Channel 2 plot: emits plot data (evidence: `src/OscilloscopeWidget.py`)
- Combined plot → Trigger detection: checks triggers (evidence: `src/OscilloscopeWidget.py`)
- Channel 1 plot → Trigger detection: checks triggers (evidence: `src/OscilloscopeWidget.py`)
- Channel 2 plot → Trigger detection: checks triggers (evidence: `src/OscilloscopeWidget.py`)
- App window → Stepped spinbox: installs (evidence: `main.py`)
- GUI functions → Scale controls: connects controls (evidence: `src/Functions.py`)
- Menu actions → Plot export: exports plots (evidence: `src/MenuFunctions.py`)
- Menu actions → Data recording: records data (evidence: `src/MenuFunctions.py`)
- Operator → Menu actions: selects actions (evidence: `src/MenuFunctions.py`)
- Operator → Scale controls: adjusts display (evidence: `README.md`)
- Operator → Trigger detection: sets trigger (evidence: `README.md`)
- Operator → JSON themes: customizes theme (evidence: `README.md`)
- Operator → Recording overlay: records screen (evidence: `README.md`)
- USB oscilloscope → Signal source: provides samples
