@@ -21,13 +21,13 @@ using namespace gutilities;
2121 * @param logger Pointer to the shared GLogger instance for logging.
2222 * @param parent Optional pointer to the parent QWidget.
2323 */
24- G4DisplayView::G4DisplayView (GOptions* gopts, std::shared_ptr<GLogger> logger, QWidget* parent) : QWidget(parent), log(logger) {
24+ G4DisplayView::G4DisplayView (GOptions* gopts, std::shared_ptr<GLogger> logger, QWidget* parent) : QWidget(parent), log(logger) {
2525 log->debug (CONSTRUCTOR , " G4DisplayView" );
2626
2727 G4Camera jcamera = getG4Camera (gopts);
2828
2929 double thetaValue = getG4Number (jcamera.theta );
30- double phiValue = getG4Number (jcamera.phi );
30+ double phiValue = getG4Number (jcamera.phi );
3131
3232 vector<string> toggle_button_titles;
3333 toggle_button_titles.emplace_back (" Hidden\n Lines" );
@@ -159,8 +159,8 @@ G4DisplayView::G4DisplayView(GOptions* gopts, std::shared_ptr<GLogger> logger,
159159
160160 // slice style: Intersection or Union
161161 QGroupBox* sliceChoiceBox = new QGroupBox (tr (" Slices Style" ));
162- sliceSectn = new QRadioButton (tr (" &Intersection" ), sliceChoiceBox);
163- sliceUnion = new QRadioButton (tr (" &Union" ), sliceChoiceBox);
162+ sliceSectn = new QRadioButton (tr (" &Intersection" ), sliceChoiceBox);
163+ sliceUnion = new QRadioButton (tr (" &Union" ), sliceChoiceBox);
164164 sliceSectn->setChecked (true );
165165
166166 connect (sliceSectn, &QRadioButton::toggled, this , &G4DisplayView::slice);
@@ -186,17 +186,17 @@ G4DisplayView::G4DisplayView(GOptions* gopts, std::shared_ptr<GLogger> logger,
186186 connect (sliceYEdit, &QLineEdit::returnPressed, this , &G4DisplayView::slice);
187187 connect (sliceZEdit, &QLineEdit::returnPressed, this , &G4DisplayView::slice);
188188
189- connect (sliceXActi, &QCheckBox::stateChanged , this , &G4DisplayView::slice);
190- connect (sliceYActi, &QCheckBox::stateChanged , this , &G4DisplayView::slice);
191- connect (sliceZActi, &QCheckBox::stateChanged , this , &G4DisplayView::slice);
189+ connect (sliceXActi, &QCheckBox::checkStateChanged , this , &G4DisplayView::slice);
190+ connect (sliceYActi, &QCheckBox::checkStateChanged , this , &G4DisplayView::slice);
191+ connect (sliceZActi, &QCheckBox::checkStateChanged , this , &G4DisplayView::slice);
192192
193- connect (sliceXInve, &QCheckBox::stateChanged , this , &G4DisplayView::slice);
194- connect (sliceYInve, &QCheckBox::stateChanged , this , &G4DisplayView::slice);
195- connect (sliceZInve, &QCheckBox::stateChanged , this , &G4DisplayView::slice);
193+ connect (sliceXInve, &QCheckBox::checkStateChanged , this , &G4DisplayView::slice);
194+ connect (sliceYInve, &QCheckBox::checkStateChanged , this , &G4DisplayView::slice);
195+ connect (sliceZInve, &QCheckBox::checkStateChanged , this , &G4DisplayView::slice);
196196
197197
198198 QGroupBox* fieldPrecisionBox = new QGroupBox (tr (" Number of Field Points" ));
199- field_npoints = new QLineEdit (QString::number (field_NPOINTS), this );
199+ field_npoints = new QLineEdit (QString::number (field_NPOINTS), this );
200200 field_npoints->setMaximumWidth (40 );
201201
202202 QFont font = field_npoints->font ();
@@ -234,8 +234,8 @@ G4DisplayView::G4DisplayView(GOptions* gopts, std::shared_ptr<GLogger> logger,
234234void G4DisplayView::changeCameraDirection () {
235235 // Construct the command using the current slider values.
236236 string command = " /vis/viewer/set/viewpointThetaPhi " +
237- to_string (cameraTheta->value ()) + " " +
238- to_string (cameraPhi->value ());
237+ to_string (cameraTheta->value ()) + " " +
238+ to_string (cameraPhi->value ());
239239 // Send the command to the Geant4 UImanager.
240240 G4UImanager::GetUIpointer ()->ApplyCommand (command);
241241}
@@ -248,8 +248,8 @@ void G4DisplayView::changeCameraDirection() {
248248 */
249249void G4DisplayView::changeLightDirection () {
250250 string command = " /vis/viewer/set/lightsThetaPhi " +
251- to_string (lightTheta->value ()) + " " +
252- to_string (lightPhi->value ());
251+ to_string (lightTheta->value ()) + " " +
252+ to_string (lightPhi->value ());
253253 G4UImanager::GetUIpointer ()->ApplyCommand (command);
254254}
255255
@@ -280,21 +280,21 @@ void G4DisplayView::slice() {
280280
281281 if (sliceXActi->isChecked ()) {
282282 string command = " /vis/viewer/addCutawayPlane " + sliceXEdit->text ().toStdString () + " 0 0 mm " +
283- to_string (sliceXInve->isChecked () ? -1 : 1 ) + " 0 0 " ;
283+ to_string (sliceXInve->isChecked () ? -1 : 1 ) + " 0 0 " ;
284284 cout << " X " << command << endl;
285285 g4uim->ApplyCommand (command);
286286 }
287287
288288 if (sliceYActi->isChecked ()) {
289289 string command = " /vis/viewer/addCutawayPlane 0 " + sliceYEdit->text ().toStdString () + " 0 mm 0 " +
290- to_string (sliceYInve->isChecked () ? -1 : 1 ) + " 0 " ;
290+ to_string (sliceYInve->isChecked () ? -1 : 1 ) + " 0 " ;
291291 cout << " Y " << command << endl;
292292 g4uim->ApplyCommand (command);
293293 }
294294
295295 if (sliceZActi->isChecked ()) {
296296 string command = " /vis/viewer/addCutawayPlane 0 0 " + sliceZEdit->text ().toStdString () + " mm 0 0 " +
297- to_string (sliceZInve->isChecked () ? -1 : 1 );
297+ to_string (sliceZInve->isChecked () ? -1 : 1 );
298298 cout << " Z " << command << endl;
299299 g4uim->ApplyCommand (command);
300300 }
@@ -382,7 +382,7 @@ void G4DisplayView::field_precision_changed() {
382382 g4uim->ApplyCommand (" /vis/scene/removeModel Field" );
383383
384384 string npoints = to_string (field_NPOINTS);
385- command = string (" /vis/scene/add/magneticField " ) + npoints;
385+ command = string (" /vis/scene/add/magneticField " ) + npoints;
386386 G4UImanager::GetUIpointer ()->ApplyCommand (command);
387387 }
388388}
0 commit comments