-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
SimpleOpenGLStoredQtViewer.h
57 lines (47 loc) · 1.67 KB
/
SimpleOpenGLStoredQtViewer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#ifndef SIMPLEOPENGLSTOREDQTVIEWER_H
#define SIMPLEOPENGLSTOREDQTVIEWER_H
//---
// File modified by Deepak Samuel on 25 Sep 2019
#include "G4OpenGLStoredViewer.hh"
#include "SimpleOpenGLQtViewer.h"
#include <qgl.h> // include qglwidget
class QMouseEvent;
class QWheelEvent;
class QContextMenuEvent;
class G4OpenGLStoredSceneHandler;
class SimpleOpenGLStoredQtViewer:
public SimpleOpenGLQtViewer, public G4OpenGLStoredViewer, public QGLWidget {
//public SimpleOpenGLQtViewer, public G4OpenGLStoredViewer {
public:
SimpleOpenGLStoredQtViewer (G4OpenGLStoredSceneHandler& scene,
const G4String& name = "");
~SimpleOpenGLStoredQtViewer ();
void Initialise ();
void initializeGL ();
void DrawView ();
void resizeGL(int width,int height);
void paintGL();
void updateQWidget();
void ShowView ();
void DisplayTimePOColourModification (G4Colour&,size_t);
protected:
// Special version for Qt - avoid comparing VisAttributesModifiers.
G4bool CompareForKernelVisit(G4ViewParameters&);
// Two virtual functions to return sub-class selection.
G4bool POSelected(size_t POListIndex);
G4bool TOSelected(size_t TOListIndex);
void showEvent(QShowEvent * event );
void wheelEvent(QWheelEvent *event);
void mousePressEvent(QMouseEvent *event);
void mouseMoveEvent(QMouseEvent *event);
void mouseDoubleClickEvent(QMouseEvent *event);
void mouseReleaseEvent(QMouseEvent *event);
void contextMenuEvent(QContextMenuEvent *e);
void keyPressEvent (QKeyEvent * event);
void keyReleaseEvent (QKeyEvent * event);
void paintEvent(QPaintEvent *event);
private:
void ComputeView ();
// QImage glBufferImage;
};
#endif // SIMPLEOPENGLSTOREDQTVIEWER_H