ATLAS Offline Software
VP1ExaminerViewer.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
7 // //
8 // Header file for class VP1ExaminerViewer //
9 // //
10 // Description: Examiner Viewer specialisation for VP1 //
11 // //
12 // Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch) //
13 // Initial version: March 2008 //
14 // //
16 
17 #ifndef VP1EXAMINERVIEWER_H
18 #define VP1EXAMINERVIEWER_H
19 
20 #include "VP1Base/VP1String.h"
21 #include <Inventor/C/errors/debugerror.h>
22 #include <Inventor/Qt/viewers/SoQtExaminerViewer.h>
23 #include <QObject>
24 class QPixmap;
25 
26 
27 
28 
29 
30 class VP1ExaminerViewer : public SoQtExaminerViewer, public VP1String {
31 
32 public:
33 
34  VP1ExaminerViewer( QWidget * parent = 0,//This is not really the parent.
35  bool detectorViewButtons = true,
36  const char * name = 0,
37  SbBool embed = TRUE,
38  SoQtFullViewer::BuildFlag flag = BUILD_ALL,
39  SoQtViewer::Type type = BROWSER);
40 
43 
44  virtual ~VP1ExaminerViewer();//NB: SoQtExaminerViewer has non-virtual destructor!
45 
46  virtual void removeDecorationMenuOption();
47 
48  virtual QByteArray saveState();
49  virtual void restoreFromState(QByteArray);
50 
51  virtual void viewAll();
52  virtual void toggleCameraType();
53  virtual void setCameraType(SoType type);
54  virtual void setSeekMode(SbBool enable);
55  virtual void setViewing(SbBool enable);
56  virtual void setBufferingType(SoQtViewer::BufferType);
57  virtual void setAntialiasing(SbBool smoothing, int numPasses);
58  virtual void setTransparencyType(SoGLRenderAction::TransparencyType);
59  virtual void setDrawStyle(SoQtViewer::DrawType, SoQtViewer::DrawStyle);
60  virtual void showPopupMenu();
61 
62  void setAmbientLight(int);//from 0..100
63  int ambientLight() const;
64 
65  virtual void setSceneGraph(SoNode *);
66  virtual SoNode* getSceneGraph();
67 
68  void fadeLastRecordedFrameToCurrent(double time_seconds);
69 
70  //For consistency, use these instead of setNumPasses:
71  bool isAntiAlias() const;
72  void setAntiAlias(bool);
73 
74  void startTour();
75  bool startTourEachEvent() const;
76  void startCustomTour();
77  void dumpSceneToFile(QString filename="");//empty file names causes file dialog to be launched
78  void dumpSceneToVRMLFile(QString filename="");//empty file names causes file dialog to be launched
79  void produceSVGImage(QString filename="");//empty file names causes file dialog to be launched
80  void produceEPSImage(QString filename="");//empty file names causes file dialog to be launched
81 
83  void resetCamera();
84 
85  bool currentCamIsPerspective() const;
86  QByteArray currentCameraState() const;
87 
88  QPixmap getSnapShotFromCamState(bool camStateIsPerspective, QByteArray camState,
89  int width, int height, bool transp = false );
90 
94 
95  //public Q_SLOTS:
96 
97  // stereographic view slots
98  void setStereoOffsetSlot(float offset);
99  float getStereoOffsetSlot();
100  SbBool setStereoTypeSlot(SoQtViewer::StereoType type);
101  SoQtViewer::StereoType getStereoTypeSlot(void) const;
102  void setAnaglyphStereoColorMasksSlot(const SbBool left[3], const SbBool right[3]);
103  void getAnaglyphStereoColorMasksSlot( SbBool left[3], SbBool right[3]);
104  // void setStereoEyeSlot(SoQtViewerP::Eye eye);
105 
106  void launchStereoEditor();
107 
108 
109 protected:
110  virtual void bottomWheelFinish();
111  virtual void bottomWheelMotion(float val);
112  virtual void bottomWheelStart();
113  virtual void leftWheelFinish();
114  virtual void leftWheelMotion(float val);
115  virtual void leftWheelStart();
116  virtual void rightWheelFinish();
117  virtual void rightWheelMotion(float val);
118  virtual void rightWheelStart();
119 
120  virtual void createViewerButtons(QWidget * parent, SbPList * buttonlist);
121  virtual void buildPopupMenu();
122  virtual SbBool processSoEvent(const SoEvent * const event);
123 
124 
125 
126 
127 private:
128 
129  class Imp;
130  Imp * m_d;
132 
133 };
134 
135 class VP1ExaminerViewer_SignalCatcher : public QObject {
136  Q_OBJECT
137  private Q_SLOTS:
138  void catchSignal();
139  private:
142 };
143 
144 #endif
VP1ExaminerViewer::setViewing
virtual void setViewing(SbBool enable)
Definition: VP1ExaminerViewer.cxx:1510
VP1ExaminerViewer::getStereoTypeSlot
SoQtViewer::StereoType getStereoTypeSlot(void) const
Definition: VP1ExaminerViewer.cxx:584
VP1ExaminerViewer::bottomWheelStart
virtual void bottomWheelStart()
Definition: VP1ExaminerViewer.cxx:1534
VP1String
Definition: VP1String.h:43
VP1ExaminerViewer::stereo_offset_viewer
float stereo_offset_viewer
Definition: VP1ExaminerViewer.h:93
VP1ExaminerViewer::removeDecorationMenuOption
virtual void removeDecorationMenuOption()
Definition: VP1ExaminerViewer.cxx:1377
VP1ExaminerViewer::rightWheelStart
virtual void rightWheelStart()
Definition: VP1ExaminerViewer.cxx:1587
VP1String.h
VP1ExaminerViewer::toggleCameraType
virtual void toggleCameraType()
Definition: VP1ExaminerViewer.cxx:1472
VP1ExaminerViewer::setCameraType
virtual void setCameraType(SoType type)
Definition: VP1ExaminerViewer.cxx:1480
VP1ExaminerViewer::VP1ExaminerViewer
VP1ExaminerViewer(QWidget *parent=0, bool detectorViewButtons=true, const char *name=0, SbBool embed=TRUE, SoQtFullViewer::BuildFlag flag=BUILD_ALL, SoQtViewer::Type type=BROWSER)
Definition: VP1ExaminerViewer.cxx:526
VP1ExaminerViewer::setSceneGraph
virtual void setSceneGraph(SoNode *)
Definition: VP1ExaminerViewer.cxx:3115
VP1ExaminerViewer::getAnaglyphStereoColorMasksSlot
void getAnaglyphStereoColorMasksSlot(SbBool left[3], SbBool right[3])
Definition: VP1ExaminerViewer.cxx:590
VP1ExaminerViewer::currentCamIsPerspective
bool currentCamIsPerspective() const
Definition: VP1ExaminerViewer.cxx:1775
VP1ExaminerViewer::setAntialiasing
virtual void setAntialiasing(SbBool smoothing, int numPasses)
Definition: VP1ExaminerViewer.cxx:1648
VP1ExaminerViewer::~VP1ExaminerViewer
virtual ~VP1ExaminerViewer()
Definition: VP1ExaminerViewer.cxx:920
VP1ExaminerViewer::rightWheelFinish
virtual void rightWheelFinish()
Definition: VP1ExaminerViewer.cxx:1573
VP1ExaminerViewer::produceEPSImage
void produceEPSImage(QString filename="")
Definition: VP1ExaminerViewer.cxx:2374
VP1ExaminerViewer::setSeekMode
virtual void setSeekMode(SbBool enable)
Definition: VP1ExaminerViewer.cxx:1502
VP1ExaminerViewer::setTransparencyType
virtual void setTransparencyType(SoGLRenderAction::TransparencyType)
Definition: VP1ExaminerViewer.cxx:1731
VP1ExaminerViewer::viewAll
virtual void viewAll()
Definition: VP1ExaminerViewer.cxx:1457
VP1ExaminerViewer::produceSVGImage
void produceSVGImage(QString filename="")
Definition: VP1ExaminerViewer.cxx:2326
VP1ExaminerViewer::dumpSceneToFile
void dumpSceneToFile(QString filename="")
Definition: VP1ExaminerViewer.cxx:2254
VP1ExaminerViewer_SignalCatcher::m_d
VP1ExaminerViewer::Imp * m_d
Definition: VP1ExaminerViewer.h:140
VP1ExaminerViewer::ambientLight
int ambientLight() const
Definition: VP1ExaminerViewer.cxx:2433
Type
RootType Type
Definition: TrigTSerializer.h:30
VP1ExaminerViewer_SignalCatcher
Definition: VP1ExaminerViewer.h:135
VP1ExaminerViewer::createViewerButtons
virtual void createViewerButtons(QWidget *parent, SbPList *buttonlist)
Definition: VP1ExaminerViewer.cxx:931
VP1ExaminerViewer::leftWheelStart
virtual void leftWheelStart()
Definition: VP1ExaminerViewer.cxx:1566
VP1ExaminerViewer::setBufferingType
virtual void setBufferingType(SoQtViewer::BufferType)
Definition: VP1ExaminerViewer.cxx:1642
VP1ExaminerViewer::getSnapShotFromCamState
QPixmap getSnapShotFromCamState(bool camStateIsPerspective, QByteArray camState, int width, int height, bool transp=false)
Definition: VP1ExaminerViewer.cxx:1788
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
VP1ExaminerViewer::getSceneGraph
virtual SoNode * getSceneGraph()
Definition: VP1ExaminerViewer.cxx:3138
VP1ExaminerViewer::dumpSceneToVRMLFile
void dumpSceneToVRMLFile(QString filename="")
Definition: VP1ExaminerViewer.cxx:2290
VP1ExaminerViewer::leftWheelMotion
virtual void leftWheelMotion(float val)
Definition: VP1ExaminerViewer.cxx:1549
VP1ExaminerViewer::stereo_parallax_camera
float stereo_parallax_camera
Definition: VP1ExaminerViewer.h:92
master.flag
bool flag
Definition: master.py:29
VP1ExaminerViewer::startTour
void startTour()
Definition: VP1ExaminerViewer.cxx:1164
VP1ExaminerViewer::rightWheelMotion
virtual void rightWheelMotion(float val)
Definition: VP1ExaminerViewer.cxx:1580
VP1ExaminerViewer::restoreFromState
virtual void restoreFromState(QByteArray)
Definition: VP1ExaminerViewer.cxx:764
VP1ExaminerViewer::currentCameraState
QByteArray currentCameraState() const
Definition: VP1ExaminerViewer.cxx:1781
test_pyathena.parent
parent
Definition: test_pyathena.py:15
VP1ExaminerViewer::buildPopupMenu
virtual void buildPopupMenu()
Definition: VP1ExaminerViewer.cxx:1369
VP1ExaminerViewer::operator=
VP1ExaminerViewer & operator=(const VP1ExaminerViewer &)=delete
python.Constants.TRUE
bool TRUE
for job options legacy (TODO: get rid of these!) ----------------------—
Definition: Control/AthenaCommon/python/Constants.py:22
VP1ExaminerViewer::setAnaglyphStereoColorMasksSlot
void setAnaglyphStereoColorMasksSlot(const SbBool left[3], const SbBool right[3])
Definition: VP1ExaminerViewer.cxx:587
VP1ExaminerViewer::VP1ExaminerViewer
VP1ExaminerViewer(const VP1ExaminerViewer &)=delete
VP1ExaminerViewer::launchStereoEditor
void launchStereoEditor()
Definition: VP1ExaminerViewer.cxx:2944
VP1ExaminerViewer::resetCamera
void resetCamera()
Definition: VP1ExaminerViewer.cxx:1760
VP1ExaminerViewer::setDrawStyle
virtual void setDrawStyle(SoQtViewer::DrawType, SoQtViewer::DrawStyle)
Definition: VP1ExaminerViewer.cxx:1737
VP1ExaminerViewer::startTourEachEvent
bool startTourEachEvent() const
Definition: VP1ExaminerViewer.cxx:1172
VP1ExaminerViewer::setStereoTypeSlot
SbBool setStereoTypeSlot(SoQtViewer::StereoType type)
Definition: VP1ExaminerViewer.cxx:580
VP1ExaminerViewer::setAmbientLight
void setAmbientLight(int)
Definition: VP1ExaminerViewer.cxx:2420
VP1ExaminerViewer::setAntiAlias
void setAntiAlias(bool)
Definition: VP1ExaminerViewer.cxx:1752
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
VP1ExaminerViewer::startCustomTour
void startCustomTour()
Definition: VP1ExaminerViewer.cxx:1244
VP1ExaminerViewer::fadeLastRecordedFrameToCurrent
void fadeLastRecordedFrameToCurrent(double time_seconds)
Definition: VP1ExaminerViewer.cxx:3144
VP1ExaminerViewer::bottomWheelFinish
virtual void bottomWheelFinish()
Definition: VP1ExaminerViewer.cxx:1518
VP1ExaminerViewer::stereo_offset_camera
float stereo_offset_camera
Definition: VP1ExaminerViewer.h:91
VP1ExaminerViewer::Imp
Definition: VP1ExaminerViewer.cxx:68
Base_Fragment.width
width
Definition: Sherpa_i/share/common/Base_Fragment.py:59
VP1ExaminerViewer::getStereoOffsetSlot
float getStereoOffsetSlot()
Definition: VP1ExaminerViewer.cxx:577
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
VP1ExaminerViewer::setStereoOffsetSlot
void setStereoOffsetSlot(float offset)
Definition: VP1ExaminerViewer.cxx:573
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
VP1ExaminerViewer_SignalCatcher::catchSignal
void catchSignal()
Definition: VP1ExaminerViewer.cxx:1138
convertTimingResiduals.offset
offset
Definition: convertTimingResiduals.py:71
CaloCellTimeCorrFiller.filename
filename
Definition: CaloCellTimeCorrFiller.py:24
VP1ExaminerViewer::showPopupMenu
virtual void showPopupMenu()
Definition: VP1ExaminerViewer.cxx:2439
VP1ExaminerViewer::storeCameraParametersForReset
void storeCameraParametersForReset()
Definition: VP1ExaminerViewer.cxx:1814
VP1ExaminerViewer::processSoEvent
virtual SbBool processSoEvent(const SoEvent *const event)
Definition: VP1ExaminerViewer.cxx:1391
VP1ExaminerViewer::saveState
virtual QByteArray saveState()
Definition: VP1ExaminerViewer.cxx:638
VP1ExaminerViewer::bottomWheelMotion
virtual void bottomWheelMotion(float val)
Definition: VP1ExaminerViewer.cxx:1526
VP1ExaminerViewer::m_d
Imp * m_d
Definition: VP1ExaminerViewer.h:129
VP1ExaminerViewer
Definition: VP1ExaminerViewer.h:30
VP1ExaminerViewer::leftWheelFinish
virtual void leftWheelFinish()
Definition: VP1ExaminerViewer.cxx:1542
VP1ExaminerViewer::isAntiAlias
bool isAntiAlias() const
Definition: VP1ExaminerViewer.cxx:1743