Changeset 561 for trunk/geant4/visualization/OpenGL/include
- Timestamp:
- Aug 14, 2007, 12:27:44 PM (17 years ago)
- Location:
- trunk/geant4/visualization/OpenGL/include
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/geant4/visualization/OpenGL/include/G4OpenGLImmediateQtViewer.hh
r559 r561 41 41 #include "G4OpenGLQtViewer.hh" 42 42 #include <QGLWidget> 43 #include <QPaintEvent>44 43 45 44 #include "globals.hh" … … 57 56 void initializeGL (); 58 57 void DrawView (); 59 void DrawView2 ();60 58 void FinishView (); 61 59 void resizeGL(int width,int height); 62 60 void paintGL(); 63 void paintEvent(QPaintEvent*); 61 void updateQWidget(); 62 64 63 private : 65 64 int readyToPaint; -
trunk/geant4/visualization/OpenGL/include/G4OpenGLQtViewer.hh
r541 r561 42 42 #include "G4OpenGLSceneHandler.hh" 43 43 44 #include <QObject> 44 45 #include <QGLWidget> 45 46 #include <QDialog> 47 #include <QContextMenuEvent> 48 #include <QMenu> 49 #include <QPoint> 46 50 47 51 class G4OpenGLSceneHandler; 48 52 49 class G4OpenGLQtViewer: virtual public G4OpenGLViewer { 53 class G4OpenGLQtViewer: public QObject, virtual public G4OpenGLViewer { 54 55 Q_OBJECT 50 56 51 57 public: … … 54 60 void SetView (); 55 61 void ShowView (); 62 virtual void DrawView()=0; 63 virtual void updateQWidget()=0; 64 56 65 protected: 57 // void GetQtConnection ();58 66 void CreateGLQtContext (); 59 virtual void CreateMainWindow (); 60 void CreateMainWindow (QGLWidget*); 67 virtual void CreateMainWindow (QGLWidget*); 68 void manageContextMenuEvent(QContextMenuEvent *e); 69 void G4MousePressEvent(QPoint); 70 void G4MouseMoveEvent(int, int, Qt::MouseButtons); 71 void setXRotation(int angle); 72 void setYRotation(int angle); 73 void setZRotation(int angle); 74 void normalizeAngle(int *angle); 75 float getXRot(); 76 float getYRot(); 77 float getZRot(); 78 61 79 protected: 62 80 G4int WinSize_x; … … 64 82 QGLWidget* fWindow; 65 83 QDialog* GLWindow; 84 66 85 private: 67 // static LRESULT CALLBACK WindowProc(HWND,UINT,WPARAM,LPARAM); 68 // static bool SetWindowPixelFormat(HDC); 69 private: 70 // HGLRC fHGLRC; 86 void createPopupMenu(); 87 void createRadioAction(QAction *,QAction *, const std::string&,unsigned int a=1); 88 QMenu *fContextMenu; 89 bool fMouseAction; // 1: rotate 0:move 90 QPoint lastPos; 91 float xRot; 92 float yRot; 93 float zRot; 94 QAction *fDrawingWireframe; 95 QAction *fDrawingLineRemoval; 96 QAction *fDrawingSurfaceRemoval; 97 QAction *fDrawingLineSurfaceRemoval; 98 99 private slots : 100 void actionDrawingWireframe(); 101 void actionDrawingLineRemoval(); 102 void actionDrawingSurfaceRemoval(); 103 void actionDrawingLineSurfaceRemoval(); 104 void toggleDrawingAction(int); 105 void toggleMouseAction(bool); 106 void toggleRepresentation(bool); 107 void toggleBackground(bool); 108 void toggleTransparency(bool); 109 void toggleAntialiasing(bool); 110 void toggleHaloing(bool); 111 void toggleAux(bool); 112 void toggleFullScreen(bool); 71 113 }; 72 114 -
trunk/geant4/visualization/OpenGL/include/G4OpenGLStoredQt.hh
r533 r561 25 25 // 26 26 // 27 // $Id: G4OpenGLStoredQt.hh,v 1.7 2007/06/25 21:1 8:04 $27 // $Id: G4OpenGLStoredQt.hh,v 1.7 2007/06/25 21:17:44 $ 28 28 // GEANT4 tag $Name: geant4-08-01-patch-01 $ 29 29 // -
trunk/geant4/visualization/OpenGL/include/G4OpenGLStoredQtViewer.hh
r533 r561 25 25 // 26 26 // 27 // $Id: G4OpenGLStoredQtViewer.hh,v 1. 7 2007/06/25 21:18:06 $27 // $Id: G4OpenGLStoredQtViewer.hh,v 1.9 2007/06/25 21:17:46 $ 28 28 // GEANT4 tag $Name: geant4-08-01-patch-01 $ 29 29 // … … 34 34 #ifdef G4VIS_BUILD_OPENGLQT_DRIVER 35 35 36 #ifndef G4O PENGLSTOREDQTVIEWER_HH37 #define G4O PENGLSTOREDQTVIEWER_HH36 #ifndef G4OpenGLSTOREDQTVIEWER_HH 37 #define G4OpenGLSTOREDQTVIEWER_HH 38 38 39 39 #include "G4VViewer.hh" 40 40 #include "G4OpenGLStoredViewer.hh" 41 41 #include "G4OpenGLQtViewer.hh" 42 #include <QGLWidget> 43 #include <QApplication> 44 #include <QMouseEvent> 45 #include <QContextMenuEvent> 42 46 43 47 class G4OpenGLStoredSceneHandler; 44 48 45 49 class G4OpenGLStoredQtViewer: 46 public G4OpenGLQtViewer, public G4OpenGLStoredViewer{50 public G4OpenGLQtViewer, public G4OpenGLStoredViewer, public QGLWidget { 47 51 48 52 public: 49 53 G4OpenGLStoredQtViewer (G4OpenGLStoredSceneHandler& scene, 50 const G4String& name = ""); 54 const G4String& name = ""); 55 ~G4OpenGLStoredQtViewer (); 51 56 void Initialise (); 57 void initializeGL (); 52 58 void DrawView (); 53 59 void FinishView (); 60 void resizeGL(int width,int height); 61 void paintGL(); 62 void updateQWidget(); 63 64 protected: 65 void mousePressEvent(QMouseEvent *event); 66 void mouseMoveEvent(QMouseEvent *event); 67 void contextMenuEvent(QContextMenuEvent *e); 68 69 private : 70 bool hasToRepaint; 71 bool readyToPaint; 72 int nbPaint; 54 73 }; 55 74 … … 57 76 58 77 #endif 59
Note: See TracChangeset
for help on using the changeset viewer.