gui
Loading...
Searching...
No Matches
GEMC GUI Module
Top-level GEMC GUI coordination
GEMC graphical interface

Introduction

This module provides the Qt-based graphical user interface for GEMC. The primary entry point is the GemcGUI widget, which builds the application layout and connects UI actions to the EventDispenser so the user can run events interactively and switch between different visualization/configuration pages.

The GUI is a composition of a left-side button bar (page selector), a right-side stacked content area (pages such as display, dialog, setup, and geometry tree), and a bottom board widget for status/controls.

Ownership and lifecycle

  • GemcGUI is a QWidget and participates in Qt parent/child ownership.
  • Most Qt widgets created with this as parent are owned and destroyed by Qt automatically.
  • A subset of widgets are explicitly deleted in ~GemcGUI(); this matches the current implementation. When extending the GUI, prefer a single ownership model (Qt parent ownership or explicit deletion), and keep it consistent for new members.

Architecture

Design notes

  • Layout composition
    • Left pane: a GQTButtonsWidget provides a button list and emits selection changes.
    • Right pane: a QStackedWidget hosts multiple “pages” and is driven by the left pane selection.
    • Top row: run controls (run, cycle, stop) and counters (number of events, current event number).
    • Bottom: a GBoard widget is attached below the main layout.
  • Event execution
    • The GUI delegates event execution to EventDispenser.
    • “Run” executes a batch and then updates the displayed event number.
    • “Cycle” runs one event periodically using a QTimer; “Stop” stops the timer.
  • Page switching
    • The left button widget emits a selection-change signal.
    • A private slot change_page reads the selected index and applies it to the QStackedWidget, updating the visible page.

Available Options and usage

This module does not define a standalone GUI option schema. Instead it consumes:

Module verbosity

The top-level widget has no module-specific logger. Child pages use their own logger categories, including g4display, g4dialog, gtree, and dbselect.

Author
© Maurizio Ungaro
e-mail: ungar.nosp@m.o@jl.nosp@m.ab.or.nosp@m.g