ATLAS Offline Software
Loading...
Searching...
No Matches
VP1ExaminerViewer.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 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>
24class QPixmap;
25
26
27
28
29
30class VP1ExaminerViewer : public SoQtExaminerViewer, public VP1String {
31
32public:
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
109protected:
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
127private:
128
129 class Imp;
130 Imp * m_d{};
132
133};
134
135class VP1ExaminerViewer_SignalCatcher : public QObject {
136 Q_OBJECT
137 private Q_SLOTS:
138 void catchSignal();
139 private:
142};
143
144#endif
const double width
virtual void leftWheelFinish()
void fadeLastRecordedFrameToCurrent(double time_seconds)
QByteArray currentCameraState() const
void dumpSceneToVRMLFile(QString filename="")
virtual void setAntialiasing(SbBool smoothing, int numPasses)
virtual void bottomWheelStart()
VP1ExaminerViewer(QWidget *parent=0, bool detectorViewButtons=true, const char *name=0, SbBool embed=TRUE, SoQtFullViewer::BuildFlag flag=BUILD_ALL, SoQtViewer::Type type=BROWSER)
SoQtViewer::StereoType getStereoTypeSlot(void) const
virtual void setSceneGraph(SoNode *)
virtual void createViewerButtons(QWidget *parent, SbPList *buttonlist)
void setStereoOffsetSlot(float offset)
VP1ExaminerViewer & operator=(const VP1ExaminerViewer &)=delete
virtual QByteArray saveState()
virtual void setBufferingType(SoQtViewer::BufferType)
virtual SbBool processSoEvent(const SoEvent *const event)
virtual void removeDecorationMenuOption()
virtual void setDrawStyle(SoQtViewer::DrawType, SoQtViewer::DrawStyle)
void setAnaglyphStereoColorMasksSlot(const SbBool left[3], const SbBool right[3])
virtual void toggleCameraType()
void produceSVGImage(QString filename="")
virtual void buildPopupMenu()
virtual void rightWheelFinish()
QPixmap getSnapShotFromCamState(bool camStateIsPerspective, QByteArray camState, int width, int height, bool transp=false)
SbBool setStereoTypeSlot(SoQtViewer::StereoType type)
virtual void setViewing(SbBool enable)
void getAnaglyphStereoColorMasksSlot(SbBool left[3], SbBool right[3])
virtual void rightWheelStart()
virtual void setTransparencyType(SoGLRenderAction::TransparencyType)
VP1ExaminerViewer(const VP1ExaminerViewer &)=delete
virtual void showPopupMenu()
bool currentCamIsPerspective() const
friend class VP1ExaminerViewer_SignalCatcher
virtual void restoreFromState(QByteArray)
virtual void leftWheelMotion(float val)
virtual void leftWheelStart()
virtual void setSeekMode(SbBool enable)
void dumpSceneToFile(QString filename="")
virtual void bottomWheelMotion(float val)
virtual void rightWheelMotion(float val)
bool startTourEachEvent() const
virtual void bottomWheelFinish()
virtual void setCameraType(SoType type)
virtual SoNode * getSceneGraph()
void produceEPSImage(QString filename="")