00001 00003 // // 00004 // Header file for class GuideSysController // 00005 // // 00006 // Description: Guide system controller. // 00007 // // 00008 // Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch) // 00009 // Initial version: July 2008 // 00010 // // 00012 00013 #ifndef GUIDESYSCONTROLLER_H 00014 #define GUIDESYSCONTROLLER_H 00015 00016 #include "VP1Base/VP1Controller.h" 00017 #include "VP1Utils/InDetProjFlags.h" 00018 #include <Inventor/SbColor4f.h> 00019 class SoMaterial; 00020 00021 class GuideSysController : public VP1Controller { 00022 00023 Q_OBJECT 00024 00025 public: 00026 00027 GuideSysController(IVP1System * sys); 00028 virtual ~GuideSysController(); 00029 00030 void actualRestoreSettings(VP1Deserialise&); 00031 int currentSettingsVersion() const; 00032 void actualSaveSettings(VP1Serialise&) const; 00033 00035 // Access Methods for settings // 00037 00038 //Fixme: SoGroup * drawOptions() const; 00039 00040 //Various materials: 00041 SoMaterial * lettersMaterial() const; 00042 SoMaterial * xAxisMaterial() const; 00043 SoMaterial * yAxisMaterial() const; 00044 SoMaterial * zAxisMaterial() const; 00045 SoMaterial * etaCone1Material() const; 00046 SoMaterial * etaCone2Material() const; 00047 SoMaterial * etaCone3Material() const; 00048 SoMaterial * pixelProjSurfMaterial() const; 00049 SoMaterial * sctProjSurfMaterial() const; 00050 SoMaterial * trtProjSurfMaterial() const; 00051 00052 //Floor: 00053 bool showFloor() const; 00054 SbColor4f floorColourAndTransp() const; 00055 double floorExtent() const; 00056 double floorSpacing() const; 00057 double floorHeight() const; 00058 00059 //Letters: 00060 bool showLetters() const; 00061 double lettersZPos() const; 00062 double lettersVerticalPos() const; 00063 00064 //Coordinate axis 00065 bool showAxes() const; 00066 double axesLength() const;//A negative value means that negative parts will be shown as well 00067 SbVec3f axesPosition() const; 00068 double relAxesThickness() const; 00069 00070 //Grid: 00071 bool showCartesianGrid() const; 00072 bool showCylindricalGrid() const; 00073 SbColor4f gridColourAndTransp() const; 00074 double gridSpacing() const; 00075 double gridExtent() const; 00076 00077 //Eta cones: 00078 bool showEtaCone1() const; 00079 bool showEtaCone2() const; 00080 bool showEtaCone3() const; 00081 double etaConeValue1() const; 00082 double etaConeValue2() const; 00083 double etaConeValue3() const; 00084 double etaExtent() const;//>0: extent means to a given radius, <0: extent means to a given z. 00085 00086 //ID Proj surfs: 00087 00088 //This is the surfaces the data systems should project their data to: 00089 InDetProjFlags::InDetProjPartsFlags applicablePixelProjParts() const; 00090 InDetProjFlags::InDetProjPartsFlags applicableSCTProjParts() const; 00091 InDetProjFlags::InDetProjPartsFlags applicableTRTProjParts() const; 00092 //This is the surfaces the guideline system should draw surfaces: 00093 InDetProjFlags::InDetProjPartsFlags shownPixelProjSurfaces() const; 00094 InDetProjFlags::InDetProjPartsFlags shownSCTProjSurfaces() const; 00095 InDetProjFlags::InDetProjPartsFlags shownTRTProjSurfaces() const; 00096 00097 //Info arriving from other systems: 00098 void setInDetDetTypesUsingProjections(InDetProjFlags::DetTypeFlags); 00099 00101 // Signals for changes in settings // 00103 signals: 00104 void showFloorChanged(bool); 00105 void floorColourAndTranspChanged( const SbColor4f& ); 00106 void floorExtentChanged(const double&); 00107 void floorSpacingChanged(const double&); 00108 void floorHeightChanged(const double&); 00109 void showLettersChanged(bool); 00110 void lettersZPosChanged(const double&); 00111 void lettersVerticalPosChanged(const double&); 00112 void showAxesChanged(bool); 00113 void axesLengthChanged(const double&); 00114 void axesPositionChanged(const SbVec3f&); 00115 void relAxesThicknessChanged(const double&); 00116 void showCartesianGridChanged(bool); 00117 void showCylindricalGridChanged(bool); 00118 void gridColourAndTranspChanged( const SbColor4f& ); 00119 void gridSpacingChanged(const double&); 00120 void gridExtentChanged(const double&); 00121 void showEtaCone1Changed(bool); 00122 void showEtaCone2Changed(bool); 00123 void showEtaCone3Changed(bool); 00124 void etaConeValue1Changed(const double&); 00125 void etaConeValue2Changed(const double&); 00126 void etaConeValue3Changed(const double&); 00127 void etaExtentChanged(const double&); 00128 void applicablePixelProjPartsChanged(InDetProjFlags::InDetProjPartsFlags); 00129 void applicableSCTProjPartsChanged(InDetProjFlags::InDetProjPartsFlags); 00130 void applicableTRTProjPartsChanged(InDetProjFlags::InDetProjPartsFlags); 00131 void shownPixelProjSurfacesChanged(InDetProjFlags::InDetProjPartsFlags); 00132 void shownSCTProjSurfacesChanged(InDetProjFlags::InDetProjPartsFlags); 00133 void shownTRTProjSurfacesChanged(InDetProjFlags::InDetProjPartsFlags); 00134 00135 private: 00136 00137 class Imp; 00138 Imp * d; 00139 00140 private slots: 00141 void updateProjPartsCheckboxStates_Pixel(); 00142 void updateProjPartsCheckboxStates_SCT(); 00143 void updateProjPartsCheckboxStates_TRT(); 00144 void possibleChange_showFloor(); 00145 void possibleChange_floorColourAndTransp(); 00146 void possibleChange_floorExtent(); 00147 void possibleChange_floorSpacing(); 00148 void possibleChange_floorHeight(); 00149 void possibleChange_showLetters(); 00150 void possibleChange_lettersZPos(); 00151 void possibleChange_lettersVerticalPos(); 00152 void possibleChange_showAxes(); 00153 void possibleChange_axesLength(); 00154 void possibleChange_axesPosition(); 00155 void possibleChange_relAxesThickness(); 00156 void possibleChange_showCartesianGrid(); 00157 void possibleChange_showCylindricalGrid(); 00158 void possibleChange_gridColourAndTransp(); 00159 void possibleChange_gridSpacing(); 00160 void possibleChange_gridExtent(); 00161 void possibleChange_showEtaCone1(); 00162 void possibleChange_showEtaCone2(); 00163 void possibleChange_showEtaCone3(); 00164 void possibleChange_etaConeValue1(); 00165 void possibleChange_etaConeValue2(); 00166 void possibleChange_etaConeValue3(); 00167 void possibleChange_etaExtent(); 00168 void possibleChange_applicablePixelProjParts(); 00169 void possibleChange_applicableSCTProjParts(); 00170 void possibleChange_applicableTRTProjParts(); 00171 void possibleChange_shownPixelProjSurfaces(); 00172 void possibleChange_shownSCTProjSurfaces(); 00173 void possibleChange_shownTRTProjSurfaces(); 00174 }; 00175 00176 #endif