ATLAS Offline Software
Loading...
Searching...
No Matches
GeoSysController Class Reference

#include <GeoSysController.h>

Inheritance diagram for GeoSysController:
Collaboration diagram for GeoSysController:

Classes

class  Imp

Public Slots

void toggleDialogState (QObject *widget=0)
void enabledButtonStateChanged ()
void collWidgetContentChanged ()

Signals

void transparencyChanged (float)
void muonChamberAdaptionStyleChanged (VP1GeoFlags::MuonChamberAdaptionStyleFlags)
void showVolumeOutLinesChanged (bool)
void labelsChanged (int)
void labelPosOffsetChanged (QList< int >)
void adaptMuonChambersToEventData ()
void autoAdaptPixelsOrSCT (bool, bool, bool, bool, bool, bool)
void autoAdaptMuonNSW (bool, bool, bool, bool, bool, bool)
void resetSubSystems (VP1GeoFlags::SubSystemFlags)
void autoExpandByVolumeOrMaterialName (bool, QString)
void autoIconifyByVolumeOrMaterialName (bool, QString)
void actionOnAllNonStandardVolumes (bool)
void volumeStateChangeRequested (VolumeHandle *, VP1GeoFlags::VOLSTATE)
void volumeResetRequested (VolumeHandle *)
void saveMaterialsToFile (QString, bool)
void loadMaterialsFromFile (QString)
void dummyUpdateTrigger ()

Public Member Functions

 GeoSysController (IVP1System *sys)
virtual ~GeoSysController ()
void setGeometrySelectable (bool)
void setZoomToVolumeOnClick (bool)
void setOrientViewToMuonChambersOnClick (bool)
void setAutoAdaptMuonChambersToEventData (bool)
void setComplexity (double)
void setLabelsEnabled (bool t0s, bool hits)
 controls whether the checkboxes are enabled or not.
void actualRestoreSettings (VP1Deserialise &)
int currentSettingsVersion () const
void actualSaveSettings (VP1Serialise &) const
void setLastSelectedVolume (VolumeHandle *)
VolumeHandlelastSelectedVolume () const
QCheckBox * subSystemCheckBox (VP1GeoFlags::SubSystemFlag) const
SoGroup * drawOptions () const
SoPickStyle * pickStyle () const
VP1GeoTreeViewvolumeTreeBrowser () const
PhiSectionWidgetphiSectionWidget () const
ZappedVolumeListModelzappedVolumeListModel () const
bool printInfoOnClick_Shape () const
bool printInfoOnClick_Material () const
bool printInfoOnClick_CopyNumber () const
bool printInfoOnClick_Transform () const
bool printInfoOnClick_Tree () const
bool printInfoOnClick_Mass () const
bool printInfoOnClick_MuonStationInfo () const
bool orientViewToMuonChambersOnClick () const
bool zoomToVolumeOnClick () const
bool autoAdaptMuonChambersToEventData () const
float transparency () const
VP1GeoFlags::MuonChamberAdaptionStyleFlags muonChamberAdaptionStyle () const
bool showVolumeOutLines () const
int labels () const
QList< int > labelPosOffset ()
 Offset in x,y,z.
void initLastVars ()
QByteArray saveSettings () const
void restoreSettings (const QByteArray &)
void setSystemBasePointer (IVP1System *sys)
void message (const QString &) const
void message (const QStringList &, const QString &addtoend="") const
void message (const QString &addtostart, const QStringList &, const QString &addtoend="") const
void messageDebug (const QString &) const
void messageDebug (const QStringList &, const QString &addtoend="") const
void messageDebug (const QString &addtostart, const QStringList &, const QString &addtoend="") const
void messageVerbose (const QString &) const
void messageVerbose (const QStringList &, const QString &addtoend="") const
void messageVerbose (const QString &addtostart, const QStringList &, const QString &addtoend="") const
IVP1SystemsystemBase () const
const QString & helperClassName () const

Static Public Member Functions

static void setCustomTourEditor (VP1CustomTourEditor *editor)
static VP1CustomTourEditorcustomTourEditor ()
static bool verbose ()
static void warnUndeletedInstances ()
static QString str (const QString &s)
static QString str (const char *c)
static QString str (const bool b)
static QString str (const QColor &)
static QString str (const SbColor &)
static QString str (const VP1Interval &)
static QString str (const SbVec2d &)
static QString str (const SbVec2f &)
static QString str (const SbVec2s &)
static QString str (const SbVec3d &)
static QString str (const SbVec3f &)
static QString str (const SbVec3s &)
static QString str (const SbVec4d &)
static QString str (const SbVec4f &)
static QString str (short int n)
static QString str (unsigned short int n)
static QString str (long n)
static QString str (ulong n)
static QString str (int n)
static QString str (uint n)
static QString str (qlonglong n)
static QString str (qulonglong n)
static QString str (const double &d)
static QString str (const float &f)
static QString str (const void *)
template<class T>
static QString str (const T *t)
template<class T>
static QString str (const QFlags< T > &f)
template<class T>
static QString str (const HepGeom::BasicVector3D< T > &t)
static QString str (const Amg::Vector3D &t)
template<class T>
static QString str (const QList< T > &t)

Protected Slots

void testForChanges ()

Protected Member Functions

template<class T>
bool changed (T &lastval, const T &newval)
template<class T>
void initDialog (T &theUI, QPushButton *launchbutton, QAbstractButton *enabledButton=0)
void initDialog (std::unique_ptr< QWidget > dialog, QPushButton *launchbutton, QPushButton *closebutton, QAbstractButton *enabledButton=0)
void setupCollWidgetInScrollArea (QScrollArea *scrollarea, VP1CollectionWidget *collWidget)
const char * addUpdateSlot (const char *slot)
void connectToLastUpdateSlot (QObject *sender, const char *signal)
void connectToLastUpdateSlot (QCheckBox *)
void connectToLastUpdateSlot (QComboBox *)
void connectToLastUpdateSlot (QGroupBox *)
void connectToLastUpdateSlot (QSpinBox *)
void connectToLastUpdateSlot (QDoubleSpinBox *)
void connectToLastUpdateSlot (QRadioButton *)
void connectToLastUpdateSlot (QButtonGroup *)
void connectToLastUpdateSlot (QSlider *)
void connectToLastUpdateSlot (VP1ColorSelectButton *)
bool initVarsMode () const
QButtonGroup * defineRadioButtonGroup (QRadioButton *rb0, QRadioButton *rb1, QRadioButton *rb2=0, QRadioButton *rb3=0, QRadioButton *rb4=0, QRadioButton *rb5=0, QRadioButton *rb6=0, QRadioButton *rb7=0, QRadioButton *rb8=0, QRadioButton *rb9=0)
QButtonGroup * defineRadioButtonGroup (const QList< QRadioButton * > &)
SoMaterial * getMaterial (VP1MaterialButton *) const
SoMaterial * fallBackMaterial () const
void setHelperClassName (const QString &n)

Static Protected Member Functions

template<class T>
static QString toString (const T &par)
static QString toString (const bool &par)
static QString toString (const QList< VP1Interval > &l)
static QString toString (SbColor4f)

Private Slots

void possibleChange_transparency ()
void possibleChange_muonChamberAdaptionStyle ()
void possibleChange_showVolumeOutLines ()
void updatePickStyle ()
void saveMaterialsRequested ()
void loadMaterialsRequested ()
void emit_adaptMuonChambersToEventData ()
void emit_autoAdaptPixelsOrSCT ()
void emit_autoAdaptMuonNSW ()
void emit_autoExpandByVolumeOrMaterialName ()
void emit_autoIconifyByVolumeOrMaterialName ()
void emit_actionOnAllNonStandardVolumes ()
void emit_resetSubSystems ()
 Reset to the sub-system top volume.
void possibleChange_labels ()
void possibleChange_labelPosOffset ()

Private Attributes

Impm_d
bool m_initVarsMode
QString m_helpername
IVP1Systemm_system

Static Private Attributes

static VP1CustomTourEditorm_customTourEditor =0
static const bool s_vp1verbose = VP1QtUtils::environmentVariableIsOn("VP1_VERBOSE_OUTPUT")

Detailed Description

Definition at line 29 of file GeoSysController.h.

Constructor & Destructor Documentation

◆ GeoSysController()

GeoSysController::GeoSysController ( IVP1System * sys)

Definition at line 71 of file GeoSysController.cxx.

72 : VP1Controller(sys,"GeoSysController"), m_d(new Imp)
73{
74 m_d->theclass = this;
75 m_d->ui.setupUi(this);
76
77 initDialog(m_d->ui_disp, m_d->ui.pushButton_settings_display);
78 initDialog(m_d->ui_iconisedvols, m_d->ui.pushButton_settings_iconisedvols);
79 initDialog(m_d->ui_int, m_d->ui.pushButton_settings_interactions);
80 initDialog(m_d->ui_misc, m_d->ui.pushButton_settings_misc);
81 initDialog(m_d->ui_muon, m_d->ui.pushButton_settings_muonchambers);
82 initDialog(m_d->ui_treebrowser, m_d->ui.pushButton_settings_treebrowser);
83
84 // m_d->ui_disp.widget_drawOptions->setLineWidthsDisabled();
85 m_d->ui_disp.widget_drawOptions->setPointSizesDisabled();
86// m_d->ui_disp.widget_drawOptions->setBaseLightingDisabled();
87 m_d->ui_disp.widget_drawOptions->setComplexity(0.6);
88
89 m_d->pickStyle = new SoPickStyle;
90 m_d->pickStyle->ref();
91
92 #ifndef BUILDVP1LIGHT
93 //Possibly hide parts of gui, depending on job configuration:
95 m_d->ui.groupBox_innerdetector->setVisible(false);
96 m_d->ui.groupBox_calorimeters->setVisible(false);
97 m_d->ui.groupBox_muonsystems->setVisible(false);
98 m_d->ui.pushButton_settings_muonchambers->setEnabled(false);
99 m_d->ui_misc.groupBox_pixelactivemodules->setVisible(false);
100 m_d->ui_misc.groupBox_sctactivemodules->setVisible(false);
101 m_d->ui.groupBox_misc->setVisible(false);
102 m_d->ui_muon.groupBox_muonchamberconfig->setVisible(false);
103 m_d->ui_misc.groupBox_show_NSW_chambers->setVisible(false);
104 m_d->ui_int.checkBox_AutomaticMuonChamberEndViews->setVisible(false);
105 message("GeoModel not properly initialised.");
106 } else {
107 m_d->ui.groupBox_innerdetector->setVisible(VP1JobConfigInfo::hasPixelGeometry()
112 m_d->ui_misc.groupBox_pixelactivemodules->setVisible(VP1JobConfigInfo::hasPixelGeometry() || VP1JobConfigInfo::hasITkGeometry() );
113 m_d->ui_misc.groupBox_sctactivemodules->setVisible(VP1JobConfigInfo::hasSCTGeometry() || VP1JobConfigInfo::hasITkGeometry() );
114 m_d->ui.groupBox_calorimeters->setVisible(VP1JobConfigInfo::hasLArGeometry()
116 m_d->ui.groupBox_muonsystems->setVisible(VP1JobConfigInfo::hasMuonGeometry());
117 m_d->ui.pushButton_settings_muonchambers->setEnabled(VP1JobConfigInfo::hasMuonGeometry());
118 m_d->ui_int.checkBox_print_muonstationinfo->setVisible(VP1JobConfigInfo::hasMuonGeometry());
119 m_d->ui_muon.groupBox_muonchamberconfig->setVisible(VP1JobConfigInfo::hasMuonGeometry());
120 m_d->ui_misc.groupBox_show_NSW_chambers->setVisible(VP1JobConfigInfo::hasMuonNSWGeometry());
121 m_d->ui_int.checkBox_AutomaticMuonChamberEndViews->setVisible(VP1JobConfigInfo::hasMuonGeometry());
122 }
123 #endif
124
125
126 m_d->zappedVolumeListModel = new ZappedVolumeListModel(m_d->ui_iconisedvols.listView_iconisedvolumes);
127 m_d->ui_iconisedvols.listView_iconisedvolumes->setUniformItemSizes(true);
128 m_d->ui_iconisedvols.listView_iconisedvolumes->setSelectionMode(QAbstractItemView::ExtendedSelection);
129 m_d->ui_iconisedvols.listView_iconisedvolumes->setModel(m_d->zappedVolumeListModel);
130
131 connect(m_d->ui_iconisedvols.listView_iconisedvolumes,SIGNAL(activated(const QModelIndex&)),
132 m_d->zappedVolumeListModel,SLOT(activated(const QModelIndex&)));
133
135 // Setup connections which monitor changes in the controller so that we may emit signals as appropriate: //
137
139 connectToLastUpdateSlot(m_d->ui_int.checkBox_geomselectable);
140
142 connectToLastUpdateSlot(m_d->ui_disp.checkBox_showVolumeOutLines);
143
145 connectToLastUpdateSlot(m_d->ui_disp.spinBox_transp);
146
148 connectToLastUpdateSlot(m_d->ui_muon.checkBox_muonadapt_openmdtchambers);
149 connectToLastUpdateSlot(m_d->ui_muon.checkBox_muonadapt_hidetubes);
150 connectToLastUpdateSlot(m_d->ui_muon.checkBox_muonadapt_hiderpcvolumes);
151 connectToLastUpdateSlot(m_d->ui_muon.checkBox_muonadapt_opencscchambers);
152 connectToLastUpdateSlot(m_d->ui_muon.checkBox_muonadapt_opentgcchambers);
153
154 initLastVars();
155
156 //Connections for state-less signals:
157
158 connect(m_d->ui_disp.pushButton_saveChangedMaterials,SIGNAL(clicked()),this,SLOT(saveMaterialsRequested()));
159 connect(m_d->ui_disp.pushButton_loadMaterials,SIGNAL(clicked()),this,SLOT(loadMaterialsRequested()));
160
161 connect(m_d->ui_misc.pushButton_nonStandardShapes_Iconify,SIGNAL(clicked()),
163 connect(m_d->ui_misc.pushButton_nonStandardShapes_Expand,SIGNAL(clicked()),
165
166 // Expand volumes based on Material
167 connect(m_d->ui_misc.lineEdit_expand_vols_matname,SIGNAL(returnPressed()),this,SLOT(emit_autoExpandByVolumeOrMaterialName()));
168 connect(m_d->ui_misc.pushButton_expand_vols_matname,SIGNAL(clicked()),this,SLOT(emit_autoExpandByVolumeOrMaterialName()));
169
170 // Expand volumes based on Name
171 connect(m_d->ui_misc.lineEdit_expand_vols_volname,SIGNAL(returnPressed()),this,SLOT(emit_autoExpandByVolumeOrMaterialName()));
172 connect(m_d->ui_misc.pushButton_expand_vols_volname,SIGNAL(clicked()),this,SLOT(emit_autoExpandByVolumeOrMaterialName()));
173
174 // Iconify/Zap volumes based on Name
175 connect(m_d->ui_misc.lineEdit_iconify_vols_volname,SIGNAL(returnPressed()),this,SLOT(emit_autoIconifyByVolumeOrMaterialName()));
176 connect(m_d->ui_misc.pushButton_iconify_vols_volname,SIGNAL(clicked()),this,SLOT(emit_autoIconifyByVolumeOrMaterialName()));
177
178 connect(m_d->ui_muon.pushButton_muonadapt_adapttoevtdata,SIGNAL(clicked()),this,SLOT(emit_adaptMuonChambersToEventData()));
179
180 connect(m_d->ui_misc.toolButton_pixelmod_adapt,SIGNAL(clicked(bool)),this,SLOT(emit_autoAdaptPixelsOrSCT()));
181 connect(m_d->ui_misc.toolButton_sctmod_adapt,SIGNAL(clicked(bool)),this,SLOT(emit_autoAdaptPixelsOrSCT()));
182
183 connect(m_d->ui_misc.toolButton_nswchambers_adapt,SIGNAL(clicked(bool)),this,SLOT(emit_autoAdaptMuonNSW()));
184 connect(m_d->ui_misc.toolButton_nswchambers_reset,SIGNAL(clicked(bool)),this,SLOT(emit_autoAdaptMuonNSW()));
185
186 connect(m_d->ui_misc.toolButton_pixelmod_reset,SIGNAL(clicked(bool)),this,SLOT(emit_resetSubSystems()));
187 connect(m_d->ui_misc.toolButton_sctmod_reset,SIGNAL(clicked(bool)),this,SLOT(emit_resetSubSystems()));
188 connect(m_d->ui_muon.pushButton_muonadapt_resetToAllChambers,SIGNAL(clicked()),this,SLOT(emit_resetSubSystems()));
189
191
192 // INNER DETECTOR
193 m_d->subSysCheckBoxMap[VP1GeoFlags::Pixel] = m_d->ui.checkBox_Pixel;
194 m_d->subSysCheckBoxMap[VP1GeoFlags::SCT] = m_d->ui.checkBox_SCT;
195 m_d->subSysCheckBoxMap[VP1GeoFlags::TRT] = m_d->ui.checkBox_TRT;
196 m_d->subSysCheckBoxMap[VP1GeoFlags::InDetServMat] = m_d->ui.checkBox_InDetServMat;
197 // Phase-II
198 m_d->subSysCheckBoxMap[VP1GeoFlags::ITkPixel] = m_d->ui.checkBox_ITkPixel;
199 m_d->subSysCheckBoxMap[VP1GeoFlags::ITkStrip] = m_d->ui.checkBox_ITkStrip;
200
201 // CALO
202 m_d->subSysCheckBoxMap[VP1GeoFlags::LAr] = m_d->ui.checkBox_LAr;
203 m_d->subSysCheckBoxMap[VP1GeoFlags::Tile] = m_d->ui.checkBox_Tile;
204
205 // MUON TOROID
206 m_d->subSysCheckBoxMap[VP1GeoFlags::BarrelToroid] = m_d->ui.checkBox_MuonBarrelToroid;
207 m_d->subSysCheckBoxMap[VP1GeoFlags::ToroidECA] = m_d->ui.checkBox_MuonECAToroid;
208 // m_d->subSysCheckBoxMap[VP1GeoFlags::ToroidECC] = m_d->ui.checkBox_MuonECCToroid;
209 // MUON MISC
210 m_d->subSysCheckBoxMap[VP1GeoFlags::MuonFeet] = m_d->ui.checkBox_MuonFeet;
211 m_d->subSysCheckBoxMap[VP1GeoFlags::MuonShielding] = m_d->ui.checkBox_MuonShielding;
212 m_d->subSysCheckBoxMap[VP1GeoFlags::MuonToroidsEtc] = m_d->ui.checkBox_MuonEtc; // this is the "Services" checkbox in the GUI
213 // MUON CHAMBERS
214 m_d->subSysCheckBoxMap[VP1GeoFlags::MuonEndcapStationCSC] = m_d->ui.checkBox_MuonEndcapStationCSC;
215 m_d->subSysCheckBoxMap[VP1GeoFlags::MuonEndcapStationTGC] = m_d->ui.checkBox_MuonEndcapStationTGC;
216 m_d->subSysCheckBoxMap[VP1GeoFlags::MuonEndcapStationMDT] = m_d->ui.checkBox_MuonEndcapStationMDT;
217 m_d->subSysCheckBoxMap[VP1GeoFlags::MuonEndcapStationNSW] = m_d->ui.checkBox_NSW;
218 m_d->subSysCheckBoxMap[VP1GeoFlags::MuonBarrelStationInner] = m_d->ui.checkBox_MuonBarrelStationInner;
219 m_d->subSysCheckBoxMap[VP1GeoFlags::MuonBarrelStationMiddle] = m_d->ui.checkBox_MuonBarrelStationMiddle;
220 m_d->subSysCheckBoxMap[VP1GeoFlags::MuonBarrelStationOuter] = m_d->ui.checkBox_MuonBarrelStationOuter;
221
222 // MISCELLANEOUS
223 m_d->subSysCheckBoxMap[VP1GeoFlags::CavernInfra] = m_d->ui.checkBox_CavernInfra;
224 m_d->subSysCheckBoxMap[VP1GeoFlags::BeamPipe] = m_d->ui.checkBox_BeamPipe;
225 m_d->subSysCheckBoxMap[VP1GeoFlags::LUCID] = m_d->ui.checkBox_LUCID;
226 m_d->subSysCheckBoxMap[VP1GeoFlags::ZDC] = m_d->ui.checkBox_ZDC;
227 m_d->subSysCheckBoxMap[VP1GeoFlags::ALFA] = m_d->ui.checkBox_ALFA;
228 m_d->subSysCheckBoxMap[VP1GeoFlags::AFP] = m_d->ui.checkBox_AFP;
229 m_d->subSysCheckBoxMap[VP1GeoFlags::ForwardRegion] = m_d->ui.checkBox_ForwardRegion;
230 // OTHER
231 m_d->subSysCheckBoxMap[VP1GeoFlags::AllUnrecognisedVolumes] = m_d->ui.checkBox_other;
232
233 // -> labels
235 connectToLastUpdateSlot(m_d->ui_disp.groupBox_labels);
236 connectToLastUpdateSlot(m_d->ui_disp.checkBox_labels_names);
237 connectToLastUpdateSlot(m_d->ui_disp.checkBox_labels_mooret0s);
238 connectToLastUpdateSlot(m_d->ui_disp.checkBox_labels_mboyt0s);
239 connectToLastUpdateSlot(m_d->ui_disp.checkBox_labels_hits);
240
242 connectToLastUpdateSlot(m_d->ui_disp.horizontalSlider_labels_xOffset);
243 connectToLastUpdateSlot(m_d->ui_disp.horizontalSlider_labels_yOffset);
244 connectToLastUpdateSlot(m_d->ui_disp.horizontalSlider_labels_zOffset);
245
246 m_d->last_labels=0;
247}
void possibleChange_labels()
void possibleChange_muonChamberAdaptionStyle()
void emit_resetSubSystems()
Reset to the sub-system top volume.
void emit_autoIconifyByVolumeOrMaterialName()
void emit_actionOnAllNonStandardVolumes()
void possibleChange_transparency()
void possibleChange_showVolumeOutLines()
void possibleChange_labelPosOffset()
void setLastSelectedVolume(VolumeHandle *)
void emit_adaptMuonChambersToEventData()
void emit_autoExpandByVolumeOrMaterialName()
void initDialog(T &theUI, QPushButton *launchbutton, QAbstractButton *enabledButton=0)
void connectToLastUpdateSlot(QObject *sender, const char *signal)
const char * addUpdateSlot(const char *slot)
VP1Controller(IVP1System *sys, const QString &classname)
@ MuonEndcapStationTGC
Definition VP1GeoFlags.h:47
@ AllUnrecognisedVolumes
Definition VP1GeoFlags.h:73
@ MuonEndcapStationNSW
Definition VP1GeoFlags.h:65
@ MuonBarrelStationInner
Definition VP1GeoFlags.h:42
@ MuonBarrelStationMiddle
Definition VP1GeoFlags.h:44
@ MuonBarrelStationOuter
Definition VP1GeoFlags.h:45
@ MuonEndcapStationCSC
Definition VP1GeoFlags.h:46
@ MuonEndcapStationMDT
Definition VP1GeoFlags.h:49
void message(const QString &) const
static bool hasTileGeometry()
static bool hasTRTGeometry()
static bool hasInDetServiceMaterialGeometry()
static bool hasMuonNSWGeometry()
static bool hasLArGeometry()
static bool hasGeoModelExperiment()
static bool hasPixelGeometry()
static bool hasSCTGeometry()
static bool hasITkGeometry()
static bool hasMuonGeometry()

◆ ~GeoSysController()

GeoSysController::~GeoSysController ( )
virtual

Definition at line 250 of file GeoSysController.cxx.

251{
252 m_d->pickStyle->unref();
253 delete m_d;
254}

Member Function Documentation

◆ actionOnAllNonStandardVolumes

void GeoSysController::actionOnAllNonStandardVolumes ( bool )
signal

◆ actualRestoreSettings()

void GeoSysController::actualRestoreSettings ( VP1Deserialise & s)
virtual

Implements VP1Controller.

Definition at line 718 of file GeoSysController.cxx.

719{
720 if (s.version()<0||s.version()>currentSettingsVersion()) {
721 message("Warning: State data in .vp1 file has unsupported version ("+str(s.version())+")");
722 return;
723 }
724
725 if (s.version()<=1) {
726 s.ignoreObsoletePhiSectionWidgetState();
727 s.ignoreWidget(m_d->ui_disp.phisectionwidget);
728 } else {
729 s.restore(m_d->ui_disp.phisectionwidget);
730 }
731 s.restore(m_d->ui_disp.spinBox_transp);
732 s.restore(m_d->ui_muon.checkBox_muonadapt_autoadapt);
733 s.restore(m_d->ui_muon.checkBox_muonadapt_openmdtchambers);
734 s.restore(m_d->ui_muon.checkBox_muonadapt_hidetubes);
735 s.restore(m_d->ui_muon.checkBox_muonadapt_hiderpcvolumes);
736 s.restore(m_d->ui_muon.checkBox_muonadapt_opencscchambers);
737 s.restore(m_d->ui_muon.checkBox_muonadapt_opentgcchambers);
738 s.restore(m_d->ui_misc.checkBox_pixelmod_barrel);
739 s.restore(m_d->ui_misc.checkBox_pixelmod_endcapA);
740 s.restore(m_d->ui_misc.checkBox_pixelmod_endcapC);
741 s.restore(m_d->ui_misc.checkBox_sctmod_barrel);
742 s.restore(m_d->ui_misc.checkBox_sctmod_endcapA);
743 s.restore(m_d->ui_misc.checkBox_sctmod_endcapC);
744 s.restore(m_d->ui_disp.widget_drawOptions);
745 s.restore(m_d->ui_misc.lineEdit_expand_vols_matname);
746 s.restore(m_d->ui_misc.lineEdit_expand_vols_volname);
747 s.restore(m_d->ui_int.checkBox_geomselectable);
748 s.restore(m_d->ui_int.checkBox_print_shape);
749 s.restore(m_d->ui_int.checkBox_print_material);
750 s.restore(m_d->ui_int.checkBox_print_transform);
751 s.restore(m_d->ui_int.checkBox_print_mass);
752 s.restore(m_d->ui_int.checkBox_print_copyno);
753 s.restore(m_d->ui_int.checkBox_print_tree);
754 s.restore(m_d->ui_int.checkBox_print_muonstationinfo);
755 s.restore(m_d->ui_int.checkBox_zoomToVolumes);
756 s.restore(m_d->ui_int.checkBox_AutomaticMuonChamberEndViews);
757 if (s.version()>=1)
758 s.restore(m_d->ui_disp.checkBox_showVolumeOutLines);
759
760 if (s.version()>=3) {
761 s.restore(m_d->ui_misc.checkBox_bcmMod_Aside);
762 s.restore(m_d->ui_misc.checkBox_bcmMod_Cside);
763 }
764
765 // labels
766 if (s.version()>=4){
767 s.restore(m_d->ui_disp.groupBox_labels);
768 s.restore(m_d->ui_disp.horizontalSlider_labels_xOffset);
769 s.restore(m_d->ui_disp.horizontalSlider_labels_yOffset);
770 s.restore(m_d->ui_disp.horizontalSlider_labels_zOffset);
771 s.restore(m_d->ui_disp.checkBox_labels_names);
772 }
773 if (s.version()>=5){
774 s.restore(m_d->ui_disp.checkBox_labels_mboyt0s);
775 s.restore(m_d->ui_disp.checkBox_labels_mooret0s);
776 s.restore(m_d->ui_disp.checkBox_labels_hits);
777 }
778 if (s.version()>=6){
779 s.restore(m_d->ui_misc.checkBox_NSW_MM);
780 s.restore(m_d->ui_misc.checkBox_NSW_sTGC);
781 s.restore(m_d->ui_misc.checkBox_NSW_Passive_Spacer);
782 s.restore(m_d->ui_misc.checkBox_NSW_Passive_Structure);
783 s.restore(m_d->ui_misc.checkBox_NSW_Passive_APlate);
784 }
785
786 s.ignoreWidget(m_d->ui_disp.matButton_lastSel);
787 std::map<VP1GeoFlags::SubSystemFlag,QCheckBox*>::const_iterator it,itE(m_d->subSysCheckBoxMap.end());
788 for (it=m_d->subSysCheckBoxMap.begin();it!=itE;++it)
789 s.ignoreWidget(it->second);
790
791 m_d->ui_int.groupBox_printOnSelection->setEnabled(m_d->ui_int.checkBox_geomselectable->isChecked());
792 m_d->ui_int.groupBox_automaticViewReorientations->setEnabled(m_d->ui_int.checkBox_geomselectable->isChecked());
793
794}
int currentSettingsVersion() const
static QString str(const QString &s)
Definition VP1String.h:49

◆ actualSaveSettings()

void GeoSysController::actualSaveSettings ( VP1Serialise & s) const
virtual

Implements VP1Controller.

Definition at line 660 of file GeoSysController.cxx.

661{
662 s.save(m_d->ui_disp.phisectionwidget);//version <=1 saved in old format
663 s.save(m_d->ui_disp.spinBox_transp);
664 s.save(m_d->ui_muon.checkBox_muonadapt_autoadapt);
665 s.save(m_d->ui_muon.checkBox_muonadapt_openmdtchambers);
666 s.save(m_d->ui_muon.checkBox_muonadapt_hidetubes);
667 s.save(m_d->ui_muon.checkBox_muonadapt_hiderpcvolumes);
668 s.save(m_d->ui_muon.checkBox_muonadapt_opencscchambers);
669 s.save(m_d->ui_muon.checkBox_muonadapt_opentgcchambers);
670 s.save(m_d->ui_misc.checkBox_pixelmod_barrel);
671 s.save(m_d->ui_misc.checkBox_pixelmod_endcapA);
672 s.save(m_d->ui_misc.checkBox_pixelmod_endcapC);
673 s.save(m_d->ui_misc.checkBox_sctmod_barrel);
674 s.save(m_d->ui_misc.checkBox_sctmod_endcapA);
675 s.save(m_d->ui_misc.checkBox_sctmod_endcapC);
676 s.save(m_d->ui_disp.widget_drawOptions);
677 s.save(m_d->ui_misc.lineEdit_expand_vols_matname);
678 s.save(m_d->ui_misc.lineEdit_expand_vols_volname);
679 s.save(m_d->ui_int.checkBox_geomselectable);
680 s.save(m_d->ui_int.checkBox_print_shape);
681 s.save(m_d->ui_int.checkBox_print_material);
682 s.save(m_d->ui_int.checkBox_print_transform);
683 s.save(m_d->ui_int.checkBox_print_mass);
684 s.save(m_d->ui_int.checkBox_print_copyno);
685 s.save(m_d->ui_int.checkBox_print_tree);
686 s.save(m_d->ui_int.checkBox_print_muonstationinfo);
687 s.save(m_d->ui_int.checkBox_zoomToVolumes);
688 s.save(m_d->ui_int.checkBox_AutomaticMuonChamberEndViews);
689 s.save(m_d->ui_disp.checkBox_showVolumeOutLines);//version 1+
690 s.save(m_d->ui_misc.checkBox_bcmMod_Aside);//version 3+
691 s.save(m_d->ui_misc.checkBox_bcmMod_Cside);//version 3+
692
693 // labels - version 4+
694 s.save(m_d->ui_disp.groupBox_labels);
695 s.save(m_d->ui_disp.horizontalSlider_labels_xOffset);
696 s.save(m_d->ui_disp.horizontalSlider_labels_yOffset);
697 s.save(m_d->ui_disp.horizontalSlider_labels_zOffset);
698 s.save(m_d->ui_disp.checkBox_labels_names);
699 //version 5+
700 s.save(m_d->ui_disp.checkBox_labels_mboyt0s);
701 s.save(m_d->ui_disp.checkBox_labels_mooret0s);
702 s.save(m_d->ui_disp.checkBox_labels_hits);
703 // version >=6
704 s.save(m_d->ui_misc.checkBox_NSW_MM);
705 s.save(m_d->ui_misc.checkBox_NSW_sTGC);
706 s.save(m_d->ui_misc.checkBox_NSW_Passive_Spacer);
707 s.save(m_d->ui_misc.checkBox_NSW_Passive_Structure);
708 s.save(m_d->ui_misc.checkBox_NSW_Passive_APlate);
709
710
711 s.ignoreWidget(m_d->ui_disp.matButton_lastSel);
712 std::map<VP1GeoFlags::SubSystemFlag,QCheckBox*>::const_iterator it,itE(m_d->subSysCheckBoxMap.end());
713 for (it=m_d->subSysCheckBoxMap.begin();it!=itE;++it)
714 s.ignoreWidget(it->second);
715}

◆ adaptMuonChambersToEventData

void GeoSysController::adaptMuonChambersToEventData ( )
signal

◆ addUpdateSlot()

const char * VP1Controller::addUpdateSlot ( const char * slot)
protectedinherited

Definition at line 320 of file VP1Controller.cxx.

321{
322 messageVerbose("Adding update slot: "+QString(slot));
323 connect(this,SIGNAL(dummyUpdateTrigger()),this,slot);
324 m_d->lastUpdateSlot = slot;
325 return slot;
326}
void dummyUpdateTrigger()
void messageVerbose(const QString &) const

◆ autoAdaptMuonChambersToEventData()

bool GeoSysController::autoAdaptMuonChambersToEventData ( ) const

Definition at line 446 of file GeoSysController.cxx.

447{
448 return m_d->ui_muon.checkBox_muonadapt_autoadapt->isChecked();
449}

◆ autoAdaptMuonNSW

void GeoSysController::autoAdaptMuonNSW ( bool ,
bool ,
bool ,
bool ,
bool ,
bool  )
signal

◆ autoAdaptPixelsOrSCT

void GeoSysController::autoAdaptPixelsOrSCT ( bool ,
bool ,
bool ,
bool ,
bool ,
bool  )
signal

◆ autoExpandByVolumeOrMaterialName

void GeoSysController::autoExpandByVolumeOrMaterialName ( bool ,
QString  )
signal

◆ autoIconifyByVolumeOrMaterialName

void GeoSysController::autoIconifyByVolumeOrMaterialName ( bool ,
QString  )
signal

◆ changed()

template<class T>
bool VP1Controller::changed ( T & lastval,
const T & newval )
protectedinherited

Definition at line 152 of file VP1Controller.h.

153{
154 if (initVarsMode()) {
155 lastval=newval;
156 return false;
157 }
158 if (lastval==newval)
159 return false;
160 lastval = newval;
161 return true;
162}
bool initVarsMode() const

◆ collWidgetContentChanged

void VP1Controller::collWidgetContentChanged ( )
slotinherited

Definition at line 234 of file VP1Controller.cxx.

235{
236 if (sender()!=m_d->collWidget||!m_d->collWidget) {
237 message("ERROR: Unexpected signal in collWidgetContentChanged slot!!");
238 return;
239 }
240 QScrollArea* scrollarea = dynamic_cast<QScrollArea*>(m_d->collWidget->parent());
241 if (!scrollarea&&m_d->collWidget->parent())
242 scrollarea = dynamic_cast<QScrollArea*>(m_d->collWidget->parent()->parent());
243 if (!scrollarea) {
244 message("ERROR: m_d->collWidget not child or grandchild of a scroll area!!");
245 return;
246 }
247 int width = m_d->collWidget->appropriateFixedWidth();
248 m_d->collWidget->setMinimumWidth(width);
249 m_d->collWidget->setMaximumWidth(width);
250 QScrollBar * sb = scrollarea->verticalScrollBar();
251 if (sb)
252 width+=sb->sizeHint().width();
253 scrollarea->setMinimumWidth(width+2);//2 is just some margin
254}
const double width

◆ connectToLastUpdateSlot() [1/10]

void VP1Controller::connectToLastUpdateSlot ( QButtonGroup * bg)
protectedinherited

Definition at line 371 of file VP1Controller.cxx.

372{
373 connectToLastUpdateSlot(bg,SIGNAL(buttonClicked(int)));
374}

◆ connectToLastUpdateSlot() [2/10]

void VP1Controller::connectToLastUpdateSlot ( QCheckBox * cb)
protectedinherited

Definition at line 335 of file VP1Controller.cxx.

336{
337 connectToLastUpdateSlot(cb,SIGNAL(toggled(bool)));
338}

◆ connectToLastUpdateSlot() [3/10]

void VP1Controller::connectToLastUpdateSlot ( QComboBox * cb)
protectedinherited

Definition at line 341 of file VP1Controller.cxx.

342{
343 connectToLastUpdateSlot(cb,SIGNAL(currentIndexChanged(int)));
344}

◆ connectToLastUpdateSlot() [4/10]

void VP1Controller::connectToLastUpdateSlot ( QDoubleSpinBox * dsb)
protectedinherited

Definition at line 359 of file VP1Controller.cxx.

360{
361 connectToLastUpdateSlot(dsb,SIGNAL(valueChanged(double)));
362}

◆ connectToLastUpdateSlot() [5/10]

void VP1Controller::connectToLastUpdateSlot ( QGroupBox * gb)
protectedinherited

Definition at line 347 of file VP1Controller.cxx.

348{
349 connectToLastUpdateSlot(gb,SIGNAL(toggled(bool)));
350}

◆ connectToLastUpdateSlot() [6/10]

void VP1Controller::connectToLastUpdateSlot ( QObject * sender,
const char * signal )
protectedinherited

Definition at line 329 of file VP1Controller.cxx.

330{
331 connect(sender,signal,this,m_d->lastUpdateSlot);
332}

◆ connectToLastUpdateSlot() [7/10]

void VP1Controller::connectToLastUpdateSlot ( QRadioButton * rb)
protectedinherited

Definition at line 365 of file VP1Controller.cxx.

366{
367 connectToLastUpdateSlot(rb,SIGNAL(toggled(bool)));
368}

◆ connectToLastUpdateSlot() [8/10]

void VP1Controller::connectToLastUpdateSlot ( QSlider * s)
protectedinherited

Definition at line 377 of file VP1Controller.cxx.

378{
379 connectToLastUpdateSlot(s,SIGNAL(valueChanged(int)));
380}

◆ connectToLastUpdateSlot() [9/10]

void VP1Controller::connectToLastUpdateSlot ( QSpinBox * sb)
protectedinherited

Definition at line 353 of file VP1Controller.cxx.

354{
355 connectToLastUpdateSlot(sb,SIGNAL(valueChanged(int)));
356}

◆ connectToLastUpdateSlot() [10/10]

void VP1Controller::connectToLastUpdateSlot ( VP1ColorSelectButton * csb)
protectedinherited

Definition at line 383 of file VP1Controller.cxx.

384{
385 connectToLastUpdateSlot(csb,SIGNAL(colorChanged(const QColor&)));
386}

◆ currentSettingsVersion()

int GeoSysController::currentSettingsVersion ( ) const
virtual

Implements VP1Controller.

Definition at line 654 of file GeoSysController.cxx.

655{
656 return 6;
657}

◆ customTourEditor()

VP1CustomTourEditor * VP1Controller::customTourEditor ( )
inlinestaticinherited

Definition at line 62 of file VP1Controller.h.

62{return m_customTourEditor;}
static VP1CustomTourEditor * m_customTourEditor

◆ defineRadioButtonGroup() [1/2]

QButtonGroup * VP1Controller::defineRadioButtonGroup ( const QList< QRadioButton * > & l)
protectedinherited

Definition at line 302 of file VP1Controller.cxx.

303{
304 QRadioButton * rb_checked(0);
305 for (QRadioButton *rb : l) {
306 if (rb->isChecked()) {
307 rb_checked = rb;
308 break;
309 }
310 }
311 QButtonGroup * radiogroup = new QButtonGroup(this);
312 for (QRadioButton *rb : l)
313 radiogroup->addButton(rb);
314 if (rb_checked)
315 rb_checked->setChecked(true);
316 return radiogroup;
317}

◆ defineRadioButtonGroup() [2/2]

QButtonGroup * VP1Controller::defineRadioButtonGroup ( QRadioButton * rb0,
QRadioButton * rb1,
QRadioButton * rb2 = 0,
QRadioButton * rb3 = 0,
QRadioButton * rb4 = 0,
QRadioButton * rb5 = 0,
QRadioButton * rb6 = 0,
QRadioButton * rb7 = 0,
QRadioButton * rb8 = 0,
QRadioButton * rb9 = 0 )
protectedinherited

Definition at line 290 of file VP1Controller.cxx.

294{
295 QList<QRadioButton *> l;
296 l << rb0 << rb1 << rb2 << rb3 << rb4 << rb5 << rb6 << rb7 << rb8 << rb9;
297 l.removeAll(0);
298 return defineRadioButtonGroup(l);
299}
QButtonGroup * defineRadioButtonGroup(QRadioButton *rb0, QRadioButton *rb1, QRadioButton *rb2=0, QRadioButton *rb3=0, QRadioButton *rb4=0, QRadioButton *rb5=0, QRadioButton *rb6=0, QRadioButton *rb7=0, QRadioButton *rb8=0, QRadioButton *rb9=0)
l
Printing final latex table to .tex output file.

◆ drawOptions()

SoGroup * GeoSysController::drawOptions ( ) const

Definition at line 362 of file GeoSysController.cxx.

363{
364 return m_d->ui_disp.widget_drawOptions->drawOptionsGroup();
365}

◆ dummyUpdateTrigger

void VP1Controller::dummyUpdateTrigger ( )
signalinherited

◆ emit_actionOnAllNonStandardVolumes

void GeoSysController::emit_actionOnAllNonStandardVolumes ( )
privateslot

Definition at line 617 of file GeoSysController.cxx.

617 {
618 bool zap(sender()==m_d->ui_misc.pushButton_nonStandardShapes_Iconify);
619 messageVerbose("emitting actionOnAllNonStandardVolumes("+str(zap)+")");
621}
void actionOnAllNonStandardVolumes(bool)

◆ emit_adaptMuonChambersToEventData

void GeoSysController::emit_adaptMuonChambersToEventData ( )
privateslot

Definition at line 545 of file GeoSysController.cxx.

546{
547 messageVerbose("Emitting adaptMuonChambersToEventData()");
549}
void adaptMuonChambersToEventData()

◆ emit_autoAdaptMuonNSW

void GeoSysController::emit_autoAdaptMuonNSW ( )
privateslot

Definition at line 570 of file GeoSysController.cxx.

571{
572 bool reset = false;
573 if (sender()==m_d->ui_misc.toolButton_nswchambers_reset) {
574 reset = true;
575 }
576 bool stgc = m_d->ui_misc.checkBox_NSW_sTGC->isChecked();
577 bool mm = m_d->ui_misc.checkBox_NSW_MM->isChecked();
578 bool pSp = m_d->ui_misc.checkBox_NSW_Passive_Spacer->isChecked();
579 bool pSt = m_d->ui_misc.checkBox_NSW_Passive_Structure->isChecked();
580 bool pAP = m_d->ui_misc.checkBox_NSW_Passive_APlate->isChecked();
581
582 messageVerbose ("Emitting autoAdaptMuonNSW("+str(reset)+","+str(stgc)+","+str(mm)+")");
583 emit autoAdaptMuonNSW(reset, stgc, mm, pSp, pSt, pAP);
584}
void autoAdaptMuonNSW(bool, bool, bool, bool, bool, bool)
virtual void reset() override
Free all allocated elements.

◆ emit_autoAdaptPixelsOrSCT

void GeoSysController::emit_autoAdaptPixelsOrSCT ( )
privateslot

Definition at line 552 of file GeoSysController.cxx.

553{
554 bool pixel(sender()==m_d->ui_misc.toolButton_pixelmod_adapt);
555 bool brl = pixel ? m_d->ui_misc.checkBox_pixelmod_barrel->isChecked()
556 : m_d->ui_misc.checkBox_sctmod_barrel->isChecked();
557 bool ecA = pixel ? m_d->ui_misc.checkBox_pixelmod_endcapA->isChecked()
558 : m_d->ui_misc.checkBox_sctmod_endcapA->isChecked();
559 bool ecC = pixel ? m_d->ui_misc.checkBox_pixelmod_endcapC->isChecked()
560 : m_d->ui_misc.checkBox_sctmod_endcapC->isChecked();
561 bool bcmA = pixel ? m_d->ui_misc.checkBox_bcmMod_Aside->isChecked() : false;
562 bool bcmC = pixel ? m_d->ui_misc.checkBox_bcmMod_Cside->isChecked() : false;
563
564 messageVerbose ("Emitting autoAdaptPixelsOrSCT("+str(pixel)+", "+str(brl)+","+str(ecA)+","+str(ecC)+","+str(bcmA)+","+str(bcmC)+")");
565 emit autoAdaptPixelsOrSCT(pixel,brl,ecA,ecC,bcmA,bcmC);
566}
void autoAdaptPixelsOrSCT(bool, bool, bool, bool, bool, bool)

◆ emit_autoExpandByVolumeOrMaterialName

void GeoSysController::emit_autoExpandByVolumeOrMaterialName ( )
privateslot

Definition at line 604 of file GeoSysController.cxx.

605{
606 bool volname(sender()==m_d->ui_misc.pushButton_expand_vols_volname
607 ||sender()==m_d->ui_misc.lineEdit_expand_vols_volname);
608 QString name(volname?m_d->ui_misc.lineEdit_expand_vols_volname->text()
609 :m_d->ui_misc.lineEdit_expand_vols_matname->text());
610 if (name.isEmpty())
611 return;
612 messageVerbose("emitting autoExpandByVolumeOrMaterialName("+str(!volname)+", "+name+")");
613 emit autoExpandByVolumeOrMaterialName(!volname,name);
614}
void autoExpandByVolumeOrMaterialName(bool, QString)

◆ emit_autoIconifyByVolumeOrMaterialName

void GeoSysController::emit_autoIconifyByVolumeOrMaterialName ( )
privateslot

Definition at line 589 of file GeoSysController.cxx.

590{
591 bool volname(sender()==m_d->ui_misc.pushButton_iconify_vols_volname
592 ||sender()==m_d->ui_misc.lineEdit_iconify_vols_volname);
593
594 QString name(volname ? m_d->ui_misc.lineEdit_iconify_vols_volname->text()
595 : "" );
596
597 if (name.isEmpty())
598 return;
599 messageVerbose("emitting autoIconifyByVolumeOrMaterialName("+str(!volname)+", "+name+")");
600 emit autoIconifyByVolumeOrMaterialName(!volname,name);
601}
void autoIconifyByVolumeOrMaterialName(bool, QString)

◆ emit_resetSubSystems

void GeoSysController::emit_resetSubSystems ( )
privateslot

Reset to the sub-system top volume.

The method reset the view to the whole sub-system by contracting all children to the mother volume. It does work properly only if the top sub-system volume has a concrete shape. If, instead, it is a mere container, then this method does not work because it will hide the children of the top container volume. In that case, you should implement a custom method.

Note: for an example of a custom solution, please refer to the 'VP1GeometrySystem::autoAdaptMuonNSW()' method, triggered by the emission of the 'autoAdaptMuonNSW()' signal in the 'emit_autoAdaptMuonNSW()' of this class.

Definition at line 640 of file GeoSysController.cxx.

641{
642 VP1GeoFlags::SubSystemFlags f;
643 if (sender()==m_d->ui_misc.toolButton_pixelmod_reset)
645 else if (sender()==m_d->ui_misc.toolButton_sctmod_reset)
647 else if (sender()==m_d->ui_muon.pushButton_muonadapt_resetToAllChambers)
649 messageVerbose(" Emitting resetSubSystems("+str(f)+")");
650 emit resetSubSystems(f);
651}
void resetSubSystems(VP1GeoFlags::SubSystemFlags)

◆ enabledButtonStateChanged

void VP1Controller::enabledButtonStateChanged ( )
slotinherited

Definition at line 169 of file VP1Controller.cxx.

170{
171 Imp::DialogInfo * di(0);
172 for (Imp::DialogInfo* di2 : m_d->dialogs) {
173 if (di2->enabledButton==sender()) {
174 di = di2;
175 break;
176 }
177 }
178 if (!di) {
179 message("ERROR: enabledButtonStateChanged() triggered with unrecognised sender() ="
180 +QString(sender()?sender()->objectName():"NULL"));
181 return;
182 }
183
184 bool on(di->enabledButton->isChecked());
185 if (di->launchButton->isEnabled()!=on)
186 di->launchButton->setEnabled(on);
187 if (!on) {
188 if (di->dialogWidget->isVisible())
189 di->dialogWidget->setVisible(false);
190 if (di->dialogWidget->windowState()==Qt::WindowMinimized)
191 di->dialogWidget->setWindowState(Qt::WindowNoState);
192 }
193}

◆ fallBackMaterial()

SoMaterial * VP1Controller::fallBackMaterial ( ) const
protectedinherited

Definition at line 429 of file VP1Controller.cxx.

430{
431 if (!m_d->fallBackMaterial) {
432 m_d->fallBackMaterial = new SoMaterial;
433 m_d->fallBackMaterial->ref();
434 }
435 return m_d->fallBackMaterial;
436}

◆ getMaterial()

SoMaterial * VP1Controller::getMaterial ( VP1MaterialButton * mb) const
protectedinherited

Definition at line 439 of file VP1Controller.cxx.

440{
441 if (!mb) {
442 message("ERROR: Null material button pointer");
443 return fallBackMaterial();
444 }
445 QList<SoMaterial*> mats = mb->handledMaterials();
446 if (mats.count()!=1) {
447 message("ERROR: No material in button "+mb->objectName());
448 return fallBackMaterial();
449 }
450 return mats.at(0);
451
452
453}
SoMaterial * fallBackMaterial() const

◆ helperClassName()

const QString & VP1HelperClassBase::helperClassName ( ) const
inlineinherited

Definition at line 51 of file VP1HelperClassBase.h.

51{ return m_helpername; }

◆ initDialog() [1/2]

void VP1Controller::initDialog ( std::unique_ptr< QWidget > dialog,
QPushButton * launchbutton,
QPushButton * closebutton,
QAbstractButton * enabledButton = 0 )
protectedinherited

Definition at line 123 of file VP1Controller.cxx.

124{
125 QString txt(enabledButton?enabledButton->text():launchButton->text());
126 txt.replace("&&","&");
127 dialogPtr->setWindowTitle(txt+" ["+systemBase()->name()+"]");
128 dialogPtr->setWindowIcon(QIcon(QString(":/vp1/icons/icons/3d_32x32.png")));
129 launchButton->setMaximumHeight(static_cast<int>(0.5+QFontMetricsF(launchButton->font()).height()*1.05+2));
130 launchButton->setMinimumHeight(launchButton->maximumHeight());
131 launchButton->setCheckable(true);
132
133 QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
134 sizePolicy.setHorizontalStretch(0);
135 sizePolicy.setVerticalStretch(0);
136 sizePolicy.setHeightForWidth(launchButton->sizePolicy().hasHeightForWidth());
137 launchButton->setSizePolicy(sizePolicy);
138 launchButton->setFocusPolicy(Qt::NoFocus);
139
140 if (enabledButton)
141 launchButton->setEnabled(enabledButton->isChecked());
142
143 auto di = std::make_unique<Imp::DialogInfo>(launchButton,std::move(dialogPtr),enabledButton);
144 QWidget* dialog = di->dialogWidget.get();
145 m_d->dialogs << di.release();
146
147 connect(launchButton,SIGNAL(clicked()),this,SLOT(toggleDialogState()));
148 if (enabledButton)
149 connect(enabledButton,SIGNAL(toggled(bool)),this,SLOT(enabledButtonStateChanged()));
150 CloseEventEater* closeEventEater = new CloseEventEater(this);
151 dialog->installEventFilter(closeEventEater);
152
153 if(closeButton) {
154 closeButton->setText("&Close");
155 closeButton->setToolTip("Close this dialog [Esc]");
156 connect(closeButton,SIGNAL(clicked()),dialog,SLOT(close()));
157 }
158 connect(new QShortcut(QKeySequence(Qt::Key_Escape), dialog),SIGNAL(activated()),dialog,SLOT(close()));
159
160 //To avoid an extra call in the code we do this a few times more than necessary (fixme: put in initLastVars!!):
161 int maxwidth(0);
162 for (Imp::DialogInfo* di : m_d->dialogs)
163 maxwidth = std::max(maxwidth,di->launchButton->sizeHint().width());
164 for (Imp::DialogInfo* di : m_d->dialogs)
165 di->launchButton->setMinimumWidth(maxwidth);
166}
void toggleDialogState(QObject *widget=0)
void enabledButtonStateChanged()
IVP1System * systemBase() const

◆ initDialog() [2/2]

template<class T>
void VP1Controller::initDialog ( T & theUI,
QPushButton * launchbutton,
QAbstractButton * enabledButton = 0 )
protectedinherited

Definition at line 145 of file VP1Controller.h.

145 {
146 auto w = std::make_unique<QWidget>(nullptr,Qt::WindowStaysOnTopHint);
147 theUI.setupUi(w.get());
148 initDialog(std::move(w), launchbutton, theUI.pushButton_close,enabledButton);
149}

◆ initLastVars()

void VP1Controller::initLastVars ( )
inherited

Definition at line 68 of file VP1Controller.cxx.

69{
70 m_initVarsMode = true;
72 m_initVarsMode = false;
73}
void testForChanges()

◆ initVarsMode()

bool VP1Controller::initVarsMode ( ) const
inlineprotectedinherited

Definition at line 98 of file VP1Controller.h.

98{ return m_initVarsMode; }

◆ labelPosOffset()

QList< int > GeoSysController::labelPosOffset ( )

Offset in x,y,z.

Definition at line 535 of file GeoSysController.cxx.

536{
537 QList<int> values;
538 values << m_d->ui_disp.horizontalSlider_labels_xOffset->value();
539 values << m_d->ui_disp.horizontalSlider_labels_yOffset->value();
540 values << m_d->ui_disp.horizontalSlider_labels_zOffset->value();
541 return values;
542}

◆ labelPosOffsetChanged

void GeoSysController::labelPosOffsetChanged ( QList< int > )
signal

◆ labels()

int GeoSysController::labels ( ) const

Definition at line 524 of file GeoSysController.cxx.

524 {
525 if (!m_d->ui_disp.groupBox_labels->isChecked()) return 0;
526 int labels=0;
527 if (m_d->ui_disp.checkBox_labels_names->isChecked()) labels|=0x1;
528 if (m_d->ui_disp.checkBox_labels_mooret0s->isChecked()) labels|=0x2;
529 if (m_d->ui_disp.checkBox_labels_mboyt0s->isChecked()) labels|=0x4;
530 // leaving space for another t0 type, if necessary
531 if (m_d->ui_disp.checkBox_labels_hits->isChecked()) labels|=0x10;
532 return labels;
533}

◆ labelsChanged

void GeoSysController::labelsChanged ( int )
signal

◆ lastSelectedVolume()

VolumeHandle * GeoSysController::lastSelectedVolume ( ) const

Definition at line 304 of file GeoSysController.cxx.

305{
306 return m_d->lastSelectedVolHandle;
307}

◆ loadMaterialsFromFile

void GeoSysController::loadMaterialsFromFile ( QString )
signal

◆ loadMaterialsRequested

void GeoSysController::loadMaterialsRequested ( )
privateslot

Definition at line 337 of file GeoSysController.cxx.

338{
339 QString filename = QFileDialog::getOpenFileName(this, "Select geometry material file to load",
340 (m_d->lastLoadMaterialsFile.isEmpty()?
342 :m_d->lastLoadMaterialsFile),
343 "VP1 geometry material files (*.vp1geomat)",
344 0,QFileDialog::DontResolveSymlinks);
345 if(filename.isEmpty())
346 return;
347
348 m_d->lastLoadMaterialsFile = filename;
349
350 messageVerbose("Emitting loadMaterialsFromFile(\""+filename+"\")");
351 emit loadMaterialsFromFile(filename);
352}
void loadMaterialsFromFile(QString)
static QString defaultFileSelectDirectory()

◆ message() [1/3]

void VP1HelperClassBase::message ( const QString & str) const
inherited

Definition at line 49 of file VP1HelperClassBase.cxx.

50{
51 if (m_helpername.isEmpty()) {
52 if (m_system)
53 m_system->message(str);
54 else
55 std::cout<<VP1Msg::prefix_msg()<<" [nameless helper class]: "<<str.toStdString()<<std::endl;
56 } else {
57 if (m_system)
58 m_system->message("["+m_helpername+"] " + str);
59 else
60 std::cout<<VP1Msg::prefix_msg()<<" ["<<m_helpername.toStdString()<<"]: "<<str.toStdString()<<std::endl;
61 }
62}
static const char * prefix_msg()
Definition VP1Msg.h:56

◆ message() [2/3]

void VP1HelperClassBase::message ( const QString & addtostart,
const QStringList & l,
const QString & addtoend = "" ) const
inherited

Definition at line 131 of file VP1HelperClassBase.cxx.

132{
133 if (addtostart.isEmpty()) {
134 message(l,addtoend);
135 return;
136 }
137 if (addtoend.isEmpty()) {
138 for (const QString& s : l)
139 message(addtostart+s);
140 } else {
141 for (const QString& s : l)
142 message(addtostart+s+addtoend);
143 }
144}

◆ message() [3/3]

void VP1HelperClassBase::message ( const QStringList & l,
const QString & addtoend = "" ) const
inherited

Definition at line 91 of file VP1HelperClassBase.cxx.

92{
93 if (addtoend.isEmpty()) {
94 for (const QString& s : l)
95 message(s);
96 } else {
97 for (const QString& s : l)
98 message(s+addtoend);
99 }
100}

◆ messageDebug() [1/3]

void VP1HelperClassBase::messageDebug ( const QString & str) const
inherited

Definition at line 65 of file VP1HelperClassBase.cxx.

66{
67 if (!VP1Msg::debug())
68 return;
69 std::string sysstring(m_system ? " in "+m_system->name().toStdString() : std::string(""));
70 if (m_helpername.isEmpty()) {
71 std::cout<<VP1Msg::prefix_debug()<<" [helper"<<sysstring<<"]: "<<str.toStdString()<<std::endl;
72 } else {
73 std::cout<<VP1Msg::prefix_debug()<<" ["<<m_helpername.toStdString()<<sysstring<<"]: "<<str.toStdString()<<std::endl;
74 }
75}
static bool debug()
Definition VP1Msg.h:32
static const char * prefix_debug()
Definition VP1Msg.h:57

◆ messageDebug() [2/3]

void VP1HelperClassBase::messageDebug ( const QString & addtostart,
const QStringList & l,
const QString & addtoend = "" ) const
inherited

Definition at line 147 of file VP1HelperClassBase.cxx.

148{
149 if (!VP1Msg::debug())
150 return;
151 if (addtostart.isEmpty()) {
152 messageDebug(l,addtoend);
153 return;
154 }
155 if (addtoend.isEmpty()) {
156 for (const QString& s : l)
157 messageDebug(addtostart+s);
158 } else {
159 for (const QString& s : l)
160 messageDebug(addtostart+s+addtoend);
161 }
162}
void messageDebug(const QString &) const

◆ messageDebug() [3/3]

void VP1HelperClassBase::messageDebug ( const QStringList & l,
const QString & addtoend = "" ) const
inherited

Definition at line 103 of file VP1HelperClassBase.cxx.

104{
105 if (!VP1Msg::debug())
106 return;
107 if (addtoend.isEmpty()) {
108 for (const QString& s : l)
109 messageDebug(s);
110 } else {
111 for (const QString& s : l)
112 messageDebug(s+addtoend);
113 }
114}

◆ messageVerbose() [1/3]

void VP1HelperClassBase::messageVerbose ( const QString & str) const
inherited

Definition at line 78 of file VP1HelperClassBase.cxx.

79{
80 if (!VP1Msg::verbose())
81 return;
82 std::string sysstring(m_system ? " in "+m_system->name().toStdString() : std::string(""));
83 if (m_helpername.isEmpty()) {
84 std::cout<<VP1Msg::prefix_verbose()<<" [helper"<<sysstring<<"]: "<<str.toStdString()<<std::endl;
85 } else {
86 std::cout<<VP1Msg::prefix_verbose()<<" ["<<m_helpername.toStdString()<<sysstring<<"]: "<<str.toStdString()<<std::endl;
87 }
88}
static bool verbose()
Definition VP1Msg.h:31
static const char * prefix_verbose()
Definition VP1Msg.h:59

◆ messageVerbose() [2/3]

void VP1HelperClassBase::messageVerbose ( const QString & addtostart,
const QStringList & l,
const QString & addtoend = "" ) const
inherited

Definition at line 165 of file VP1HelperClassBase.cxx.

166{
167 if (!VP1Msg::verbose())
168 return;
169 if (addtostart.isEmpty()) {
170 messageVerbose(l,addtoend);
171 return;
172 }
173 if (addtoend.isEmpty()) {
174 for (const QString& s : l)
175 messageVerbose(addtostart+s);
176 } else {
177 for (const QString& s : l)
178 messageVerbose(addtostart+s+addtoend);
179 }
180}

◆ messageVerbose() [3/3]

void VP1HelperClassBase::messageVerbose ( const QStringList & l,
const QString & addtoend = "" ) const
inherited

Definition at line 117 of file VP1HelperClassBase.cxx.

118{
119 if (!VP1Msg::verbose())
120 return;
121 if (addtoend.isEmpty()) {
122 for (const QString& s : l)
124 } else {
125 for (const QString& s : l)
126 messageVerbose(s+addtoend);
127 }
128}

◆ muonChamberAdaptionStyle()

VP1GeoFlags::MuonChamberAdaptionStyleFlags GeoSysController::muonChamberAdaptionStyle ( ) const

Definition at line 472 of file GeoSysController.cxx.

473{
474 VP1GeoFlags::MuonChamberAdaptionStyleFlags f;
475 if (m_d->ui_muon.checkBox_muonadapt_openmdtchambers->isChecked())
477 if (m_d->ui_muon.checkBox_muonadapt_hidetubes->isChecked())
479 if (m_d->ui_muon.checkBox_muonadapt_hiderpcvolumes->isChecked())
481 if (m_d->ui_muon.checkBox_muonadapt_opencscchambers->isChecked())
483 if (m_d->ui_muon.checkBox_muonadapt_opentgcchambers->isChecked())
485 return f;
486}

◆ muonChamberAdaptionStyleChanged

void GeoSysController::muonChamberAdaptionStyleChanged ( VP1GeoFlags::MuonChamberAdaptionStyleFlags )
signal

◆ orientViewToMuonChambersOnClick()

bool GeoSysController::orientViewToMuonChambersOnClick ( ) const

Definition at line 398 of file GeoSysController.cxx.

399{
400 return m_d->ui_int.checkBox_AutomaticMuonChamberEndViews->isChecked();
401}

◆ phiSectionWidget()

PhiSectionWidget * GeoSysController::phiSectionWidget ( ) const

Definition at line 380 of file GeoSysController.cxx.

381{
382 return m_d->ui_disp.phisectionwidget;
383}

◆ pickStyle()

SoPickStyle * GeoSysController::pickStyle ( ) const

Definition at line 368 of file GeoSysController.cxx.

369{
370 return m_d->pickStyle;
371}

◆ possibleChange_labelPosOffset

void GeoSysController::possibleChange_labelPosOffset ( )
privateslot

◆ possibleChange_labels

void GeoSysController::possibleChange_labels ( )
privateslot

◆ possibleChange_muonChamberAdaptionStyle

void GeoSysController::possibleChange_muonChamberAdaptionStyle ( )
privateslot

◆ possibleChange_showVolumeOutLines

void GeoSysController::possibleChange_showVolumeOutLines ( )
privateslot

◆ possibleChange_transparency

void GeoSysController::possibleChange_transparency ( )
privateslot

◆ printInfoOnClick_CopyNumber()

bool GeoSysController::printInfoOnClick_CopyNumber ( ) const

Definition at line 416 of file GeoSysController.cxx.

417{
418 return m_d->ui_int.checkBox_print_copyno->isChecked();
419}

◆ printInfoOnClick_Mass()

bool GeoSysController::printInfoOnClick_Mass ( ) const

Definition at line 434 of file GeoSysController.cxx.

435{
436 return m_d->ui_int.checkBox_print_mass->isChecked();
437}

◆ printInfoOnClick_Material()

bool GeoSysController::printInfoOnClick_Material ( ) const

Definition at line 410 of file GeoSysController.cxx.

411{
412 return m_d->ui_int.checkBox_print_material->isChecked();
413}

◆ printInfoOnClick_MuonStationInfo()

bool GeoSysController::printInfoOnClick_MuonStationInfo ( ) const

Definition at line 440 of file GeoSysController.cxx.

441{
442 return m_d->ui_int.checkBox_print_muonstationinfo->isChecked();
443}

◆ printInfoOnClick_Shape()

bool GeoSysController::printInfoOnClick_Shape ( ) const

Definition at line 404 of file GeoSysController.cxx.

405{
406 return m_d->ui_int.checkBox_print_shape->isChecked();
407}

◆ printInfoOnClick_Transform()

bool GeoSysController::printInfoOnClick_Transform ( ) const

Definition at line 422 of file GeoSysController.cxx.

423{
424 return m_d->ui_int.checkBox_print_transform->isChecked();
425}

◆ printInfoOnClick_Tree()

bool GeoSysController::printInfoOnClick_Tree ( ) const

Definition at line 428 of file GeoSysController.cxx.

429{
430 return m_d->ui_int.checkBox_print_tree->isChecked();
431}

◆ resetSubSystems

void GeoSysController::resetSubSystems ( VP1GeoFlags::SubSystemFlags )
signal

◆ restoreSettings()

void VP1Controller::restoreSettings ( const QByteArray & ba)
inherited

Definition at line 389 of file VP1Controller.cxx.

390{
391 messageDebug("VP1Controller::restoreSettings()");
392
393 VP1Deserialise s(ba,systemBase());
395
396 //warn unrestored:
397 if (m_d->collWidget)
398 s.ignoreWidget(m_d->collWidget);
399 s.warnUnrestored(static_cast<QWidget*>(this));
400 for (Imp::DialogInfo* di : m_d->dialogs)
401 s.warnUnrestored(di->dialogWidget.get());
402
403 QTimer::singleShot(0, this, SLOT(testForChanges()));
404}
virtual void actualRestoreSettings(VP1Deserialise &)=0

◆ saveMaterialsRequested

void GeoSysController::saveMaterialsRequested ( )
privateslot

Definition at line 310 of file GeoSysController.cxx.

311{
312 const bool ctrl_isdown = (Qt::ControlModifier & QApplication::keyboardModifiers());
313 const bool onlyChangedMaterials = !ctrl_isdown;
314
315 QString filename
316 = QFileDialog::getSaveFileName(this, "Select geometry material file to save",
317 (m_d->lastSaveMaterialsFile.isEmpty()?
319 :m_d->lastSaveMaterialsFile),
320 "VP1 geometry material files (*.vp1geomat)",
321 0,QFileDialog::DontResolveSymlinks);
322
323 if(filename.isEmpty())
324 return;
325
326 if (!filename.endsWith(".vp1geomat"))
327 filename += ".vp1geomat";
328
329 m_d->lastSaveMaterialsFile = filename;
330
331 messageVerbose("Emitting saveMaterialsToFile(\""+filename+"\","+str(onlyChangedMaterials)+")");
332 emit saveMaterialsToFile(filename,onlyChangedMaterials);
333
334}
void saveMaterialsToFile(QString, bool)

◆ saveMaterialsToFile

void GeoSysController::saveMaterialsToFile ( QString ,
bool  )
signal

◆ saveSettings()

QByteArray VP1Controller::saveSettings ( ) const
inherited

Definition at line 407 of file VP1Controller.cxx.

408{
409 messageDebug("VP1Controller::saveSettings()");
410
411 VP1Serialise s(currentSettingsVersion(),systemBase());
412
413 messageDebug("calling actualSaveSettings()...");
415
416 //Warn unsaved:
417 if (m_d->collWidget)
418 s.ignoreWidget(m_d->collWidget);
419
420 s.warnUnsaved(static_cast<const QWidget*>(this));
421 for (Imp::DialogInfo* di : m_d->dialogs)
422 s.warnUnsaved(di->dialogWidget.get());
423
424 return s.result();
425
426}
virtual void actualSaveSettings(VP1Serialise &) const =0
virtual int currentSettingsVersion() const =0

◆ setAutoAdaptMuonChambersToEventData()

void GeoSysController::setAutoAdaptMuonChambersToEventData ( bool b)

Definition at line 282 of file GeoSysController.cxx.

283{
284 m_d->ui_muon.checkBox_muonadapt_autoadapt->setChecked(b);
285}

◆ setComplexity()

void GeoSysController::setComplexity ( double c)

Definition at line 264 of file GeoSysController.cxx.

265{
266 m_d->ui_disp.widget_drawOptions->setComplexity(c);
267}

◆ setCustomTourEditor()

void VP1Controller::setCustomTourEditor ( VP1CustomTourEditor * editor)
inlinestaticinherited

Definition at line 61 of file VP1Controller.h.

61{ m_customTourEditor=editor;}

◆ setGeometrySelectable()

void GeoSysController::setGeometrySelectable ( bool b)

Definition at line 257 of file GeoSysController.cxx.

258{
259 m_d->ui_int.checkBox_geomselectable->setChecked(b);
261}

◆ setHelperClassName()

void VP1HelperClassBase::setHelperClassName ( const QString & n)
inlineprotectedinherited

Definition at line 59 of file VP1HelperClassBase.h.

◆ setLabelsEnabled()

void GeoSysController::setLabelsEnabled ( bool t0s,
bool hits )

controls whether the checkboxes are enabled or not.

Set in e.g. VP1SysConf.cxx, via VP1GeometrySystem

Definition at line 502 of file GeoSysController.cxx.

502 {
503 // make sure that when labels are enabled, only the systems which we have are enabled too
504 if (t0s) {
505 connect(m_d->ui_disp.groupBox_labels,SIGNAL(toggled(bool)),
506 m_d->ui_disp.checkBox_labels_mooret0s,SLOT(setEnabled(bool)));
507 connect(m_d->ui_disp.groupBox_labels,SIGNAL(toggled(bool)),
508 m_d->ui_disp.checkBox_labels_mboyt0s,SLOT(setEnabled(bool)));
509 } else {
510 m_d->ui_disp.checkBox_labels_mooret0s->setEnabled(false);
511 m_d->ui_disp.checkBox_labels_mboyt0s->setEnabled(false);
512 }
513 if (hits) {
514 connect(m_d->ui_disp.groupBox_labels,SIGNAL(toggled(bool)),
515 m_d->ui_disp.checkBox_labels_hits,SLOT(setEnabled(bool)));
516 } else {
517 m_d->ui_disp.checkBox_labels_hits->setEnabled(false);
518 }
519
520 messageVerbose("setLabelsEnabled() t0s="+str(t0s)+", hits="+str(hits));
521}

◆ setLastSelectedVolume()

void GeoSysController::setLastSelectedVolume ( VolumeHandle * vh)

Definition at line 288 of file GeoSysController.cxx.

289{
290 m_d->lastSelectedVolHandle = vh;
291 m_d->ui_disp.matButton_lastSel->setEnabled(vh!=0);
292 if (vh) {
293 QList<SoMaterial*> mats = m_d->ui_disp.matButton_lastSel->handledMaterials();
294 if (mats.isEmpty()||mats.at(0)!=vh->material()) {
295 m_d->ui_disp.matButton_lastSel->clearHandledMaterials();
296 m_d->ui_disp.matButton_lastSel->setMaterial(vh->material());
297 }
298 } else {
299 m_d->ui_disp.matButton_lastSel->clearHandledMaterials();
300 }
301}
SoMaterial * material()

◆ setOrientViewToMuonChambersOnClick()

void GeoSysController::setOrientViewToMuonChambersOnClick ( bool b)

Definition at line 276 of file GeoSysController.cxx.

277{
278 m_d->ui_int.checkBox_AutomaticMuonChamberEndViews->setChecked(b);
279}

◆ setSystemBasePointer()

void VP1HelperClassBase::setSystemBasePointer ( IVP1System * sys)
inherited

Definition at line 197 of file VP1HelperClassBase.cxx.

198{
199 m_system = sys;
200 if (VP1Msg::verbose()){
201 vp1helperclassbase_instanceMap[this] = (m_system?m_system->name():QString(""));
202 }
203}
static std::map< VP1HelperClassBase *, QString > vp1helperclassbase_instanceMap

◆ setupCollWidgetInScrollArea()

void VP1Controller::setupCollWidgetInScrollArea ( QScrollArea * scrollarea,
VP1CollectionWidget * collWidget )
protectedinherited

Definition at line 257 of file VP1Controller.cxx.

258{
259 if (!scrollarea || !collWidget) {
260 message("ERROR: NULL scrollarea or collWidget");
261 return;
262 }
263 QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding);
264 sizePolicy.setHorizontalStretch(0);
265 sizePolicy.setVerticalStretch(scrollarea->sizePolicy().verticalStretch());
266 sizePolicy.setHeightForWidth(scrollarea->sizePolicy().hasHeightForWidth());
267 scrollarea->setSizePolicy(sizePolicy);
268
269 collWidget->setContentsMargins(0,0,0,0);
270 if (!collWidget->children().isEmpty()&&collWidget->children().at(0)->isWidgetType()) {
271 static_cast<QWidget*>(collWidget->children().at(0))->setContentsMargins(0,0,0,0);
272 }
273 scrollarea->setContentsMargins(0,0,0,0);
274
275 scrollarea->setWidgetResizable(true);
276 scrollarea->setFrameShape(QFrame::NoFrame);
277 scrollarea->setFrameShadow(QFrame::Plain);
278 collWidget->setParent(scrollarea);
279 scrollarea->setWidget(collWidget);
280 scrollarea->viewport()->setContentsMargins(0,0,0,0);
281 scrollarea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
282 collWidget->setObjectName(objectName()+"_CollWidget");
283 scrollarea->setObjectName(objectName()+"_CollWidgetScrollArea");
284 m_d->collWidget = collWidget;
285 connect(collWidget,SIGNAL(visibleContentsChanged()),this,SLOT(collWidgetContentChanged()));
286}
void collWidgetContentChanged()
mapped_type at(key_type key) const
Look up an element in the map.

◆ setZoomToVolumeOnClick()

void GeoSysController::setZoomToVolumeOnClick ( bool b)

Definition at line 270 of file GeoSysController.cxx.

271{
272 m_d->ui_int.checkBox_zoomToVolumes->setChecked(b);
273}

◆ showVolumeOutLines()

bool GeoSysController::showVolumeOutLines ( ) const

Definition at line 466 of file GeoSysController.cxx.

467{
468 return m_d->ui_disp.checkBox_showVolumeOutLines->isChecked();
469}

◆ showVolumeOutLinesChanged

void GeoSysController::showVolumeOutLinesChanged ( bool )
signal

◆ str() [1/30]

QString VP1String::str ( const Amg::Vector3D & t)
inlinestaticinherited

Definition at line 98 of file VP1String.h.

98{ return "("+str(t.x())+", "+str(t.y())+", "+str(t.z())+")"; }

◆ str() [2/30]

QString VP1String::str ( const bool b)
inlinestaticinherited

Definition at line 53 of file VP1String.h.

53{ return b?"True":"False"; }

◆ str() [3/30]

QString VP1String::str ( const char * c)
inlinestaticinherited

Definition at line 50 of file VP1String.h.

50{ return c; }

◆ str() [4/30]

QString VP1String::str ( const double & d)
inlinestaticinherited

Definition at line 81 of file VP1String.h.

81{ return QString::number(d); }

◆ str() [5/30]

QString VP1String::str ( const float & f)
inlinestaticinherited

Definition at line 82 of file VP1String.h.

82{ return QString::number(f); }

◆ str() [6/30]

template<class T>
QString VP1String::str ( const HepGeom::BasicVector3D< T > & t)
inlinestaticinherited

Definition at line 95 of file VP1String.h.

95{ return "("+str(t.x())+", "+str(t.y())+", "+str(t.z())+")"; }

◆ str() [7/30]

QString VP1String::str ( const QColor & c)
staticinherited

Definition at line 30 of file VP1String.cxx.

31{
32 return c.isValid() ? c.name() : "Invalid";
33}

◆ str() [8/30]

template<class T>
QString VP1String::str ( const QFlags< T > & f)
inlinestaticinherited

Definition at line 91 of file VP1String.h.

91{ return "0x"+QString::number(f, 16).toUpper().rightJustified(8,'0'); }

◆ str() [9/30]

template<class T>
QString VP1String::str ( const QList< T > & t)
inlinestaticinherited

Definition at line 102 of file VP1String.h.

102{ return "QList of size"+QString::number(t.size()); }

◆ str() [10/30]

QString VP1String::str ( const QString & s)
inlinestaticinherited

Definition at line 49 of file VP1String.h.

49{ return s; }

◆ str() [11/30]

QString VP1String::str ( const SbColor & c)
staticinherited

Definition at line 36 of file VP1String.cxx.

37{
39}
static QColor sbcol2qcol(const SbColor &)

◆ str() [12/30]

QString VP1String::str ( const SbVec2d & v)
staticinherited

Definition at line 61 of file VP1String.cxx.

61{ double x,y; v.getValue(x,y); return "("+str(x)+", "+str(y)+")"; }
#define y
#define x

◆ str() [13/30]

QString VP1String::str ( const SbVec2f & v)
staticinherited

Definition at line 62 of file VP1String.cxx.

62{ float x,y; v.getValue(x,y); return "("+str(x)+", "+str(y)+")"; }

◆ str() [14/30]

QString VP1String::str ( const SbVec2s & v)
staticinherited

Definition at line 63 of file VP1String.cxx.

63{ short x,y; v.getValue(x,y); return "("+str(x)+", "+str(y)+")"; }

◆ str() [15/30]

QString VP1String::str ( const SbVec3d & v)
staticinherited

Definition at line 64 of file VP1String.cxx.

64{ double x,y,z; v.getValue(x,y,z); return "("+str(x)+", "+str(y)+", "+str(z)+")"; }
#define z

◆ str() [16/30]

QString VP1String::str ( const SbVec3f & v)
staticinherited

Definition at line 65 of file VP1String.cxx.

65{ float x,y,z; v.getValue(x,y,z); return "("+str(x)+", "+str(y)+", "+str(z)+")"; }

◆ str() [17/30]

QString VP1String::str ( const SbVec3s & v)
staticinherited

Definition at line 66 of file VP1String.cxx.

66{ short x,y,z; v.getValue(x,y,z); return "("+str(x)+", "+str(y)+", "+str(z)+")"; }

◆ str() [18/30]

QString VP1String::str ( const SbVec4d & v)
staticinherited

Definition at line 67 of file VP1String.cxx.

67{ double x,y,z,t; v.getValue(x,y,z,t); return "("+str(x)+", "+str(y)+", "+str(z)+", "+str(t)+")"; }

◆ str() [19/30]

QString VP1String::str ( const SbVec4f & v)
staticinherited

Definition at line 68 of file VP1String.cxx.

68{ float x,y,z,t; v.getValue(x,y,z,t); return "("+str(x)+", "+str(y)+", "+str(z)+", "+str(t)+")"; }

◆ str() [20/30]

template<class T>
QString VP1String::str ( const T * t)
inlinestaticinherited

Definition at line 87 of file VP1String.h.

87{ return str(static_cast<const void* >(t)); }

◆ str() [21/30]

QString VP1String::str ( const void * p)
staticinherited

Definition at line 48 of file VP1String.cxx.

49{
50 if (p) {
51 std::ostringstream s;
52 s << p;
53 // Explicitly naming QString here avoids a cppcheck warning.
54 return QString (s.str().c_str());
55 } else {
56 return "NULL";
57 }
58}

◆ str() [22/30]

QString VP1String::str ( const VP1Interval & i)
staticinherited

Definition at line 42 of file VP1String.cxx.

43{
44 return i.toString();
45}

◆ str() [23/30]

QString VP1String::str ( int n)
inlinestaticinherited

Definition at line 77 of file VP1String.h.

77{ return QString::number(n); }

◆ str() [24/30]

QString VP1String::str ( long n)
inlinestaticinherited

Definition at line 75 of file VP1String.h.

75{ return QString::number(n); }

◆ str() [25/30]

QString VP1String::str ( qlonglong n)
inlinestaticinherited

Definition at line 79 of file VP1String.h.

79{ return QString::number(n); }

◆ str() [26/30]

QString VP1String::str ( qulonglong n)
inlinestaticinherited

Definition at line 80 of file VP1String.h.

80{ return QString::number(n); }

◆ str() [27/30]

QString VP1String::str ( short int n)
inlinestaticinherited

Definition at line 73 of file VP1String.h.

73{ return QString::number(n); }

◆ str() [28/30]

QString VP1String::str ( uint n)
inlinestaticinherited

Definition at line 78 of file VP1String.h.

78{ return QString::number(n); }

◆ str() [29/30]

QString VP1String::str ( ulong n)
inlinestaticinherited

Definition at line 76 of file VP1String.h.

76{ return QString::number(n); }

◆ str() [30/30]

QString VP1String::str ( unsigned short int n)
inlinestaticinherited

Definition at line 74 of file VP1String.h.

74{ return QString::number(n); }

◆ subSystemCheckBox()

QCheckBox * GeoSysController::subSystemCheckBox ( VP1GeoFlags::SubSystemFlag f) const

Definition at line 355 of file GeoSysController.cxx.

356{
357 std::map<VP1GeoFlags::SubSystemFlag,QCheckBox*>::const_iterator it = m_d->subSysCheckBoxMap.find(f);
358 return it==m_d->subSysCheckBoxMap.end() ? 0 : it->second;
359}

◆ systemBase()

IVP1System * VP1HelperClassBase::systemBase ( ) const
inlineinherited

Definition at line 50 of file VP1HelperClassBase.h.

50{ return m_system; }

◆ testForChanges

void VP1Controller::testForChanges ( )
inlineprotectedslotinherited

Definition at line 113 of file VP1Controller.h.

◆ toggleDialogState

void VP1Controller::toggleDialogState ( QObject * widget = 0)
slotinherited

Definition at line 196 of file VP1Controller.cxx.

197{
198 Imp::DialogInfo * di(0);
199 for (Imp::DialogInfo* di2 : m_d->dialogs) {
200 if (di2->launchButton==sender() || (widget && di2->dialogWidget.get()==widget)) {
201 di = di2;
202 break;
203 }
204 }
205
206 if (!di) {
207 message("ERROR: toggleDialogState() triggered with unrecognised sender() ="
208 +QString(sender()?sender()->objectName():"NULL"));
209 return;
210 }
211
212 bool oldvis = di->dialogWidget->isVisible();
213
214 if (oldvis&&di->dialogWidget->windowState()==Qt::WindowMinimized) {
215 di->dialogWidget->setWindowState(Qt::WindowNoState);
216 } else {
217 di->dialogWidget->setVisible(!oldvis);
218 if (!oldvis && di->neverShown) {
219 di->neverShown = false;
220 //do stuff
221 // QSize size(955, 717);
222 // size = size.expandedTo(VP1MainWindow->minimumSizeHint());
223 // di->dialogWidget->resize(di->dialogWidget->minimumSizeHint());
224 }
225 }
226
227 //synchronise toggle button state (for example if this was called by CloseEventEater)
228 if (di->launchButton->isCheckable() && oldvis){
229 di->launchButton->setChecked(false);
230 }
231}

◆ toString() [1/4]

QString VP1Controller::toString ( const bool & par)
staticprotectedinherited

Definition at line 100 of file VP1Controller.cxx.

101{
102 return par?"On":"Off";
103}

◆ toString() [2/4]

QString VP1Controller::toString ( const QList< VP1Interval > & l)
staticprotectedinherited

Definition at line 106 of file VP1Controller.cxx.

107{
108 QString s;
109 for(int i=0;i<l.count();++i)
110 s+= l.at(i).toString()+(i==l.count()-1?"":", ");
111 return s;
112}

◆ toString() [3/4]

template<class T>
QString VP1Controller::toString ( const T & par)
staticprotectedinherited

Definition at line 139 of file VP1Controller.h.

140{
141 return VP1String::str(par);
142}

◆ toString() [4/4]

QString VP1Controller::toString ( SbColor4f p)
staticprotectedinherited

Definition at line 115 of file VP1Controller.cxx.

116{
117 float r, g, b, a;
118 p.getValue(r, g, b, a);
119 return "("+str(r)+", "+str(g)+", "+str(b)+", "+str(1-a)+")";
120}
static Double_t a
int r
Definition globals.cxx:22

◆ transparency()

float GeoSysController::transparency ( ) const

Definition at line 459 of file GeoSysController.cxx.

460{
461 int v(m_d->ui_disp.spinBox_transp->value());
462 return (v>=100?1.0:(v<=0?0.0:v/100.0));
463}

◆ transparencyChanged

void GeoSysController::transparencyChanged ( float )
signal

◆ updatePickStyle

void GeoSysController::updatePickStyle ( )
privateslot

Definition at line 452 of file GeoSysController.cxx.

453{
454 m_d->pickStyle->style = m_d->ui_int.checkBox_geomselectable->isChecked()
455 ? SoPickStyle::SHAPE : SoPickStyle::UNPICKABLE;
456}

◆ verbose()

bool VP1HelperClassBase::verbose ( )
inlinestaticinherited

Definition at line 32 of file VP1HelperClassBase.h.

32{ return s_vp1verbose; } // Returns true if env var VP1_VERBOSE_OUTPUT=1
static const bool s_vp1verbose

◆ volumeResetRequested

void GeoSysController::volumeResetRequested ( VolumeHandle * )
signal

◆ volumeStateChangeRequested

void GeoSysController::volumeStateChangeRequested ( VolumeHandle * ,
VP1GeoFlags::VOLSTATE  )
signal

◆ volumeTreeBrowser()

VP1GeoTreeView * GeoSysController::volumeTreeBrowser ( ) const

Definition at line 374 of file GeoSysController.cxx.

375{
376 return m_d->ui_treebrowser.treeView_volumebrowser;
377}

◆ warnUndeletedInstances()

void VP1HelperClassBase::warnUndeletedInstances ( )
staticinherited

Definition at line 183 of file VP1HelperClassBase.cxx.

184{
186 return;
187 std::cout << "WARNING: Detected "<<vp1helperclassbase_instanceMap.size()<<" undeleted helper class instances:"<<std::endl;
188
189 std::map<VP1HelperClassBase*,QString>::iterator it,itE(vp1helperclassbase_instanceMap.end());
190 for (it = vp1helperclassbase_instanceMap.begin();it!=itE;++it) {
191 std::cout << " ==> "<<it->first<<": "<<it->first->m_helpername.toStdString()
192 << (it->second.isEmpty()?QString(""):" (in system "+it->second+")").toStdString()<<std::endl;
193 }
194}

◆ zappedVolumeListModel()

ZappedVolumeListModel * GeoSysController::zappedVolumeListModel ( ) const

Definition at line 386 of file GeoSysController.cxx.

387{
388 return m_d->zappedVolumeListModel;
389}

◆ zoomToVolumeOnClick()

bool GeoSysController::zoomToVolumeOnClick ( ) const

Definition at line 392 of file GeoSysController.cxx.

393{
394 return m_d->ui_int.checkBox_zoomToVolumes->isChecked();
395}

Member Data Documentation

◆ m_customTourEditor

VP1CustomTourEditor * VP1Controller::m_customTourEditor =0
staticprivateinherited

Definition at line 126 of file VP1Controller.h.

◆ m_d

Imp* GeoSysController::m_d
private

Definition at line 119 of file GeoSysController.h.

◆ m_helpername

QString VP1HelperClassBase::m_helpername
privateinherited

Definition at line 67 of file VP1HelperClassBase.h.

◆ m_initVarsMode

bool VP1Controller::m_initVarsMode
privateinherited

Definition at line 130 of file VP1Controller.h.

◆ m_system

IVP1System* VP1HelperClassBase::m_system
privateinherited

Definition at line 68 of file VP1HelperClassBase.h.

◆ s_vp1verbose

const bool VP1HelperClassBase::s_vp1verbose = VP1QtUtils::environmentVariableIsOn("VP1_VERBOSE_OUTPUT")
staticprivateinherited

Definition at line 69 of file VP1HelperClassBase.h.


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