Geant4-11
source
visualization
Qt3D
include
G4Qt3DViewer.hh
Go to the documentation of this file.
1
//
2
// ********************************************************************
3
// * License and Disclaimer *
4
// * *
5
// * The Geant4 software is copyright of the Copyright Holders of *
6
// * the Geant4 Collaboration. It is provided under the terms and *
7
// * conditions of the Geant4 Software License, included in the file *
8
// * LICENSE and available at http://cern.ch/geant4/license . These *
9
// * include a list of copyright holders. *
10
// * *
11
// * Neither the authors of this software system, nor their employing *
12
// * institutes,nor the agencies providing financial support for this *
13
// * work make any representation or warranty, express or implied, *
14
// * regarding this software system or assume any liability for its *
15
// * use. Please see the license in the file LICENSE and URL above *
16
// * for the full disclaimer and the limitation of liability. *
17
// * *
18
// * This code implementation is the result of the scientific and *
19
// * technical work of the GEANT4 collaboration. *
20
// * By using, copying, modifying or distributing the software (or *
21
// * any work based on the software) you agree to acknowledge its *
22
// * use in resulting scientific publications, and indicate your *
23
// * acceptance of all terms of the Geant4 Software license. *
24
// ********************************************************************
25
//
26
// John Allison 17th June 2019
27
28
#ifndef G4QT3DVIEWER_HH
29
#define G4QT3DVIEWER_HH
30
31
#include "
G4Qt3DSceneHandler.hh
"
32
33
#include "
G4VViewer.hh
"
34
35
#include <Qt3DExtras>
36
37
class
G4Qt3DViewer
:
public
G4VViewer
,
public
Qt3DExtras::Qt3DWindow
38
{
39
public
:
40
41
G4Qt3DViewer
(
G4Qt3DSceneHandler
&,
const
G4String
&
name
);
42
virtual
~G4Qt3DViewer
();
43
void
Initialise
();
44
void
SetView
();
45
void
ClearView
();
46
void
DrawView
();
47
void
ShowView
();
48
void
FinishView
();
49
50
void
MovingToVisSubThread
();
51
void
SwitchToVisSubThread
();
52
void
MovingToMasterThread
();
53
void
SwitchToMasterThread
();
54
55
protected
:
56
57
void
KernelVisitDecision
();
58
G4bool
CompareForKernelVisit
(
G4ViewParameters
&);
59
60
void
keyPressEvent
(QKeyEvent*);
61
void
keyReleaseEvent
(QKeyEvent*);
62
void
mouseDoubleClickEvent
(QMouseEvent*);
63
void
mouseMoveEvent
(QMouseEvent*);
64
void
mousePressEvent
(QMouseEvent*);
65
void
mouseReleaseEvent
(QMouseEvent*);
66
void
wheelEvent
(QWheelEvent*);
67
68
G4ViewParameters
fLastVP
;
// Memory for making kernel visit decisions.
69
G4Qt3DSceneHandler
&
fQt3DSceneHandler
;
70
71
QWidget*
fUIWidget
;
72
73
G4bool
fKeyPressed
;
74
int
fKey
;
75
G4bool
fMousePressed
;
76
G4double
fMousePressedX
,
fMousePressedY
;
77
};
78
79
#endif
G4Qt3DSceneHandler.hh
G4double
double G4double
Definition:
G4Types.hh:83
G4bool
bool G4bool
Definition:
G4Types.hh:86
G4VViewer.hh
G4Qt3DSceneHandler
Definition:
G4Qt3DSceneHandler.hh:40
G4Qt3DViewer
Definition:
G4Qt3DViewer.hh:38
G4Qt3DViewer::mousePressEvent
void mousePressEvent(QMouseEvent *)
Definition:
G4Qt3DViewer.cc:358
G4Qt3DViewer::KernelVisitDecision
void KernelVisitDecision()
Definition:
G4Qt3DViewer.cc:230
G4Qt3DViewer::fQt3DSceneHandler
G4Qt3DSceneHandler & fQt3DSceneHandler
Definition:
G4Qt3DViewer.hh:69
G4Qt3DViewer::fMousePressedY
G4double fMousePressedY
Definition:
G4Qt3DViewer.hh:76
G4Qt3DViewer::Initialise
void Initialise()
Definition:
G4Qt3DViewer.cc:48
G4Qt3DViewer::fMousePressed
G4bool fMousePressed
Definition:
G4Qt3DViewer.hh:75
G4Qt3DViewer::ClearView
void ClearView()
Definition:
G4Qt3DViewer.cc:126
G4Qt3DViewer::SwitchToMasterThread
void SwitchToMasterThread()
Definition:
G4Qt3DViewer.cc:221
G4Qt3DViewer::SwitchToVisSubThread
void SwitchToVisSubThread()
Definition:
G4Qt3DViewer.cc:195
G4Qt3DViewer::MovingToMasterThread
void MovingToMasterThread()
Definition:
G4Qt3DViewer.cc:207
G4Qt3DViewer::fMousePressedX
G4double fMousePressedX
Definition:
G4Qt3DViewer.hh:76
G4Qt3DViewer::mouseReleaseEvent
void mouseReleaseEvent(QMouseEvent *)
Definition:
G4Qt3DViewer.cc:365
G4Qt3DViewer::~G4Qt3DViewer
virtual ~G4Qt3DViewer()
Definition:
G4Qt3DViewer.cc:72
G4Qt3DViewer::fKey
int fKey
Definition:
G4Qt3DViewer.hh:74
G4Qt3DViewer::ShowView
void ShowView()
Definition:
G4Qt3DViewer.cc:155
G4Qt3DViewer::fKeyPressed
G4bool fKeyPressed
Definition:
G4Qt3DViewer.hh:73
G4Qt3DViewer::wheelEvent
void wheelEvent(QWheelEvent *)
Definition:
G4Qt3DViewer.cc:370
G4Qt3DViewer::keyPressEvent
void keyPressEvent(QKeyEvent *)
Definition:
G4Qt3DViewer.cc:294
G4Qt3DViewer::fUIWidget
QWidget * fUIWidget
Definition:
G4Qt3DViewer.hh:71
G4Qt3DViewer::G4Qt3DViewer
G4Qt3DViewer(G4Qt3DSceneHandler &, const G4String &name)
Definition:
G4Qt3DViewer.cc:39
G4Qt3DViewer::mouseDoubleClickEvent
void mouseDoubleClickEvent(QMouseEvent *)
Definition:
G4Qt3DViewer.cc:305
G4Qt3DViewer::MovingToVisSubThread
void MovingToVisSubThread()
Definition:
G4Qt3DViewer.cc:179
G4Qt3DViewer::mouseMoveEvent
void mouseMoveEvent(QMouseEvent *)
Definition:
G4Qt3DViewer.cc:307
G4Qt3DViewer::FinishView
void FinishView()
Definition:
G4Qt3DViewer.cc:165
G4Qt3DViewer::DrawView
void DrawView()
Definition:
G4Qt3DViewer.cc:129
G4Qt3DViewer::CompareForKernelVisit
G4bool CompareForKernelVisit(G4ViewParameters &)
Definition:
G4Qt3DViewer.cc:240
G4Qt3DViewer::fLastVP
G4ViewParameters fLastVP
Definition:
G4Qt3DViewer.hh:68
G4Qt3DViewer::SetView
void SetView()
Definition:
G4Qt3DViewer.cc:75
G4Qt3DViewer::keyReleaseEvent
void keyReleaseEvent(QKeyEvent *)
Definition:
G4Qt3DViewer.cc:300
G4String
Definition:
G4String.hh:62
G4VViewer
Definition:
G4VViewer.hh:45
G4ViewParameters
Definition:
G4ViewParameters.hh:90
G4InuclParticleNames::name
const char * name(G4int ptype)
Definition:
G4InuclParticleNames.hh:76
Generated by
1.9.3