Introduction
G4Dialog is a lightweight Qt-based user interface module that provides a convenient front-end for browsing and executing Geant4 UI commands. It is designed to be embedded as a widget inside a Qt application, and it can also be exercised from a standalone example program.
The module currently includes:
- A tabbed widget container (G4Dialog)
- A "Geant4 Commands" tab (G4Commands) featuring:
- A searchable command tree
- Contextual help for the selected command
- A command prompt and history recall
Key features
- Command discovery: browse the
Geant4 command tree and quickly locate commands by filtering.
- Contextual help: view guidance and parameter descriptions for the selected command.
- Command execution: paste a selected command into the prompt and execute it.
- History: avoid retyping by recalling previously executed commands.
Available Options and their usage
This module currently does not define additional module-specific option keys.
Notes:
- The surrounding application may still use global switches/options defined by GOptions(argc,argv,...) (for example
gui, verbosity, and debug) to control whether a Qt event loop is started and how much logging is emitted.
- Visualization-related options are defined by other modules (e.g. g4display) and may be used in the same executable, but they are not consumed directly by this module.
Verbosity and logging
This module follows the GEMC-style logging conventions via GBase/Glogger integration. The logger name for this module is G4DIALOG_LOGGER ("g4dialog").
Typical verbosity expectations:
- info level 0: minimal user-facing lifecycle messages (startup, major mode changes).
- info level 1: additional operational hints (e.g., which UI path is used, configuration echoes).
- info level 2: verbose operational tracing suitable for diagnosing configuration issues.
- debug: detailed diagnostics useful when developing the UI (selection changes, command execution flow, widget-level interactions).
The exact verbosity switches are provided by the surrounding framework (e.g., GOptions).
Examples
The following example(s) are part of this module documentation:
Example: Standalone widget usage
Summary: builds a minimal Geant4 visualization manager and runs G4Dialog either in GUI mode (Qt event loop) or in a command-line-only mode.
Link: g4dialog_example.cc documentation
Snippet:
Main widget for the G4Dialog module.
GOptions defineOptions()
Define the command-line and configuration options for the G4Dialog module.
- Author
© Maurizio Ungaro
e-mail: ungar.nosp@m.o@jl.nosp@m.ab.or.nosp@m.g