g4display
Loading...
Searching...
No Matches
g4displayview.h
Go to the documentation of this file.
1#pragma once
2
13// Qt
14#include <QtWidgets>
15
16// gemc
17#include "glogger.h"
18#include "gQtButtonsWidget.h" // Custom toggle button widget
19
37class G4DisplayView : public QWidget
38{
39 Q_OBJECT
40
41public:
53 G4DisplayView(const std::shared_ptr<GOptions>& gopts,
54 std::shared_ptr<GLogger> logger,
55 QWidget* parent = nullptr);
56
62 ~G4DisplayView() override { log->debug(DESTRUCTOR, "G4DisplayView"); }
63
64private:
65 // --- Member widgets (owned by Qt via parenting) ---
66
68 QLineEdit* field_npoints = nullptr;
69
71 GQTToggleButtonWidget* buttons_set1 = nullptr;
72
74 QSlider* cameraTheta = nullptr;
75 QSlider* cameraPhi = nullptr;
76
78 QComboBox* thetaDropdown = nullptr;
79 QComboBox* phiDropdown = nullptr;
80
82 QComboBox* lthetaDropdown = nullptr;
83 QComboBox* lphiDropdown = nullptr;
84
86 QComboBox* perspectiveDropdown = nullptr;
87 QComboBox* precisionDropdown = nullptr;
88 QComboBox* cullingDropdown = nullptr;
89 QComboBox* backgroundColorDropdown = nullptr;
90
92 QSlider* lightTheta = nullptr;
93 QSlider* lightPhi = nullptr;
94
96 QLineEdit* sliceXEdit = nullptr;
97 QLineEdit* sliceYEdit = nullptr;
98 QLineEdit* sliceZEdit = nullptr;
99
101 QCheckBox* sliceXActi = nullptr;
102 QCheckBox* sliceYActi = nullptr;
103 QCheckBox* sliceZActi = nullptr;
104
106 QCheckBox* sliceXInve = nullptr;
107 QCheckBox* sliceYInve = nullptr;
108 QCheckBox* sliceZInve = nullptr;
109
111 QRadioButton* sliceSectn = nullptr;
112 QRadioButton* sliceUnion = nullptr;
113
114 // --- Member data ---
115
117 int field_NPOINTS = 5;
118
124 std::shared_ptr<GLogger> log;
125
126private slots:
136 void changeCameraDirection();
137
148 void setCameraDirection(int which);
149
159 void changeLightDirection();
160
170 void setLightDirection(int which);
171
181 void set_projection();
182
193 void set_precision();
194
201 void set_culling();
202
211 void set_background();
212
219 void slice();
220
226 void clearSlices();
227
237 void apply_buttons_set1(int index);
238
245 void field_precision_changed();
246};
“View” tab for G4Display.
G4DisplayView(const std::shared_ptr< GOptions > &gopts, std::shared_ptr< GLogger > logger, QWidget *parent=nullptr)
Construct the view-control tab.
~G4DisplayView() override
Destructor.
void debug(debug_type type, Args &&... args) const
DESTRUCTOR