gui
Loading...
Searching...
No Matches
GemcGUI Class Reference

Main GEMC Qt widget that assembles the GUI layout and connects user actions to event processing. More...

#include <gui.h>

Public Member Functions

 GemcGUI (std::shared_ptr< GOptions > gopts, std::shared_ptr< EventDispenser > ed, GDetectorConstruction *dc, QWidget *parent=nullptr)
 Construct the main GUI widget.
 
 ~GemcGUI () override
 Destroy the GUI widget and release explicitly owned resources.
 

Detailed Description

GemcGUI builds a three-part interface:

  • A left-side button bar (GQTButtonsWidget) that selects the active page.
  • A right-side stacked content area (QStackedWidget) hosting the pages.
  • A top row of run controls (run, cycle, stop, exit) and counters (number of events and event number).

Event execution is delegated to an EventDispenser instance provided by the caller. Page widgets are constructed using shared configuration objects (GOptions, GDetectorConstruction, and GBoard) so that the GUI pages remain synchronized with the simulation configuration.

Note
This class is a QWidget and uses Qt signals/slots (Q_OBJECT).

Definition at line 35 of file gui.h.

Constructor & Destructor Documentation

◆ GemcGUI()

GemcGUI::GemcGUI ( std::shared_ptr< GOptions > gopts,
std::shared_ptr< EventDispenser > ed,
GDetectorConstruction * dc,
QWidget * parent = nullptr )

The constructor:

  • Creates the left-side button bar.
  • Creates a GBoard widget and associates it with a GUI_Session.
  • Creates the right-side page content and installs it into a QStackedWidget.
  • Creates the top run-control buttons and connects signals to the corresponding slots.
  • Initializes a QTimer used for “Cycle” mode.
Parameters
goptsShared options/configuration container used by GUI pages.
edEvent execution backend used to run and configure event processing.
dcDetector construction object used by setup/tree pages.
parentOptional parent widget for Qt ownership.

Definition at line 6 of file gui.cc.

◆ ~GemcGUI()

GemcGUI::~GemcGUI ( )
override

The current implementation explicitly deletes some members. When extending the GUI, keep ownership consistent (Qt parent ownership vs. explicit deletion) for new members.

Definition at line 70 of file gui.cc.


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