|
g4display
|
The G4Display module provides a Qt-based graphical user interface layer for controlling and interacting with Geant4 visualization from within GEMC. It is designed to expose common viewer controls (camera direction, lighting, scene style toggles, cutaway planes, etc.) through a set of QWidget-based panels.
The module assumes a running Geant4 UI session and communicates with it by sending visualization commands to G4UImanager. These commands are the same as would be used interactively in a Geant4 macro, but are generated in response to GUI events.
The module is primarily composed of:
Several classes in this module are built on top of GEMC base utilities that provide structured logging via Glogger. The logger name for this module is typically "g4display" (see G4DISPLAY_LOGGER).
The conventional meaning of the verbosity levels is:
In a GEMC application, the GUI widget G4Display is instantiated with a shared GOptions instance and embedded into a parent window. Users interact with the GUI controls; the module translates those interactions into Geant4 visualization commands sent via G4UImanager.
The helper G4SceneProperties can be used during initialization to build a consistent default scene and viewer configuration from options.
This module depends on:
Qt6 (Widgets module)Geant4 (UI and visualization)The following example demonstrates how to create a minimal Geant4 visualization environment and optionally attach the G4Display GUI.