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:

GUI language

Upcoming in the next release: English, Italian, Japanese, French, and Chinese GUI catalogs share the logging language option and automatic system detection. gemc::makeQtApplication installs translators before constructing widgets; pass the GOptions pointer to honor explicit overrides. Restart to change language. Missing translations use English. Qt's installed catalogs translate standard dialogs.

Use complete tr() messages and QString::arg() parameters. Store command identifiers in item data and counters as numeric members, independent of translated labels. SVG captions are translated at runtime. Generated catalogs and the shared cron workflow are documented in translations/gui/README.md.

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