20 #define VP1IMPVARNAME m_d
24 #include "ui_guidelinescontrollerform.h"
25 #include "ui_guides_settings_coordinateaxes_form.h"
26 #include "ui_guides_settings_etacones_form.h"
27 #include "ui_guides_settings_floorandletters_form.h"
28 #include "ui_guides_settings_people_form.h"
29 #include "ui_guides_settings_grid_form.h"
30 #include "ui_guides_settings_idprojsurfs_form.h"
31 #include "ui_guides_settings_trkvolumes_form.h"
32 #include "ui_guides_settings_lines_form.h"
38 #include "GeoModelKernel/Units.h"
39 #define SYSTEM_OF_UNITS GeoModelKernelUnits // --> 'GeoModelKernelUnits::cm'
41 #include "GaudiKernel/SystemOfUnits.h"
42 #define SYSTEM_OF_UNITS Gaudi::Units // --> 'Gaudi::Units::cm'
51 Ui::VP1GuidesControllerForm
ui{};
52 Ui::VP1GuidesSysSettingsCoordinateAxesForm
ui_axes{};
56 Ui::VP1GuidesSysSettingsGridForm
ui_grid{};
61 static SbColor4f
color4f(
const QColor&
col,
int transp_int) {
62 return SbColor4f(std::max<float>(0.0
f,std::min<float>(1.0
f,
col.redF())),
63 std::max<float>(0.0f,std::min<float>(1.0f,
col.greenF())),
64 std::max<float>(0.0f,std::min<float>(1.0f,
col.blueF())),
65 std::max<float>(0.0f,std::min<float>(1.0f,1.0-transp_int/100.0)));
112 static InDetProjFlags::InDetProjPartsFlags
projPartsFlag(
bool barrelinner,
bool barrelouter,
113 bool endcapinner,
bool endcapouter,
114 bool endcap_hidenormalcyls_when_zasr =
false,
115 bool endcap_zasr =
false );
126 m_d->
ui.setupUi(
this);
175 m_d->
ui_people.colorButton_people->setColor(QColor::fromRgbF(0.5,0.5,0.5));
176 m_d->
ui_grid.colorButton_grid->setColor(QColor::fromRgbF(1.0,1.0,1.0));
412 return m_d->
ui.checkBox_floorAndLetters->isChecked() &&
419 return m_d->
ui.checkBox_people->isChecked() &&
457 return m_d->
ui.checkBox_floorAndLetters->isChecked() &&
465 int nmax;
double distmax;
469 message(
"lettersZPos ERROR: Problems calculating floor nmax/distmax.");
490 int nmax;
double distmax;
494 message(
"lettersZPos ERROR: Problems calculating floor nmax/distmax.");
502 return m_d->
ui.checkBox_coordinateAxes->isChecked();
509 (
m_d->
ui_axes.checkBox_axes_shownegativeparts->isChecked()?-1.0:1.0);
523 return m_d->
ui_axes.doubleSpinBox_axes_relthickness->value();
529 return m_d->
ui.checkBox_grid->isChecked() &&
530 m_d->
ui_grid.radioButton_grid_cartesian->isChecked();
536 return m_d->
ui.checkBox_grid->isChecked() &&
537 m_d->
ui_grid.radioButton_grid_cylindrical->isChecked();
561 return m_d->
ui.checkBox_etaCones->isChecked() &&
568 return m_d->
ui.checkBox_etaCones->isChecked() &&
575 return m_d->
ui.checkBox_etaCones->isChecked() &&
601 * (
m_d->
ui_etacones.radioButton_etaconeextentisr->isChecked() ? 1.0 : -1.0);
607 return m_d->
ui.checkBox_lines->isChecked();
629 bool endcapinner,
bool endcapouter,
630 bool endcap_hidenormalcyls_when_zasr,
642 if ( !( endcap_zasr && endcap_hidenormalcyls_when_zasr ) ) {
698 if (ui_idprojsurfs.groupBox_trtproj->isChecked()) {
699 if (ui_idprojsurfs.checkBox_trtprojsurf_parts_asneeded->isChecked()) {
715 if (ui_idprojsurfs.groupBox_sctproj->isChecked()) {
716 if (ui_idprojsurfs.checkBox_sctprojsurf_parts_asneeded->isChecked()) {
732 if (ui_idprojsurfs.groupBox_pixelproj->isChecked()) {
733 if (ui_idprojsurfs.checkBox_pixelprojsurf_parts_asneeded->isChecked()) {
756 return pixelProjParts;
801 const bool e(!
m_d->
ui_idprojsurfs.checkBox_pixelprojsurf_parts_asneeded->isChecked());
830 return m_d->
ui.checkBox_trkVolumes->isChecked();
883 s.save(
m_d->
ui_axes.checkBox_axes_shownegativeparts);
885 s.save(
m_d->
ui_axes.doubleSpinBox_axes_relthickness);
941 s.save(
m_d->
ui.checkBox_coordinateAxes);
942 s.save(
m_d->
ui.checkBox_etaCones);
943 s.save(
m_d->
ui.checkBox_floorAndLetters);
944 s.save(
m_d->
ui.checkBox_grid);
945 s.save(
m_d->
ui.checkBox_inDetProjSurfs);
949 s.save(
m_d->
ui.checkBox_trkVolumes);
960 s.save(
m_d->
ui.checkBox_lines);
967 s.save(
m_d->
ui.checkBox_people);
974 if (
s.version()<0||
s.version()>2) {
975 message(
"Warning: State data in .vp1 file has unsupported version ("+
str(
s.version())+
")");
1007 s.restore(
m_d->
ui_axes.checkBox_axes_shownegativeparts);
1008 s.restore(
m_d->
ui_axes.doubleSpinBox_axes_lengths_m);
1009 s.restore(
m_d->
ui_axes.doubleSpinBox_axes_relthickness);
1010 s.restore(
m_d->
ui_axes.doubleSpinBox_axes_xpos_m);
1011 s.restore(
m_d->
ui_axes.doubleSpinBox_axes_ypos_m);
1012 s.restore(
m_d->
ui_axes.doubleSpinBox_axes_zpos_m);
1014 s.restore(
m_d->
ui_grid.doubleSpinBox_gridspacing);
1065 if (
s.version()>=1) {
1066 s.restore(
m_d->
ui.checkBox_coordinateAxes);
1067 s.restore(
m_d->
ui.checkBox_etaCones);
1068 s.restore(
m_d->
ui.checkBox_floorAndLetters);
1069 s.restore(
m_d->
ui.checkBox_grid);
1070 s.restore(
m_d->
ui.checkBox_inDetProjSurfs);
1073 if (
s.version()>=2) {
1074 s.restore(
m_d->
ui.checkBox_trkVolumes);
1082 if (
s.version()>=3) {
1083 s.restore(
m_d->
ui.checkBox_lines);
1091 if (
s.version()>=3) {
1092 s.restore(
m_d->
ui.checkBox_people);
1121 #define VP1CONTROLLERCLASSNAME GuideSysController