00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #ifdef G4VIS_BUILD_OPENGLQT_DRIVER
00034
00035 #ifndef G4OPENGLSTOREDQTVIEWER_HH
00036 #define G4OPENGLSTOREDQTVIEWER_HH
00037
00038 #include "G4OpenGLStoredViewer.hh"
00039 #include "G4OpenGLQtViewer.hh"
00040 #include <qgl.h>
00041
00042 class QMouseEvent;
00043 class QWheelEvent;
00044 class QContextMenuEvent;
00045
00046 class G4OpenGLStoredSceneHandler;
00047
00048 class G4OpenGLStoredQtViewer:
00049 public G4OpenGLQtViewer, public G4OpenGLStoredViewer, public QGLWidget {
00050
00051 public:
00052 G4OpenGLStoredQtViewer (G4OpenGLStoredSceneHandler& scene,
00053 const G4String& name = "");
00054 ~G4OpenGLStoredQtViewer ();
00055 void Initialise ();
00056 void initializeGL ();
00057 void DrawView ();
00058 void resizeGL(int width,int height);
00059 void paintGL();
00060 void updateQWidget();
00061 void ShowView ();
00062 void DisplayTimePOColourModification (G4Colour&,size_t);
00063
00064 protected:
00065
00066
00067 G4bool CompareForKernelVisit(G4ViewParameters&);
00068
00069
00070 G4bool POSelected(size_t POListIndex);
00071 G4bool TOSelected(size_t TOListIndex);
00072
00073 void showEvent(QShowEvent * event );
00074 void wheelEvent(QWheelEvent *event);
00075 void mousePressEvent(QMouseEvent *event);
00076 void mouseMoveEvent(QMouseEvent *event);
00077 void mouseDoubleClickEvent(QMouseEvent *event);
00078 void mouseReleaseEvent(QMouseEvent *event);
00079 void contextMenuEvent(QContextMenuEvent *e);
00080 void keyPressEvent (QKeyEvent * event);
00081 void paintEvent(QPaintEvent *event);
00082 private:
00083 void ComputeView ();
00084
00085
00086 };
00087
00088 #endif
00089
00090 #endif