g4display
Loading...
Searching...
No Matches
g4displayview.h
Go to the documentation of this file.
1#pragma once
2
3// Qt
4#include <QtWidgets> // Includes necessary Qt Widget headers
5
6// gemc
7#include "glogger.h" // Logging utility
8#include "gQtButtonsWidget.h" // Custom toggle button widget
9
10
22class G4DisplayView : public QWidget {
23 Q_OBJECT // Macro required for signals, slots, and Qt meta-object features
24
25public:
32 G4DisplayView(const std::shared_ptr<GOptions>& gopts, std::shared_ptr<GLogger> logger, QWidget* parent = nullptr);
33
39 ~G4DisplayView() override { log->debug(DESTRUCTOR, "G4DisplayView"); }
40
41private:
42 // --- Member Widgets (Pointers managed by Qt parenting) ---
43
45 QLineEdit* field_npoints;
46
48 GQTToggleButtonWidget* buttons_set1;
49
51 QSlider *cameraTheta;
53 QSlider *cameraPhi;
54
55 QComboBox *thetaDropdown, *phiDropdown;
56 QComboBox *lthetaDropdown, *lphiDropdown;
57 QComboBox *perspectiveDropdown, *precisionDropdown;
58 QComboBox *cullingDropdown, *backgroundColorDropdown;
59
60
61
63 QSlider *lightTheta;
65 QSlider *lightPhi;
66
68 QLineEdit *sliceXEdit;
70 QLineEdit *sliceYEdit;
72 QLineEdit *sliceZEdit;
73
75 QCheckBox *sliceXActi;
77 QCheckBox *sliceYActi;
79 QCheckBox *sliceZActi;
80
82 QCheckBox *sliceXInve;
84 QCheckBox *sliceYInve;
86 QCheckBox *sliceZInve;
87
89 QRadioButton *sliceSectn;
91 QRadioButton *sliceUnion;
92
93 // --- Member Data ---
94
96 int field_NPOINTS = 5;
97
103 std::shared_ptr<GLogger> log;
104
105private slots:
111 void changeCameraDirection();
112
113
114 void setCameraDirection(int which);
115
116
122 void changeLightDirection();
123
124
125 void setLightDirection(int which);
126
127
128
129
130 void set_projection();
131 void set_precision();
132 void set_culling();
133 void set_background();
134
135
136
137
145 void slice();
146
152 void clearSlices();
153
161 void apply_buttons_set1(int index);
162
170 void field_precision_changed();
171};
172
A QWidget tab providing controls for Geant4 camera, lighting, slicing, and view styles.
G4DisplayView(const std::shared_ptr< GOptions > &gopts, std::shared_ptr< GLogger > logger, QWidget *parent=nullptr)
Constructs the G4DisplayView widget.
~G4DisplayView() override
Destructor. Logs the destruction event using the provided logger. Qt's parent-child mechanism handles...