Ignore:
Timestamp:
Aug 14, 2007, 12:27:44 PM (17 years ago)
Author:
garnier
Message:

r563@mac-90108: laurentgarnier | 2007-08-14 12:28:16 +0200
mise a jour suite au plantage de svk (cheksum error) suite au crash du DD en juin

Location:
trunk/geant4/visualization/OpenGL/include
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/geant4/visualization/OpenGL/include/G4OpenGLImmediateQtViewer.hh

    r559 r561  
    4141#include "G4OpenGLQtViewer.hh"
    4242#include <QGLWidget>
    43 #include <QPaintEvent>
    4443
    4544#include "globals.hh"
     
    5756  void initializeGL ();
    5857  void DrawView ();
    59   void DrawView2 ();
    6058  void FinishView ();
    6159  void resizeGL(int width,int height);
    6260  void paintGL();
    63   void paintEvent(QPaintEvent*);
     61  void updateQWidget();
     62
    6463private :
    6564  int readyToPaint;
  • trunk/geant4/visualization/OpenGL/include/G4OpenGLQtViewer.hh

    r541 r561  
    4242#include "G4OpenGLSceneHandler.hh"
    4343
     44#include <QObject>
    4445#include <QGLWidget>
    4546#include <QDialog>
     47#include <QContextMenuEvent>
     48#include <QMenu>
     49#include <QPoint>
    4650
    4751class G4OpenGLSceneHandler;
    4852
    49 class G4OpenGLQtViewer: virtual public G4OpenGLViewer {
     53class G4OpenGLQtViewer: public QObject, virtual public G4OpenGLViewer {
     54
     55  Q_OBJECT
    5056
    5157public:
     
    5460  void SetView ();
    5561  void ShowView ();
     62  virtual void DrawView()=0;
     63  virtual void updateQWidget()=0;
     64
    5665protected:
    57   //  void GetQtConnection ();
    5866  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
    6179protected:
    6280  G4int WinSize_x;
     
    6482  QGLWidget* fWindow;
    6583  QDialog* GLWindow;
     84
    6685private:
    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
     99private 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);
    71113};
    72114
  • trunk/geant4/visualization/OpenGL/include/G4OpenGLStoredQt.hh

    r533 r561  
    2525//
    2626//
    27 // $Id: G4OpenGLStoredQt.hh,v 1.7 2007/06/25 21:18:04 $
     27// $Id: G4OpenGLStoredQt.hh,v 1.7 2007/06/25 21:17:44 $
    2828// GEANT4 tag $Name: geant4-08-01-patch-01 $
    2929//
  • trunk/geant4/visualization/OpenGL/include/G4OpenGLStoredQtViewer.hh

    r533 r561  
    2525//
    2626//
    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 $
    2828// GEANT4 tag $Name: geant4-08-01-patch-01 $
    2929//
     
    3434#ifdef G4VIS_BUILD_OPENGLQT_DRIVER
    3535
    36 #ifndef G4OPENGLSTOREDQTVIEWER_HH
    37 #define G4OPENGLSTOREDQTVIEWER_HH
     36#ifndef G4OpenGLSTOREDQTVIEWER_HH
     37#define G4OpenGLSTOREDQTVIEWER_HH
    3838
    3939#include "G4VViewer.hh"
    4040#include "G4OpenGLStoredViewer.hh"
    4141#include "G4OpenGLQtViewer.hh"
     42#include <QGLWidget>
     43#include <QApplication>
     44#include <QMouseEvent>
     45#include <QContextMenuEvent>
    4246
    4347class G4OpenGLStoredSceneHandler;
    4448
    4549class G4OpenGLStoredQtViewer:
    46 public G4OpenGLQtViewer, public G4OpenGLStoredViewer{
     50  public G4OpenGLQtViewer, public G4OpenGLStoredViewer, public QGLWidget {
    4751 
    4852public:
    4953  G4OpenGLStoredQtViewer (G4OpenGLStoredSceneHandler& scene,
    50                              const G4String& name = "");
     54                                const G4String& name = "");
     55  ~G4OpenGLStoredQtViewer ();
    5156  void Initialise ();
     57  void initializeGL ();
    5258  void DrawView ();
    5359  void FinishView ();
     60  void resizeGL(int width,int height);
     61  void paintGL();
     62  void updateQWidget();
     63
     64protected:
     65  void mousePressEvent(QMouseEvent *event);
     66  void mouseMoveEvent(QMouseEvent *event);
     67  void contextMenuEvent(QContextMenuEvent *e);
     68
     69private :
     70  bool hasToRepaint;
     71  bool readyToPaint;
     72  int nbPaint;
    5473};
    5574
     
    5776
    5877#endif
    59 
Note: See TracChangeset for help on using the changeset viewer.