Import Geant4 9.1.0 source tree
This commit is contained in:
@@ -23,11 +23,13 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4OpenGL.hh,v 1.5 2007/02/08 14:01:55 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// $Id: G4OpenGL.hh,v 1.6 2007/11/15 10:14:23 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
// G.Barrand.
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGL_DRIVER
|
||||
|
||||
#ifndef G4OpenGL_h
|
||||
#define G4OpenGL_h
|
||||
|
||||
@@ -41,3 +43,5 @@
|
||||
#define G4OPENGL_DBL_MAX 1.e308
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLBitMapStore.hh,v 1.1 2007/01/09 10:11:16 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// $Id: G4OpenGLBitMapStore.hh,v 1.2 2007/11/15 10:14:23 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 6th January 2007
|
||||
@@ -39,6 +39,7 @@
|
||||
// glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||
// glBitmap(size, size, size/2., size/2., 0., 0., circle);
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGL_DRIVER
|
||||
|
||||
#ifndef G4OPENGLBITMAPSTORE_HH
|
||||
#define G4OPENGLBITMAPSTORE_HH
|
||||
@@ -73,3 +74,5 @@ namespace G4OpenGLBitMapStore {
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4OpenGLFontBaseStore.hh,v 1.3 2006/06/29 21:17:38 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
// J.Allison Apr 2005.
|
||||
|
||||
|
||||
+13
-21
@@ -24,32 +24,24 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXViewerMessenger.hh,v 1.3 2007/05/08 11:04:11 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// $Id: G4OpenGLImmediateQt.hh,v 1.1 2007/09/28 14:44:13 lgarnier Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// OpenGLImmediateQt graphics system factory.
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLX_DRIVER
|
||||
#if defined (G4VIS_BUILD_OPENGLQT_DRIVER) || defined (G4VIS_USE_OPENGLQT)
|
||||
|
||||
#ifndef G4OPENGLXVIEWERMESSENGER_HH
|
||||
#define G4OPENGLXVIEWERMESSENGER_HH
|
||||
#ifndef G4OPENGLIMMEDIATEQT_HH
|
||||
#define G4OPENGLIMMEDIATEQT_HH
|
||||
|
||||
#include "G4UImessenger.hh"
|
||||
#include "G4VGraphicsSystem.hh"
|
||||
|
||||
#include "G4String.hh"
|
||||
|
||||
class G4OpenGLXViewer;
|
||||
class G4UIdirectory;
|
||||
|
||||
class G4OpenGLXViewerMessenger: public G4UImessenger {
|
||||
class G4OpenGLImmediateQt: public G4VGraphicsSystem {
|
||||
public:
|
||||
static G4OpenGLXViewerMessenger* GetInstance(); // Singleton constructor.
|
||||
~G4OpenGLXViewerMessenger();
|
||||
void SetNewValue (G4UIcommand*, G4String);
|
||||
|
||||
private:
|
||||
G4OpenGLXViewerMessenger(); // Private constructor.
|
||||
static G4OpenGLXViewerMessenger* fpInstance;
|
||||
G4UIdirectory* fpDirectory;
|
||||
G4UIdirectory* fpDirectorySet;
|
||||
G4OpenGLImmediateQt ();
|
||||
G4VSceneHandler* CreateSceneHandler (const G4String& name = "");
|
||||
G4VViewer* CreateViewer (G4VSceneHandler&, const G4String& name = "");
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,71 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLImmediateQtViewer.hh,v 1.3 2007/11/09 15:03:21 lgarnier Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Class G4OpenGLImmediateQtViewer : a class derived from
|
||||
// G4OpenGLQtViewer and G4OpenGLImmediateViewer.
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLQT_DRIVER
|
||||
|
||||
#ifndef G4OpenGLIMMEDIATEQTVIEWER_HH
|
||||
#define G4OpenGLIMMEDIATEQTVIEWER_HH
|
||||
|
||||
#include "G4VViewer.hh"
|
||||
#include "G4OpenGLImmediateViewer.hh"
|
||||
#include "G4OpenGLQtViewer.hh"
|
||||
|
||||
#include <qgl.h> // include <qglwidget.h>
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
class G4OpenGLImmediateSceneHandler;
|
||||
|
||||
class G4OpenGLImmediateQtViewer:
|
||||
public G4OpenGLQtViewer, public G4OpenGLImmediateViewer, public QGLWidget {
|
||||
|
||||
public:
|
||||
G4OpenGLImmediateQtViewer (G4OpenGLImmediateSceneHandler& scene,
|
||||
const G4String& name = "");
|
||||
~G4OpenGLImmediateQtViewer ();
|
||||
void Initialise ();
|
||||
void initializeGL ();
|
||||
void DrawView ();
|
||||
void FinishView ();
|
||||
void resizeGL(int width,int height);
|
||||
void paintGL();
|
||||
void updateQWidget();
|
||||
|
||||
private :
|
||||
int readyToPaint;
|
||||
int nbPaint;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLImmediateSceneHandler.hh,v 1.13 2007/04/04 16:50:26 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLImmediateViewer.hh,v 1.9 2006/09/04 12:07:59 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 7th February 1997
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLImmediateWin32.hh,v 1.7 2006/06/29 21:17:44 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// OpenGLImmediateWin32 graphics system factory.
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLImmediateWin32Viewer.hh,v 1.9 2006/06/29 21:17:46 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Class G4OpenGLImmediateWin32Viewer : a class derived from
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLImmediateX.hh,v 1.7 2006/06/29 21:17:48 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLImmediateXViewer.hh,v 1.9 2006/07/03 16:38:13 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 7th February 1997
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLImmediateXm.hh,v 1.7 2006/06/29 21:17:52 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLImmediateXmViewer.hh,v 1.9 2006/07/03 16:38:13 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLQtExportDialog.hh,v 1.3 2007/11/09 15:03:21 lgarnier Exp $
|
||||
// GEANT4 tag $Name:
|
||||
//
|
||||
//
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLQT_DRIVER
|
||||
|
||||
#ifndef G4OPENGLQTEXPORTDIALOG_HH
|
||||
#define G4OPENGLQTEXPORTDIALOG_HH
|
||||
|
||||
#include <qdialog.h>
|
||||
|
||||
class QButtonGroup;
|
||||
class QPushButton;
|
||||
class QRadioButton;
|
||||
class QCheckBox;
|
||||
class QSlider;
|
||||
class QComboBox;
|
||||
class QLabel;
|
||||
class QLineEdit;
|
||||
|
||||
/** The G4OpenGLQtExportDialog class provide a Dialog displaying differents options
|
||||
for each file format
|
||||
*/
|
||||
class G4OpenGLQtExportDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/** Construct a G4OpenGLQtExportDialog
|
||||
@param parent : parent widget
|
||||
@param name : name of the saved file with extention
|
||||
@param height : height of the original file
|
||||
@param width : width of the original file
|
||||
*/
|
||||
G4OpenGLQtExportDialog(QWidget* parent, QString name, int height =0, int width=0);
|
||||
|
||||
/** Destroys G4OpenGLQtExportDialog */
|
||||
~G4OpenGLQtExportDialog();
|
||||
|
||||
/** @return the value of the slider if format has a slider widget, instead return -1 */
|
||||
int getSliderValue();
|
||||
|
||||
/** return the new width for file if format has a width widget, instead return -1 */
|
||||
int getWidth();
|
||||
|
||||
/** return the new height for file if format has a height widget, instead return -1 */
|
||||
int getHeight();
|
||||
|
||||
/** return the value of the transparency if format has a transparency, instead return -1 */
|
||||
bool getTransparency();
|
||||
|
||||
/** return the numbers of colors in the picture if format has a BW/Color widget, instead return -1 */
|
||||
int getNbColor();
|
||||
|
||||
public slots:
|
||||
|
||||
/** Called by a clic on modify/original size button.This will
|
||||
invert buttons and hide/unhide size
|
||||
*/
|
||||
void changeSizeBox(bool);
|
||||
|
||||
/** Called by changing value in height lineEdit. If ratio is keep, will also change the width
|
||||
*/
|
||||
void textWidthChanged(const QString &);
|
||||
|
||||
/** Called by changing value in width lineEdit. If ratio is keep, will also change the height
|
||||
*/
|
||||
void textHeightChanged(const QString &);
|
||||
|
||||
private:
|
||||
QString f_name, f_type, f_dir;
|
||||
QLabel* qualityLabel;
|
||||
bool expAll;
|
||||
QPushButton* buttonOk;
|
||||
QPushButton* buttonCancel;
|
||||
QCheckBox* transparencyEPS,*boxTransparency;
|
||||
QCheckBox* ratioCheckBox;
|
||||
QSlider * qualitySlider;
|
||||
QLabel *formatLabel;
|
||||
QRadioButton* colorButton,*BWButton;
|
||||
QRadioButton* original,* modify;
|
||||
QLineEdit* height,*width;
|
||||
QWidget* heightWidget,* widthWidget;
|
||||
int originalWidth;
|
||||
int originalHeight;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,139 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLQtViewer.hh,v 1.4 2007/11/13 17:48:51 lgarnier Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// G4OpenGLQtViewer : Class to provide WindowsNT specific
|
||||
// functionality for OpenGL in GEANT4
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLQT_DRIVER
|
||||
|
||||
#ifndef G4OPENGLQTVIEWER_HH
|
||||
#define G4OPENGLQTVIEWER_HH
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#include "G4VViewer.hh"
|
||||
#include "G4OpenGLSceneHandler.hh"
|
||||
|
||||
#include <qobject.h>
|
||||
#include <qpoint.h>
|
||||
|
||||
class QGLWidget;
|
||||
class QDialog;
|
||||
class QContextMenuEvent;
|
||||
#if QT_VERSION < 0x040000
|
||||
class QPopupMenu;
|
||||
#else
|
||||
class QMenu;
|
||||
#endif
|
||||
class QImage;
|
||||
class QAction;
|
||||
|
||||
class G4OpenGLSceneHandler;
|
||||
|
||||
class G4OpenGLQtViewer: public QObject, virtual public G4OpenGLViewer {
|
||||
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
G4OpenGLQtViewer (G4OpenGLSceneHandler& scene);
|
||||
virtual ~G4OpenGLQtViewer ();
|
||||
void SetView ();
|
||||
void ShowView ();
|
||||
virtual void updateQWidget()=0;
|
||||
|
||||
protected:
|
||||
void CreateGLQtContext ();
|
||||
virtual void CreateMainWindow (QGLWidget*);
|
||||
void manageContextMenuEvent(QContextMenuEvent *e);
|
||||
void G4MousePressEvent(QPoint);
|
||||
#if QT_VERSION < 0x040000
|
||||
void G4MouseMoveEvent(int, int, Qt::ButtonState);
|
||||
#else
|
||||
void G4MouseMoveEvent(int, int, Qt::MouseButtons);
|
||||
#endif
|
||||
|
||||
|
||||
protected:
|
||||
G4int WinSize_x;
|
||||
G4int WinSize_y;
|
||||
QGLWidget* fWindow;
|
||||
QDialog* GLWindow;
|
||||
|
||||
private:
|
||||
void createPopupMenu();
|
||||
void createRadioAction(QAction *,QAction *, const std::string&,unsigned int a=1);
|
||||
void rescaleImage(int, int);
|
||||
bool generateEPS(QString,int,QImage);
|
||||
bool generatePS_PDF(QString,int,QImage);
|
||||
|
||||
#if QT_VERSION < 0x040000
|
||||
QPopupMenu *fContextMenu;
|
||||
#else
|
||||
QMenu *fContextMenu;
|
||||
#endif
|
||||
bool fMouseAction; // 1: rotate 0:move
|
||||
QPoint lastPos;
|
||||
#if QT_VERSION < 0x040000
|
||||
QPopupMenu *fDrawingWireframe;
|
||||
QPopupMenu *fDrawingLineRemoval;
|
||||
QPopupMenu *fDrawingSurfaceRemoval;
|
||||
QPopupMenu *fDrawingLineSurfaceRemoval;
|
||||
#else
|
||||
QAction *fDrawingWireframe;
|
||||
QAction *fDrawingLineRemoval;
|
||||
QAction *fDrawingSurfaceRemoval;
|
||||
QAction *fDrawingLineSurfaceRemoval;
|
||||
#endif
|
||||
|
||||
private slots :
|
||||
void actionDrawingWireframe();
|
||||
void actionDrawingLineRemoval();
|
||||
void actionDrawingSurfaceRemoval();
|
||||
void actionDrawingLineSurfaceRemoval();
|
||||
void actionControlPanels();
|
||||
void actionExitG4();
|
||||
void actionCreateEPS();
|
||||
|
||||
void toggleDrawingAction(int);
|
||||
void toggleMouseAction(bool);
|
||||
void toggleRepresentation(bool);
|
||||
void toggleBackground(bool);
|
||||
void toggleTransparency(bool);
|
||||
void toggleAntialiasing(bool);
|
||||
void toggleHaloing(bool);
|
||||
void toggleAux(bool);
|
||||
void toggleFullScreen(bool);
|
||||
|
||||
void dialogClosed();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLSceneHandler.hh,v 1.23 2007/04/04 16:50:26 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 27th March 1996
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLSceneHandler.icc,v 1.7 2006/06/29 21:17:58 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 20th January 1998
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLStoredQt.hh,v 1.1 2007/09/28 14:44:13 lgarnier Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// OpenGLStoredQt graphics system factory.
|
||||
|
||||
#if defined (G4VIS_BUILD_OPENGLQT_DRIVER) || defined (G4VIS_USE_OPENGLQT)
|
||||
|
||||
#ifndef G4OPENGLSTOREDQT_HH
|
||||
#define G4OPENGLSTOREDQT_HH
|
||||
|
||||
#include "G4VGraphicsSystem.hh"
|
||||
|
||||
class G4OpenGLStoredQt: public G4VGraphicsSystem {
|
||||
public:
|
||||
G4OpenGLStoredQt ();
|
||||
G4VSceneHandler* CreateSceneHandler (const G4String& name = "");
|
||||
G4VViewer* CreateViewer (G4VSceneHandler&, const G4String& name = "");
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,78 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLStoredQtViewer.hh,v 1.3 2007/11/09 15:03:21 lgarnier Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Class G4OpenGLStoredQtViewer : a class derived from
|
||||
// G4OpenGLQtViewer and G4OpenGLStoredViewer.
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLQT_DRIVER
|
||||
|
||||
#ifndef G4OpenGLSTOREDQTVIEWER_HH
|
||||
#define G4OpenGLSTOREDQTVIEWER_HH
|
||||
|
||||
#include "G4VViewer.hh"
|
||||
#include "G4OpenGLStoredViewer.hh"
|
||||
#include "G4OpenGLQtViewer.hh"
|
||||
|
||||
#include <qgl.h> // include qglwidget
|
||||
|
||||
class QMouseEvent;
|
||||
class QContextMenuEvent;
|
||||
|
||||
class G4OpenGLStoredSceneHandler;
|
||||
|
||||
class G4OpenGLStoredQtViewer:
|
||||
public G4OpenGLQtViewer, public G4OpenGLStoredViewer, public QGLWidget {
|
||||
|
||||
public:
|
||||
G4OpenGLStoredQtViewer (G4OpenGLStoredSceneHandler& scene,
|
||||
const G4String& name = "");
|
||||
~G4OpenGLStoredQtViewer ();
|
||||
void Initialise ();
|
||||
void initializeGL ();
|
||||
void DrawView ();
|
||||
void FinishView ();
|
||||
void resizeGL(int width,int height);
|
||||
void paintGL();
|
||||
void updateQWidget();
|
||||
|
||||
protected:
|
||||
void mousePressEvent(QMouseEvent *event);
|
||||
void mouseMoveEvent(QMouseEvent *event);
|
||||
void contextMenuEvent(QContextMenuEvent *e);
|
||||
|
||||
private :
|
||||
bool hasToRepaint;
|
||||
bool readyToPaint;
|
||||
int nbPaint;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLStoredSceneHandler.hh,v 1.24 2007/04/04 16:50:26 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLStoredViewer.hh,v 1.9 2006/06/29 21:18:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 7th February 1997
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLStoredWin32.hh,v 1.7 2006/06/29 21:18:04 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// OpenGLStoredWin32 graphics system factory.
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLStoredWin32Viewer.hh,v 1.7 2006/06/29 21:18:06 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Class G4OpenGLStoredWin32Viewer : a class derived from
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLStoredX.hh,v 1.7 2006/06/29 21:18:08 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLStoredXViewer.hh,v 1.7 2006/07/03 16:38:13 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 7th February 1997
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLStoredXm.hh,v 1.6 2006/06/29 21:18:12 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLStoredXmViewer.hh,v 1.7 2006/07/03 16:38:13 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLTransform3D.hh,v 1.7 2006/06/29 21:18:16 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 24th October 1996
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLViewer.hh,v 1.20 2007/05/08 11:04:11 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// $Id: G4OpenGLViewer.hh,v 1.21 2007/11/10 14:50:01 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 27th March 1996
|
||||
@@ -47,6 +47,7 @@ class G4OpenGLViewer: virtual public G4VViewer {
|
||||
friend class G4OpenGLSceneHandler;
|
||||
friend class G4OpenGLImmediateSceneHandler;
|
||||
friend class G4OpenGLStoredSceneHandler;
|
||||
friend class G4OpenGLFileSceneHandler;
|
||||
friend class G4OpenGLViewerMessenger;
|
||||
|
||||
public:
|
||||
@@ -78,6 +79,7 @@ protected:
|
||||
|
||||
G4OpenGLSceneHandler& fOpenGLSceneHandler;
|
||||
G4Colour background; //the OpenGL clear colour
|
||||
unsigned int WinSize_x, WinSize_y;
|
||||
G4bool
|
||||
transparency_enabled, //is alpha blending enabled?
|
||||
antialiasing_enabled, //is antialiasing enabled?
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLViewerMessenger.hh,v 1.5 2007/05/08 11:04:11 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
|
||||
#ifndef G4OPENGLVIEWERMESSENGER_HH
|
||||
#define G4OPENGLVIEWERMESSENGER_HH
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLWin32Viewer.hh,v 1.13 2006/06/29 21:18:20 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// $Id: G4OpenGLWin32Viewer.hh,v 1.14 2007/11/10 14:50:01 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// G4OpenGLWin32Viewer : Class to provide WindowsNT specific
|
||||
@@ -54,9 +54,6 @@ protected:
|
||||
void GetWin32Connection ();
|
||||
void CreateGLWin32Context ();
|
||||
virtual void CreateMainWindow ();
|
||||
protected:
|
||||
G4int WinSize_x;
|
||||
G4int WinSize_y;
|
||||
HDC fHDC;
|
||||
private:
|
||||
static LRESULT CALLBACK WindowProc(HWND,UINT,WPARAM,LPARAM);
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXViewer.hh,v 1.27 2007/05/08 11:04:11 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// $Id: G4OpenGLXViewer.hh,v 1.28 2007/11/10 14:50:01 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 7th February 1997
|
||||
@@ -104,8 +104,6 @@ protected:
|
||||
XClassHint *class_hints;
|
||||
Pixmap icon_pixmap;
|
||||
XSizeHints *size_hints;
|
||||
unsigned int WinSize_x,
|
||||
WinSize_y;
|
||||
Atom Xatom;
|
||||
XTextProperty windowName,
|
||||
iconName;
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmBox.hh,v 1.7 2006/06/29 21:18:24 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
//Box container class
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmFourArrowButtons.hh,v 1.6 2006/06/29 21:18:26 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
//Four arrow buttons class. Inherits from G4OpenGLXmVWidgetComponent
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmFramedBox.hh,v 1.7 2006/06/29 21:18:28 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
//Framed box container class
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmPushButton.hh,v 1.7 2006/06/29 21:18:30 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
//Push button class. Inherits from G4OpenGLXmVWidgetComponent
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmRadioButton.hh,v 1.7 2006/06/29 21:18:32 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
//Radio button class. Inherits from G4OpenGLXmVWidgetComponent
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmResources.hh,v 1.5 2006/06/29 21:18:34 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Default resources file for GEANT4 OpenGL Motif windows.
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmSeparator.hh,v 1.6 2006/06/29 21:18:36 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
//Separator class. Inherits from G4OpenGLXmVWidgetComponent
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmSliderBar.hh,v 1.7 2006/06/29 21:18:38 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
//Slider bar class. Inherits from G4OpenGLXmVWidgetComponent
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmTextField.hh,v 1.7 2006/06/29 21:18:40 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
//Text field class. Inherits from G4OpenGLXmVWidgetComponent
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmTopLevelShell.hh,v 1.6 2006/06/29 21:18:42 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
//Top level shell class
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmVWidgetComponent.hh,v 1.6 2006/06/29 21:18:44 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
//Base class for all Motif component widgets
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmVWidgetContainer.hh,v 1.6 2006/06/29 21:18:46 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
//Base class for all Motif container widgets
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmVWidgetObject.hh,v 1.6 2006/06/29 21:18:48 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
//Virtual base class for all Motif widgets.
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmVWidgetShell.hh,v 1.6 2006/06/29 21:18:50 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
//Base class for all Motif window widgets (shells)
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmViewer.hh,v 1.10 2006/06/29 21:18:52 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmViewerMessenger.hh,v 1.4 2006/06/29 21:18:54 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLXM_DRIVER
|
||||
|
||||
|
||||
Reference in New Issue
Block a user