g4display
G4DisplayView Class Reference

A QWidget tab providing controls for Geant4 camera, lighting, slicing, and view styles. More...

#include <g4displayview.h>

Inheritance diagram for G4DisplayView:
Inheritance graph
Collaboration diagram for G4DisplayView:
Collaboration graph

Public Member Functions

 G4DisplayView (GOptions *gopts, std::shared_ptr< GLogger > logger, QWidget *parent=nullptr)
 Constructs the G4DisplayView widget. More...
 
 ~G4DisplayView () override
 Destructor. Logs the destruction event using the provided logger. Qt's parent-child mechanism handles the deletion of child widgets (like QLineEdit, QSlider, etc.) that were created with this as their parent. More...
 

Detailed Description

This widget allows users to interactively change visualization parameters like viewpoint angles, light source direction, apply cutaway planes (slices) to the geometry, and toggle rendering options like hidden lines, anti-aliasing, auxiliary edges, and magnetic field lines. It communicates these changes to Geant4 via the G4UImanager. It is typically added as a tab to the main G4Display widget.

Definition at line 27 of file g4displayview.h.

Constructor & Destructor Documentation

◆ G4DisplayView()

G4DisplayView::G4DisplayView ( GOptions *  gopts,
std::shared_ptr< GLogger >  logger,
QWidget *  parent = nullptr 
)
Parameters
goptsPointer to the GOptions object for initial settings (e.g., camera angles).
loggerPointer to the GLogger instance for logging messages. Must not be null. Passed from parent G4Display.
parentOptional parent QWidget for Qt's memory management.

Retrieves initial camera settings from GOptions, sets up the UI elements (toggle buttons, camera and light direction sliders, slice controls, and field precision input), arranges them with appropriate layouts, and connects UI signals to the corresponding slots.

Parameters
goptsPointer to the GOptions object containing initial configuration.
loggerPointer to the shared GLogger instance for logging.
parentOptional pointer to the parent QWidget.

Definition at line 24 of file g4displayview.cc.

◆ ~G4DisplayView()

G4DisplayView::~G4DisplayView ( )
inlineoverride

Definition at line 44 of file g4displayview.h.


The documentation for this class was generated from the following files: