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 (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()
111 m_d->ui_misc.groupBox_pixelactivemodules->setVisible(VP1JobConfigInfo::hasPixelGeometry());
112 m_d->ui_misc.groupBox_sctactivemodules->setVisible(VP1JobConfigInfo::hasSCTGeometry());
113 m_d->ui.groupBox_calorimeters->setVisible(VP1JobConfigInfo::hasLArGeometry()
115 m_d->ui.groupBox_muonsystems->setVisible(VP1JobConfigInfo::hasMuonGeometry());
116 m_d->ui.pushButton_settings_muonchambers->setEnabled(VP1JobConfigInfo::hasMuonGeometry());
117 m_d->ui_int.checkBox_print_muonstationinfo->setVisible(VP1JobConfigInfo::hasMuonGeometry());
118 m_d->ui_muon.groupBox_muonchamberconfig->setVisible(VP1JobConfigInfo::hasMuonGeometry());
119 m_d->ui_misc.groupBox_show_NSW_chambers->setVisible(VP1JobConfigInfo::hasMuonNSWGeometry());
120 m_d->ui_int.checkBox_AutomaticMuonChamberEndViews->setVisible(VP1JobConfigInfo::hasMuonGeometry());
121 }
122 #endif
123
124
125 m_d->zappedVolumeListModel = new ZappedVolumeListModel(m_d->ui_iconisedvols.listView_iconisedvolumes);
126 m_d->ui_iconisedvols.listView_iconisedvolumes->setUniformItemSizes(true);
127 m_d->ui_iconisedvols.listView_iconisedvolumes->setSelectionMode(QAbstractItemView::ExtendedSelection);
128 m_d->ui_iconisedvols.listView_iconisedvolumes->setModel(m_d->zappedVolumeListModel);
129
130 connect(m_d->ui_iconisedvols.listView_iconisedvolumes,SIGNAL(activated(const QModelIndex&)),
131 m_d->zappedVolumeListModel,SLOT(activated(const QModelIndex&)));
132
134 // Setup connections which monitor changes in the controller so that we may emit signals as appropriate: //
136
138 connectToLastUpdateSlot(m_d->ui_int.checkBox_geomselectable);
139
141 connectToLastUpdateSlot(m_d->ui_disp.checkBox_showVolumeOutLines);
142
144 connectToLastUpdateSlot(m_d->ui_disp.spinBox_transp);
145
147 connectToLastUpdateSlot(m_d->ui_muon.checkBox_muonadapt_openmdtchambers);
148 connectToLastUpdateSlot(m_d->ui_muon.checkBox_muonadapt_hidetubes);
149 connectToLastUpdateSlot(m_d->ui_muon.checkBox_muonadapt_hiderpcvolumes);
150 connectToLastUpdateSlot(m_d->ui_muon.checkBox_muonadapt_opencscchambers);
151 connectToLastUpdateSlot(m_d->ui_muon.checkBox_muonadapt_opentgcchambers);
152
153 initLastVars();
154
155 //Connections for state-less signals:
156
157 connect(m_d->ui_disp.pushButton_saveChangedMaterials,SIGNAL(clicked()),this,SLOT(saveMaterialsRequested()));
158 connect(m_d->ui_disp.pushButton_loadMaterials,SIGNAL(clicked()),this,SLOT(loadMaterialsRequested()));
159
160 connect(m_d->ui_misc.pushButton_nonStandardShapes_Iconify,SIGNAL(clicked()),
162 connect(m_d->ui_misc.pushButton_nonStandardShapes_Expand,SIGNAL(clicked()),
164
165 // Expand volumes based on Material
166 connect(m_d->ui_misc.lineEdit_expand_vols_matname,SIGNAL(returnPressed()),this,SLOT(emit_autoExpandByVolumeOrMaterialName()));
167 connect(m_d->ui_misc.pushButton_expand_vols_matname,SIGNAL(clicked()),this,SLOT(emit_autoExpandByVolumeOrMaterialName()));
168
169 // Expand volumes based on Name
170 connect(m_d->ui_misc.lineEdit_expand_vols_volname,SIGNAL(returnPressed()),this,SLOT(emit_autoExpandByVolumeOrMaterialName()));
171 connect(m_d->ui_misc.pushButton_expand_vols_volname,SIGNAL(clicked()),this,SLOT(emit_autoExpandByVolumeOrMaterialName()));
172
173 // Iconify/Zap volumes based on Name
174 connect(m_d->ui_misc.lineEdit_iconify_vols_volname,SIGNAL(returnPressed()),this,SLOT(emit_autoIconifyByVolumeOrMaterialName()));
175 connect(m_d->ui_misc.pushButton_iconify_vols_volname,SIGNAL(clicked()),this,SLOT(emit_autoIconifyByVolumeOrMaterialName()));
176
177 connect(m_d->ui_muon.pushButton_muonadapt_adapttoevtdata,SIGNAL(clicked()),this,SLOT(emit_adaptMuonChambersToEventData()));
178
179 connect(m_d->ui_misc.toolButton_pixelmod_adapt,SIGNAL(clicked(bool)),this,SLOT(emit_autoAdaptPixelsOrSCT()));
180 connect(m_d->ui_misc.toolButton_sctmod_adapt,SIGNAL(clicked(bool)),this,SLOT(emit_autoAdaptPixelsOrSCT()));
181
182 connect(m_d->ui_misc.toolButton_nswchambers_adapt,SIGNAL(clicked(bool)),this,SLOT(emit_autoAdaptMuonNSW()));
183 connect(m_d->ui_misc.toolButton_nswchambers_reset,SIGNAL(clicked(bool)),this,SLOT(emit_autoAdaptMuonNSW()));
184
185 connect(m_d->ui_misc.toolButton_pixelmod_reset,SIGNAL(clicked(bool)),this,SLOT(emit_resetSubSystems()));
186 connect(m_d->ui_misc.toolButton_sctmod_reset,SIGNAL(clicked(bool)),this,SLOT(emit_resetSubSystems()));
187 connect(m_d->ui_muon.pushButton_muonadapt_resetToAllChambers,SIGNAL(clicked()),this,SLOT(emit_resetSubSystems()));
188
190
191 // INNER DETECTOR
192 m_d->subSysCheckBoxMap[VP1GeoFlags::Pixel] = m_d->ui.checkBox_Pixel;
193 m_d->subSysCheckBoxMap[VP1GeoFlags::SCT] = m_d->ui.checkBox_SCT;
194 m_d->subSysCheckBoxMap[VP1GeoFlags::TRT] = m_d->ui.checkBox_TRT;
195 m_d->subSysCheckBoxMap[VP1GeoFlags::InDetServMat] = m_d->ui.checkBox_InDetServMat;
196
197 // CALO
198 m_d->subSysCheckBoxMap[VP1GeoFlags::LAr] = m_d->ui.checkBox_LAr;
199 m_d->subSysCheckBoxMap[VP1GeoFlags::Tile] = m_d->ui.checkBox_Tile;
200
201 // MUON TOROID
202 m_d->subSysCheckBoxMap[VP1GeoFlags::BarrelToroid] = m_d->ui.checkBox_MuonBarrelToroid;
203 m_d->subSysCheckBoxMap[VP1GeoFlags::ToroidECA] = m_d->ui.checkBox_MuonECAToroid;
204 // m_d->subSysCheckBoxMap[VP1GeoFlags::ToroidECC] = m_d->ui.checkBox_MuonECCToroid;
205 // MUON MISC
206 m_d->subSysCheckBoxMap[VP1GeoFlags::MuonFeet] = m_d->ui.checkBox_MuonFeet;
207 m_d->subSysCheckBoxMap[VP1GeoFlags::MuonShielding] = m_d->ui.checkBox_MuonShielding;
208 m_d->subSysCheckBoxMap[VP1GeoFlags::MuonToroidsEtc] = m_d->ui.checkBox_MuonEtc; // this is the "Services" checkbox in the GUI
209 // MUON CHAMBERS
210 m_d->subSysCheckBoxMap[VP1GeoFlags::MuonEndcapStationCSC] = m_d->ui.checkBox_MuonEndcapStationCSC;
211 m_d->subSysCheckBoxMap[VP1GeoFlags::MuonEndcapStationTGC] = m_d->ui.checkBox_MuonEndcapStationTGC;
212 m_d->subSysCheckBoxMap[VP1GeoFlags::MuonEndcapStationMDT] = m_d->ui.checkBox_MuonEndcapStationMDT;
213 m_d->subSysCheckBoxMap[VP1GeoFlags::MuonEndcapStationNSW] = m_d->ui.checkBox_NSW;
214 m_d->subSysCheckBoxMap[VP1GeoFlags::MuonBarrelStationInner] = m_d->ui.checkBox_MuonBarrelStationInner;
215 m_d->subSysCheckBoxMap[VP1GeoFlags::MuonBarrelStationMiddle] = m_d->ui.checkBox_MuonBarrelStationMiddle;
216 m_d->subSysCheckBoxMap[VP1GeoFlags::MuonBarrelStationOuter] = m_d->ui.checkBox_MuonBarrelStationOuter;
217
218 // MISCELLANEOUS
219 m_d->subSysCheckBoxMap[VP1GeoFlags::CavernInfra] = m_d->ui.checkBox_CavernInfra;
220 m_d->subSysCheckBoxMap[VP1GeoFlags::BeamPipe] = m_d->ui.checkBox_BeamPipe;
221 m_d->subSysCheckBoxMap[VP1GeoFlags::LUCID] = m_d->ui.checkBox_LUCID;
222 m_d->subSysCheckBoxMap[VP1GeoFlags::ZDC] = m_d->ui.checkBox_ZDC;
223 m_d->subSysCheckBoxMap[VP1GeoFlags::ALFA] = m_d->ui.checkBox_ALFA;
224 m_d->subSysCheckBoxMap[VP1GeoFlags::AFP] = m_d->ui.checkBox_AFP;
225 m_d->subSysCheckBoxMap[VP1GeoFlags::ForwardRegion] = m_d->ui.checkBox_ForwardRegion;
226 // OTHER
227 m_d->subSysCheckBoxMap[VP1GeoFlags::AllUnrecognisedVolumes] = m_d->ui.checkBox_other;
228
229 // -> labels
231 connectToLastUpdateSlot(m_d->ui_disp.groupBox_labels);
232 connectToLastUpdateSlot(m_d->ui_disp.checkBox_labels_names);
233 connectToLastUpdateSlot(m_d->ui_disp.checkBox_labels_mooret0s);
234 connectToLastUpdateSlot(m_d->ui_disp.checkBox_labels_mboyt0s);
235 connectToLastUpdateSlot(m_d->ui_disp.checkBox_labels_hits);
236
238 connectToLastUpdateSlot(m_d->ui_disp.horizontalSlider_labels_xOffset);
239 connectToLastUpdateSlot(m_d->ui_disp.horizontalSlider_labels_yOffset);
240 connectToLastUpdateSlot(m_d->ui_disp.horizontalSlider_labels_zOffset);
241
242 m_d->last_labels=0;
243}
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 hasMuonGeometry()

◆ ~GeoSysController()

GeoSysController::~GeoSysController ( )
virtual

Definition at line 246 of file GeoSysController.cxx.

247{
248 m_d->pickStyle->unref();
249 delete m_d;
250}

Member Function Documentation

◆ actionOnAllNonStandardVolumes

void GeoSysController::actionOnAllNonStandardVolumes ( bool )
signal

◆ actualRestoreSettings()

void GeoSysController::actualRestoreSettings ( VP1Deserialise & s)
virtual

Implements VP1Controller.

Definition at line 714 of file GeoSysController.cxx.

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

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

◆ adaptMuonChambersToEventData

void GeoSysController::adaptMuonChambersToEventData ( )
signal

◆ addUpdateSlot()

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

Definition at line 318 of file VP1Controller.cxx.

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

◆ autoAdaptMuonChambersToEventData()

bool GeoSysController::autoAdaptMuonChambersToEventData ( ) const

Definition at line 442 of file GeoSysController.cxx.

443{
444 return m_d->ui_muon.checkBox_muonadapt_autoadapt->isChecked();
445}

◆ 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 151 of file VP1Controller.h.

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

◆ collWidgetContentChanged

void VP1Controller::collWidgetContentChanged ( )
slotinherited

Definition at line 232 of file VP1Controller.cxx.

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

◆ connectToLastUpdateSlot() [1/10]

void VP1Controller::connectToLastUpdateSlot ( QButtonGroup * bg)
protectedinherited

Definition at line 369 of file VP1Controller.cxx.

370{
371 connectToLastUpdateSlot(bg,SIGNAL(buttonClicked(int)));
372}

◆ connectToLastUpdateSlot() [2/10]

void VP1Controller::connectToLastUpdateSlot ( QCheckBox * cb)
protectedinherited

Definition at line 333 of file VP1Controller.cxx.

334{
335 connectToLastUpdateSlot(cb,SIGNAL(toggled(bool)));
336}

◆ connectToLastUpdateSlot() [3/10]

void VP1Controller::connectToLastUpdateSlot ( QComboBox * cb)
protectedinherited

Definition at line 339 of file VP1Controller.cxx.

340{
341 connectToLastUpdateSlot(cb,SIGNAL(currentIndexChanged(int)));
342}

◆ connectToLastUpdateSlot() [4/10]

void VP1Controller::connectToLastUpdateSlot ( QDoubleSpinBox * dsb)
protectedinherited

Definition at line 357 of file VP1Controller.cxx.

358{
359 connectToLastUpdateSlot(dsb,SIGNAL(valueChanged(double)));
360}

◆ connectToLastUpdateSlot() [5/10]

void VP1Controller::connectToLastUpdateSlot ( QGroupBox * gb)
protectedinherited

Definition at line 345 of file VP1Controller.cxx.

346{
347 connectToLastUpdateSlot(gb,SIGNAL(toggled(bool)));
348}

◆ connectToLastUpdateSlot() [6/10]

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

Definition at line 327 of file VP1Controller.cxx.

328{
329 connect(sender,signal,this,m_d->lastUpdateSlot);
330}

◆ connectToLastUpdateSlot() [7/10]

void VP1Controller::connectToLastUpdateSlot ( QRadioButton * rb)
protectedinherited

Definition at line 363 of file VP1Controller.cxx.

364{
365 connectToLastUpdateSlot(rb,SIGNAL(toggled(bool)));
366}

◆ connectToLastUpdateSlot() [8/10]

void VP1Controller::connectToLastUpdateSlot ( QSlider * s)
protectedinherited

Definition at line 375 of file VP1Controller.cxx.

376{
377 connectToLastUpdateSlot(s,SIGNAL(valueChanged(int)));
378}

◆ connectToLastUpdateSlot() [9/10]

void VP1Controller::connectToLastUpdateSlot ( QSpinBox * sb)
protectedinherited

Definition at line 351 of file VP1Controller.cxx.

352{
353 connectToLastUpdateSlot(sb,SIGNAL(valueChanged(int)));
354}

◆ connectToLastUpdateSlot() [10/10]

void VP1Controller::connectToLastUpdateSlot ( VP1ColorSelectButton * csb)
protectedinherited

Definition at line 381 of file VP1Controller.cxx.

382{
383 connectToLastUpdateSlot(csb,SIGNAL(colorChanged(const QColor&)));
384}

◆ currentSettingsVersion()

int GeoSysController::currentSettingsVersion ( ) const
virtual

Implements VP1Controller.

Definition at line 650 of file GeoSysController.cxx.

651{
652 return 6;
653}

◆ customTourEditor()

VP1CustomTourEditor * VP1Controller::customTourEditor ( )
inlinestaticinherited

Definition at line 61 of file VP1Controller.h.

61{return m_customTourEditor;}
static VP1CustomTourEditor * m_customTourEditor

◆ defineRadioButtonGroup() [1/2]

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

Definition at line 300 of file VP1Controller.cxx.

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

◆ 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 288 of file VP1Controller.cxx.

292{
293 QList<QRadioButton *> l;
294 l << rb0 << rb1 << rb2 << rb3 << rb4 << rb5 << rb6 << rb7 << rb8 << rb9;
295 l.removeAll(0);
296 return defineRadioButtonGroup(l);
297}
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 358 of file GeoSysController.cxx.

359{
360 return m_d->ui_disp.widget_drawOptions->drawOptionsGroup();
361}

◆ dummyUpdateTrigger

void VP1Controller::dummyUpdateTrigger ( )
signalinherited

◆ emit_actionOnAllNonStandardVolumes

void GeoSysController::emit_actionOnAllNonStandardVolumes ( )
privateslot

Definition at line 613 of file GeoSysController.cxx.

613 {
614 bool zap(sender()==m_d->ui_misc.pushButton_nonStandardShapes_Iconify);
615 messageVerbose("emitting actionOnAllNonStandardVolumes("+str(zap)+")");
617}
void actionOnAllNonStandardVolumes(bool)

◆ emit_adaptMuonChambersToEventData

void GeoSysController::emit_adaptMuonChambersToEventData ( )
privateslot

Definition at line 541 of file GeoSysController.cxx.

542{
543 messageVerbose("Emitting adaptMuonChambersToEventData()");
545}
void adaptMuonChambersToEventData()

◆ emit_autoAdaptMuonNSW

void GeoSysController::emit_autoAdaptMuonNSW ( )
privateslot

Definition at line 566 of file GeoSysController.cxx.

567{
568 bool reset = false;
569 if (sender()==m_d->ui_misc.toolButton_nswchambers_reset) {
570 reset = true;
571 }
572 bool stgc = m_d->ui_misc.checkBox_NSW_sTGC->isChecked();
573 bool mm = m_d->ui_misc.checkBox_NSW_MM->isChecked();
574 bool pSp = m_d->ui_misc.checkBox_NSW_Passive_Spacer->isChecked();
575 bool pSt = m_d->ui_misc.checkBox_NSW_Passive_Structure->isChecked();
576 bool pAP = m_d->ui_misc.checkBox_NSW_Passive_APlate->isChecked();
577
578 messageVerbose ("Emitting autoAdaptPixelsOrSCT("+str(reset)+","+str(stgc)+","+str(mm)+")");
579 emit autoAdaptMuonNSW(reset, stgc, mm, pSp, pSt, pAP);
580}
void autoAdaptMuonNSW(bool, bool, bool, bool, bool, bool)
constexpr std::enable_if_t< is_bitmask_v< E >, E & > reset(E &lhs, E rhs)
Convenience function to clear bits in a class enum bitmask.
Definition bitmask.h:251

◆ emit_autoAdaptPixelsOrSCT

void GeoSysController::emit_autoAdaptPixelsOrSCT ( )
privateslot

Definition at line 548 of file GeoSysController.cxx.

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

◆ emit_autoExpandByVolumeOrMaterialName

void GeoSysController::emit_autoExpandByVolumeOrMaterialName ( )
privateslot

Definition at line 600 of file GeoSysController.cxx.

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

◆ emit_autoIconifyByVolumeOrMaterialName

void GeoSysController::emit_autoIconifyByVolumeOrMaterialName ( )
privateslot

Definition at line 585 of file GeoSysController.cxx.

586{
587 bool volname(sender()==m_d->ui_misc.pushButton_iconify_vols_volname
588 ||sender()==m_d->ui_misc.lineEdit_iconify_vols_volname);
589
590 QString name(volname ? m_d->ui_misc.lineEdit_iconify_vols_volname->text()
591 : "" );
592
593 if (name.isEmpty())
594 return;
595 messageVerbose("emitting autoIconifyByVolumeOrMaterialName("+str(!volname)+", "+name+")");
596 emit autoIconifyByVolumeOrMaterialName(!volname,name);
597}
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 636 of file GeoSysController.cxx.

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

◆ enabledButtonStateChanged

void VP1Controller::enabledButtonStateChanged ( )
slotinherited

Definition at line 167 of file VP1Controller.cxx.

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

◆ fallBackMaterial()

SoMaterial * VP1Controller::fallBackMaterial ( ) const
protectedinherited

Definition at line 427 of file VP1Controller.cxx.

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

◆ getMaterial()

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

Definition at line 437 of file VP1Controller.cxx.

438{
439 if (!mb) {
440 message("ERROR: Null material button pointer");
441 return fallBackMaterial();
442 }
443 QList<SoMaterial*> mats = mb->handledMaterials();
444 if (mats.count()!=1) {
445 message("ERROR: No material in button "+mb->objectName());
446 return fallBackMaterial();
447 }
448 return mats.at(0);
449
450
451}
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 ( 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 dialog->setWindowTitle(txt+" ["+systemBase()->name()+"]");
128 dialog->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 m_d->dialogs << new Imp::DialogInfo(launchButton,dialog,enabledButton);
144
145 connect(launchButton,SIGNAL(clicked()),this,SLOT(toggleDialogState()));
146 if (enabledButton)
147 connect(enabledButton,SIGNAL(toggled(bool)),this,SLOT(enabledButtonStateChanged()));
148 CloseEventEater* closeEventEater = new CloseEventEater(this);
149 dialog->installEventFilter(closeEventEater);
150
151 if(closeButton) {
152 closeButton->setText("&Close");
153 closeButton->setToolTip("Close this dialog [Esc]");
154 connect(closeButton,SIGNAL(clicked()),dialog,SLOT(close()));
155 }
156 connect(new QShortcut(QKeySequence(Qt::Key_Escape), dialog),SIGNAL(activated()),dialog,SLOT(close()));
157
158 //To avoid an extra call in the code we do this a few times more than necessary (fixme: put in initLastVars!!):
159 int maxwidth(0);
160 for (Imp::DialogInfo* di : m_d->dialogs)
161 maxwidth = std::max(maxwidth,di->launchButton->sizeHint().width());
162 for (Imp::DialogInfo* di : m_d->dialogs)
163 di->launchButton->setMinimumWidth(maxwidth);
164}
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 144 of file VP1Controller.h.

144 {
145 QWidget * w = new QWidget(0,Qt::WindowStaysOnTopHint);
146 theUI.setupUi(w);
147 initDialog(w, launchbutton, theUI.pushButton_close,enabledButton);
148}

◆ 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 97 of file VP1Controller.h.

97{ return m_initVarsMode; }

◆ labelPosOffset()

QList< int > GeoSysController::labelPosOffset ( )

Offset in x,y,z.

Definition at line 531 of file GeoSysController.cxx.

532{
533 QList<int> values;
534 values << m_d->ui_disp.horizontalSlider_labels_xOffset->value();
535 values << m_d->ui_disp.horizontalSlider_labels_yOffset->value();
536 values << m_d->ui_disp.horizontalSlider_labels_zOffset->value();
537 return values;
538}

◆ labelPosOffsetChanged

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

◆ labels()

int GeoSysController::labels ( ) const

Definition at line 520 of file GeoSysController.cxx.

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

◆ labelsChanged

void GeoSysController::labelsChanged ( int )
signal

◆ lastSelectedVolume()

VolumeHandle * GeoSysController::lastSelectedVolume ( ) const

Definition at line 300 of file GeoSysController.cxx.

301{
302 return m_d->lastSelectedVolHandle;
303}

◆ loadMaterialsFromFile

void GeoSysController::loadMaterialsFromFile ( QString )
signal

◆ loadMaterialsRequested

void GeoSysController::loadMaterialsRequested ( )
privateslot

Definition at line 333 of file GeoSysController.cxx.

334{
335 QString filename = QFileDialog::getOpenFileName(this, "Select geometry material file to load",
336 (m_d->lastLoadMaterialsFile.isEmpty()?
338 :m_d->lastLoadMaterialsFile),
339 "VP1 geometry material files (*.vp1geomat)",
340 0,QFileDialog::DontResolveSymlinks);
341 if(filename.isEmpty())
342 return;
343
344 m_d->lastLoadMaterialsFile = filename;
345
346 messageVerbose("Emitting loadMaterialsFromFile(\""+filename+"\")");
347 emit loadMaterialsFromFile(filename);
348}
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 468 of file GeoSysController.cxx.

469{
470 VP1GeoFlags::MuonChamberAdaptionStyleFlags f;
471 if (m_d->ui_muon.checkBox_muonadapt_openmdtchambers->isChecked())
473 if (m_d->ui_muon.checkBox_muonadapt_hidetubes->isChecked())
475 if (m_d->ui_muon.checkBox_muonadapt_hiderpcvolumes->isChecked())
477 if (m_d->ui_muon.checkBox_muonadapt_opencscchambers->isChecked())
479 if (m_d->ui_muon.checkBox_muonadapt_opentgcchambers->isChecked())
481 return f;
482}

◆ muonChamberAdaptionStyleChanged

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

◆ orientViewToMuonChambersOnClick()

bool GeoSysController::orientViewToMuonChambersOnClick ( ) const

Definition at line 394 of file GeoSysController.cxx.

395{
396 return m_d->ui_int.checkBox_AutomaticMuonChamberEndViews->isChecked();
397}

◆ phiSectionWidget()

PhiSectionWidget * GeoSysController::phiSectionWidget ( ) const

Definition at line 376 of file GeoSysController.cxx.

377{
378 return m_d->ui_disp.phisectionwidget;
379}

◆ pickStyle()

SoPickStyle * GeoSysController::pickStyle ( ) const

Definition at line 364 of file GeoSysController.cxx.

365{
366 return m_d->pickStyle;
367}

◆ 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 412 of file GeoSysController.cxx.

413{
414 return m_d->ui_int.checkBox_print_copyno->isChecked();
415}

◆ printInfoOnClick_Mass()

bool GeoSysController::printInfoOnClick_Mass ( ) const

Definition at line 430 of file GeoSysController.cxx.

431{
432 return m_d->ui_int.checkBox_print_mass->isChecked();
433}

◆ printInfoOnClick_Material()

bool GeoSysController::printInfoOnClick_Material ( ) const

Definition at line 406 of file GeoSysController.cxx.

407{
408 return m_d->ui_int.checkBox_print_material->isChecked();
409}

◆ printInfoOnClick_MuonStationInfo()

bool GeoSysController::printInfoOnClick_MuonStationInfo ( ) const

Definition at line 436 of file GeoSysController.cxx.

437{
438 return m_d->ui_int.checkBox_print_muonstationinfo->isChecked();
439}

◆ printInfoOnClick_Shape()

bool GeoSysController::printInfoOnClick_Shape ( ) const

Definition at line 400 of file GeoSysController.cxx.

401{
402 return m_d->ui_int.checkBox_print_shape->isChecked();
403}

◆ printInfoOnClick_Transform()

bool GeoSysController::printInfoOnClick_Transform ( ) const

Definition at line 418 of file GeoSysController.cxx.

419{
420 return m_d->ui_int.checkBox_print_transform->isChecked();
421}

◆ printInfoOnClick_Tree()

bool GeoSysController::printInfoOnClick_Tree ( ) const

Definition at line 424 of file GeoSysController.cxx.

425{
426 return m_d->ui_int.checkBox_print_tree->isChecked();
427}

◆ resetSubSystems

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

◆ restoreSettings()

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

Definition at line 387 of file VP1Controller.cxx.

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

◆ saveMaterialsRequested

void GeoSysController::saveMaterialsRequested ( )
privateslot

Definition at line 306 of file GeoSysController.cxx.

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

◆ saveMaterialsToFile

void GeoSysController::saveMaterialsToFile ( QString ,
bool  )
signal

◆ saveSettings()

QByteArray VP1Controller::saveSettings ( ) const
inherited

Definition at line 405 of file VP1Controller.cxx.

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

◆ setAutoAdaptMuonChambersToEventData()

void GeoSysController::setAutoAdaptMuonChambersToEventData ( bool b)

Definition at line 278 of file GeoSysController.cxx.

279{
280 m_d->ui_muon.checkBox_muonadapt_autoadapt->setChecked(b);
281}

◆ setComplexity()

void GeoSysController::setComplexity ( double c)

Definition at line 260 of file GeoSysController.cxx.

261{
262 m_d->ui_disp.widget_drawOptions->setComplexity(c);
263}

◆ setCustomTourEditor()

void VP1Controller::setCustomTourEditor ( VP1CustomTourEditor * editor)
inlinestaticinherited

Definition at line 60 of file VP1Controller.h.

60{ m_customTourEditor=editor;}

◆ setGeometrySelectable()

void GeoSysController::setGeometrySelectable ( bool b)

Definition at line 253 of file GeoSysController.cxx.

254{
255 m_d->ui_int.checkBox_geomselectable->setChecked(b);
257}

◆ 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 498 of file GeoSysController.cxx.

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

◆ setLastSelectedVolume()

void GeoSysController::setLastSelectedVolume ( VolumeHandle * vh)

Definition at line 284 of file GeoSysController.cxx.

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

◆ setOrientViewToMuonChambersOnClick()

void GeoSysController::setOrientViewToMuonChambersOnClick ( bool b)

Definition at line 272 of file GeoSysController.cxx.

273{
274 m_d->ui_int.checkBox_AutomaticMuonChamberEndViews->setChecked(b);
275}

◆ 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 255 of file VP1Controller.cxx.

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

◆ setZoomToVolumeOnClick()

void GeoSysController::setZoomToVolumeOnClick ( bool b)

Definition at line 266 of file GeoSysController.cxx.

267{
268 m_d->ui_int.checkBox_zoomToVolumes->setChecked(b);
269}

◆ showVolumeOutLines()

bool GeoSysController::showVolumeOutLines ( ) const

Definition at line 462 of file GeoSysController.cxx.

463{
464 return m_d->ui_disp.checkBox_showVolumeOutLines->isChecked();
465}

◆ 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 351 of file GeoSysController.cxx.

352{
353 std::map<VP1GeoFlags::SubSystemFlag,QCheckBox*>::const_iterator it = m_d->subSysCheckBoxMap.find(f);
354 return it==m_d->subSysCheckBoxMap.end() ? 0 : it->second;
355}

◆ 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 112 of file VP1Controller.h.

◆ toggleDialogState

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

Definition at line 194 of file VP1Controller.cxx.

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

◆ 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 138 of file VP1Controller.h.

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

◆ 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 455 of file GeoSysController.cxx.

456{
457 int v(m_d->ui_disp.spinBox_transp->value());
458 return (v>=100?1.0:(v<=0?0.0:v/100.0));
459}

◆ transparencyChanged

void GeoSysController::transparencyChanged ( float )
signal

◆ updatePickStyle

void GeoSysController::updatePickStyle ( )
privateslot

Definition at line 448 of file GeoSysController.cxx.

449{
450 m_d->pickStyle->style = m_d->ui_int.checkBox_geomselectable->isChecked()
451 ? SoPickStyle::SHAPE : SoPickStyle::UNPICKABLE;
452}

◆ 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 370 of file GeoSysController.cxx.

371{
372 return m_d->ui_treebrowser.treeView_volumebrowser;
373}

◆ 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 382 of file GeoSysController.cxx.

383{
384 return m_d->zappedVolumeListModel;
385}

◆ zoomToVolumeOnClick()

bool GeoSysController::zoomToVolumeOnClick ( ) const

Definition at line 388 of file GeoSysController.cxx.

389{
390 return m_d->ui_int.checkBox_zoomToVolumes->isChecked();
391}

Member Data Documentation

◆ m_customTourEditor

VP1CustomTourEditor * VP1Controller::m_customTourEditor =0
staticprivateinherited

Definition at line 125 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 129 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: