Import Geant4 9.1.0 source tree
This commit is contained in:
@@ -24,12 +24,14 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLBitMapStore.cc,v 1.3 2007/04/04 16:50:26 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// $Id: G4OpenGLBitMapStore.cc,v 1.4 2007/11/15 10:14:23 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 6th January 2007
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGL_DRIVER
|
||||
|
||||
#include "G4OpenGLBitMapStore.hh"
|
||||
|
||||
namespace G4OpenGLBitMapStore {
|
||||
@@ -100,3 +102,5 @@ const GLubyte* GetBitMap(Shape shape, G4double& size, G4bool filled)
|
||||
}
|
||||
|
||||
} // End namespace G4OpenGLBitMapStore.
|
||||
|
||||
#endif
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLFontBaseStore.cc,v 1.3 2006/06/29 21:18:56 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
|
||||
#include "G4OpenGLFontBaseStore.hh"
|
||||
|
||||
+47
-53
@@ -24,69 +24,63 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXViewerMessenger.cc,v 1.7 2007/05/25 15:41:38 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// $Id: G4OpenGLImmediateQt.cc,v 1.2 2007/11/15 18:24:28 lgarnier Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// OpenGLImmediateQt graphics system factory.
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLX_DRIVER
|
||||
#ifdef G4VIS_BUILD_OPENGLQT_DRIVER
|
||||
|
||||
#include "G4OpenGLXViewerMessenger.hh"
|
||||
#include "G4VisFeaturesOfOpenGL.hh"
|
||||
#include "G4VSceneHandler.hh"
|
||||
#include "G4OpenGLSceneHandler.hh"
|
||||
#include "G4OpenGLViewer.hh"
|
||||
#include "G4OpenGLImmediateQt.hh"
|
||||
#include "G4OpenGLImmediateQtViewer.hh"
|
||||
#include "G4OpenGLViewerMessenger.hh"
|
||||
|
||||
#include "G4OpenGLXViewer.hh"
|
||||
|
||||
#include "G4UImanager.hh"
|
||||
#include "G4UIcommand.hh"
|
||||
#include "G4UIdirectory.hh"
|
||||
#include "G4VisManager.hh"
|
||||
#include <sstream>
|
||||
|
||||
G4OpenGLXViewerMessenger* G4OpenGLXViewerMessenger::fpInstance = 0;
|
||||
|
||||
G4OpenGLXViewerMessenger* G4OpenGLXViewerMessenger::GetInstance()
|
||||
G4OpenGLImmediateQt::G4OpenGLImmediateQt ():
|
||||
G4VGraphicsSystem ("OpenGLImmediateQt",
|
||||
"OGLIQT",
|
||||
G4VisFeaturesOfOpenGLIQt (),
|
||||
G4VGraphicsSystem::threeD)
|
||||
{
|
||||
if (!fpInstance) fpInstance = new G4OpenGLXViewerMessenger;
|
||||
return fpInstance;
|
||||
G4OpenGLViewerMessenger::GetInstance();
|
||||
}
|
||||
|
||||
G4OpenGLXViewerMessenger::G4OpenGLXViewerMessenger()
|
||||
{
|
||||
fpDirectory = new G4UIdirectory("/vis/oglx/");
|
||||
fpDirectory->SetGuidance("G4OpenGLXViewer commands.");
|
||||
|
||||
fpDirectorySet = new G4UIdirectory ("/vis/oglx/set/");
|
||||
fpDirectorySet->SetGuidance("G4OpenGLViewer set commands.");
|
||||
|
||||
G4VSceneHandler* G4OpenGLImmediateQt::CreateSceneHandler
|
||||
(const G4String& name) {
|
||||
G4VSceneHandler* pScene = new G4OpenGLImmediateSceneHandler (*this, name);
|
||||
return pScene;
|
||||
}
|
||||
|
||||
G4OpenGLXViewerMessenger::~G4OpenGLXViewerMessenger ()
|
||||
{
|
||||
delete fpDirectory;
|
||||
}
|
||||
|
||||
void G4OpenGLXViewerMessenger::SetNewValue
|
||||
(G4UIcommand* /*command*/, G4String /*newValue*/)
|
||||
{
|
||||
G4VisManager* pVisManager = G4VisManager::GetInstance();
|
||||
|
||||
G4VViewer* pVViewer = pVisManager->GetCurrentViewer();
|
||||
|
||||
if (!pVViewer) {
|
||||
G4cout <<
|
||||
"G4OpenGLXViewerMessenger::SetNewValue: No current viewer."
|
||||
"\n \"/vis/open\", or similar, to get one."
|
||||
<< G4endl;
|
||||
return;
|
||||
G4VViewer* G4OpenGLImmediateQt::CreateViewer
|
||||
(G4VSceneHandler& scene, const G4String& name) {
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
printf("G4OpenGLImmediateQt::CreateViewer \n");
|
||||
#endif
|
||||
G4VViewer* pView =
|
||||
new G4OpenGLImmediateQtViewer
|
||||
((G4OpenGLImmediateSceneHandler&) scene, name);
|
||||
if (pView) {
|
||||
if (pView -> GetViewId () < 0) {
|
||||
G4cerr << "G4OpenGLImmediateQt::CreateViewer: error flagged by negative"
|
||||
" view id in G4OpenGLImmediateQtViewer creation."
|
||||
"\n Destroying view and returning null pointer."
|
||||
<< G4endl;
|
||||
delete pView;
|
||||
pView = 0;
|
||||
}
|
||||
}
|
||||
|
||||
G4OpenGLXViewer* pViewer = dynamic_cast<G4OpenGLXViewer*>(pVViewer);
|
||||
|
||||
if (!pViewer) {
|
||||
G4cout <<
|
||||
"G4OpenGLXViewerMessenger::SetNewValue: Current viewer is not of type"
|
||||
"\n OGL*X*. This feature currently only available on X Windows."
|
||||
<< G4endl;
|
||||
return;
|
||||
else {
|
||||
G4cerr << "G4OpenGLImmediateQt::CreateViewer: null pointer on"
|
||||
" new G4OpenGLImmediateQtViewer." << G4endl;
|
||||
}
|
||||
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
printf("G4OpenGLImmediateQt::CreateViewer END \n");
|
||||
#endif
|
||||
return pView;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,249 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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.cc,v 1.3 2007/11/15 18:24:28 lgarnier Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Class G4OpenGLImmediateQtViewer : a class derived from G4OpenGLQtViewer and
|
||||
// G4OpenGLImmediateViewer.
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLQT_DRIVER
|
||||
|
||||
#include "G4OpenGLImmediateQtViewer.hh"
|
||||
#include "G4VisManager.hh"
|
||||
|
||||
#include "G4ios.hh"
|
||||
|
||||
G4OpenGLImmediateQtViewer::G4OpenGLImmediateQtViewer
|
||||
(G4OpenGLImmediateSceneHandler& sceneHandler,
|
||||
const G4String& name):
|
||||
G4VViewer (sceneHandler, sceneHandler.IncrementViewCount (), name),
|
||||
G4OpenGLViewer (sceneHandler),
|
||||
G4OpenGLQtViewer (sceneHandler),
|
||||
G4OpenGLImmediateViewer (sceneHandler),
|
||||
QGLWidget() // FIXME : gerer le pb du parent !
|
||||
{
|
||||
nbPaint =0;
|
||||
if (fViewId < 0) return; // In case error in base class instantiation.
|
||||
}
|
||||
|
||||
G4OpenGLImmediateQtViewer::~G4OpenGLImmediateQtViewer() {
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
printf("GLWidget::~GLWidget \n");
|
||||
#endif
|
||||
makeCurrent();
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
printf("GLWidget::~GLWidget END\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
void G4OpenGLImmediateQtViewer::Initialise() {
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
printf("GLWidget::Initialise \n");
|
||||
#endif
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
printf("readyToPaint = false \n");
|
||||
#endif
|
||||
readyToPaint = false;
|
||||
CreateGLQtContext ();
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
printf("G4OpenGLImmediateQtViewer::Initialise () 2\n");
|
||||
#endif
|
||||
|
||||
CreateMainWindow (this);
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
printf("G4OpenGLImmediateQtViewer::Initialise () 3\n");
|
||||
#endif
|
||||
|
||||
CreateFontLists (); // FIXME Does nothing!
|
||||
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
printf("readyToPaint = true \n");
|
||||
#endif
|
||||
readyToPaint = true;
|
||||
|
||||
// First Draw
|
||||
SetView();
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
printf(" ClearView\n");
|
||||
#endif
|
||||
ClearView (); //ok, put the background correct
|
||||
ShowView();
|
||||
FinishView();
|
||||
}
|
||||
|
||||
void G4OpenGLImmediateQtViewer::initializeGL () {
|
||||
|
||||
InitializeGLView ();
|
||||
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
printf("G4OpenGLImmediateQtViewer::InitialiseGL () 1\n");
|
||||
#endif
|
||||
|
||||
// If a double buffer context has been forced upon us, ignore the
|
||||
// back buffer for this OpenGLImmediate view.
|
||||
glDrawBuffer (GL_FRONT); // FIXME : Ne marche pas avec cette ligne, mais affiche le run correctement...
|
||||
// clear the buffers and window.
|
||||
ClearView ();
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
// printf("G4OpenGLImmediateQtViewer::InitialiseGL () 2\n");
|
||||
#endif
|
||||
FinishView ();
|
||||
|
||||
|
||||
|
||||
glDepthFunc (GL_LEQUAL);
|
||||
glDepthMask (GL_TRUE);
|
||||
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
printf("G4OpenGLImmediateQtViewer::InitialiseGL -------------------------------------------------------------------------------------\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void G4OpenGLImmediateQtViewer::DrawView () {
|
||||
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
printf("G4OpenGLImmediateQtViewer::DrawView %d %d VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV\n",WinSize_x, WinSize_y);
|
||||
#endif
|
||||
// If a double buffer context has been forced upon us, ignore the
|
||||
// back buffer for this OpenGLImmediate view.
|
||||
glDrawBuffer (GL_FRONT);
|
||||
|
||||
G4ViewParameters::DrawingStyle style = GetViewParameters().GetDrawingStyle();
|
||||
|
||||
//Make sure current viewer is attached and clean...
|
||||
//Qt version needed
|
||||
glViewport (0, 0, WinSize_x, WinSize_y);
|
||||
|
||||
if(style!=G4ViewParameters::hlr &&
|
||||
haloing_enabled) {
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
printf("G4OpenGLImmediateQtViewer::DrawView DANS LE IF\n");
|
||||
#endif
|
||||
|
||||
HaloingFirstPass ();
|
||||
NeedKernelVisit ();
|
||||
ProcessView ();
|
||||
glFlush ();
|
||||
|
||||
HaloingSecondPass ();
|
||||
|
||||
}
|
||||
|
||||
NeedKernelVisit (); // Always need to visit G4 kernel.
|
||||
ProcessView ();
|
||||
FinishView ();
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
printf("G4OpenGLImmediateQtViewer::DrawView %d %d ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ \n",WinSize_x, WinSize_y);
|
||||
#endif
|
||||
readyToPaint = false;
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
void G4OpenGLImmediateQtViewer::FinishView (
|
||||
)
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
|
||||
{
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
printf("G4OpenGLImmediateQtViewer::FinishView VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV\n");
|
||||
#endif
|
||||
|
||||
glFlush ();
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
printf("G4OpenGLImmediateQtViewer::FinishView ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ \n");
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
- Lors du resize de la fenetre, on doit non pas redessiner le detecteur, mais aussi les evenements
|
||||
*/
|
||||
void G4OpenGLImmediateQtViewer::resizeGL(
|
||||
int width
|
||||
,int height)
|
||||
{
|
||||
int side = width;
|
||||
if (width > height) {
|
||||
side = height;
|
||||
}
|
||||
glViewport((width - side) / 2, (height - side) / 2, side, side);
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glLoadIdentity();
|
||||
glOrtho(-0.5, +0.5, +0.5, -0.5, 4.0, 15.0);
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
printf("G4OpenGLImmediateQtViewer::resizeGL ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ \n");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void G4OpenGLImmediateQtViewer::paintGL()
|
||||
{
|
||||
if (!readyToPaint) {
|
||||
readyToPaint= true;
|
||||
return;
|
||||
}
|
||||
// DO NOT RESIZE IF SIZE HAS NOT CHANGE
|
||||
if (((WinSize_x == (G4int)width())) &&(WinSize_y == (G4int) height())) {
|
||||
return;
|
||||
}
|
||||
nbPaint++;
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
printf("\n\nG4OpenGLImmediateQtViewer::paintGL VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV %d ready %d\n",nbPaint,readyToPaint);
|
||||
#endif
|
||||
WinSize_x = (G4int) width();
|
||||
WinSize_y = (G4int) height();
|
||||
|
||||
glViewport (0, 0, width(), height());
|
||||
|
||||
SetView();
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
// // printf("before ClearView\n");
|
||||
#endif
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
printf(" ClearView\n");
|
||||
#endif
|
||||
|
||||
ClearView (); //ok, put the background correct
|
||||
DrawView();
|
||||
readyToPaint = true; // could be set to false by DrawView
|
||||
|
||||
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
printf("G4OpenGLImmediateQtViewer::paintGL ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ %d ready %d\n\n\n",nbPaint,readyToPaint);
|
||||
#endif
|
||||
}
|
||||
|
||||
void G4OpenGLImmediateQtViewer::updateQWidget() {
|
||||
updateGL();
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLImmediateSceneHandler.cc,v 1.27 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.cc,v 1.8 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.cc,v 1.11 2006/08/14 12:07:19 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// OpenGLImmediateWin32 graphics system factory.
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLImmediateWin32Viewer.cc,v 1.16 2006/07/03 16:38:13 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Class G4OpenGLImmediateWin32Viewer : a class derived from G4OpenGLWin32Viewer and
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLImmediateX.cc,v 1.12 2006/08/14 12:07:19 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// $Id: G4OpenGLImmediateX.cc,v 1.13 2007/08/21 14:05:51 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 27th March 1996
|
||||
@@ -40,7 +40,6 @@
|
||||
#include "G4OpenGLImmediateX.hh"
|
||||
#include "G4OpenGLImmediateXViewer.hh"
|
||||
#include "G4OpenGLViewerMessenger.hh"
|
||||
#include "G4OpenGLXViewerMessenger.hh"
|
||||
|
||||
G4OpenGLImmediateX::G4OpenGLImmediateX ():
|
||||
G4VGraphicsSystem ("OpenGLImmediateX",
|
||||
@@ -49,7 +48,6 @@ G4OpenGLImmediateX::G4OpenGLImmediateX ():
|
||||
G4VGraphicsSystem::threeD)
|
||||
{
|
||||
G4OpenGLViewerMessenger::GetInstance();
|
||||
G4OpenGLXViewerMessenger::GetInstance();
|
||||
}
|
||||
|
||||
G4OpenGLImmediateX::~G4OpenGLImmediateX () {}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLImmediateXViewer.cc,v 1.16 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.cc,v 1.13 2006/08/14 12:07:19 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLImmediateXmViewer.cc,v 1.17 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,378 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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.cc,v 1.4 2007/11/13 17:48:51 lgarnier Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLQT_DRIVER
|
||||
|
||||
#include "G4OpenGLQtExportDialog.hh"
|
||||
|
||||
#include <qvariant.h>
|
||||
#include <qpushbutton.h>
|
||||
#include <qcheckbox.h>
|
||||
#include <qlabel.h>
|
||||
#include <qcombobox.h>
|
||||
#include <qslider.h>
|
||||
#include <qlayout.h>
|
||||
#include <qgroupbox.h>
|
||||
#include <qradiobutton.h>
|
||||
#include <qimage.h>
|
||||
#include <qlineedit.h>
|
||||
|
||||
G4OpenGLQtExportDialog::G4OpenGLQtExportDialog(
|
||||
QWidget* parent
|
||||
,QString nomFich
|
||||
,int aHeight
|
||||
,int aWidth
|
||||
)
|
||||
: QDialog( parent )
|
||||
{
|
||||
#if QT_VERSION < 0x040000
|
||||
setCaption( tr( " Export options" ));
|
||||
#else
|
||||
setWindowTitle( tr( " Export options" ));
|
||||
#endif
|
||||
originalWidth = aWidth;
|
||||
originalHeight = aHeight;
|
||||
|
||||
// Initializations
|
||||
qualitySlider = NULL;
|
||||
width = NULL;
|
||||
height = NULL;
|
||||
colorButton = NULL;
|
||||
BWButton = NULL;
|
||||
|
||||
// global layout
|
||||
#if QT_VERSION < 0x040000
|
||||
QVBoxLayout* globalVLayout = new QVBoxLayout(this);
|
||||
#else
|
||||
QVBoxLayout* globalVLayout = new QVBoxLayout();
|
||||
#endif
|
||||
|
||||
|
||||
if (nomFich.endsWith(".jpg") ||
|
||||
nomFich.endsWith(".jepg")) {
|
||||
|
||||
QGroupBox *imageGroupBox = new QGroupBox(tr("Image quality"));
|
||||
#if QT_VERSION < 0x040000
|
||||
QVBoxLayout *imageGroupBoxLayout = new QVBoxLayout(imageGroupBox);
|
||||
#else
|
||||
QVBoxLayout *imageGroupBoxLayout = new QVBoxLayout;
|
||||
#endif
|
||||
QWidget *sliderBox = new QWidget;
|
||||
|
||||
#if QT_VERSION < 0x040000
|
||||
QHBoxLayout *hSlider = new QHBoxLayout(sliderBox);
|
||||
#else
|
||||
QHBoxLayout *hSlider = new QHBoxLayout;
|
||||
#endif
|
||||
|
||||
// qualityLabel = new QLabel( tr( "Image quality" ) );
|
||||
// imageGroupBoxLayout->addWidget(qualityLabel);
|
||||
qualitySlider= new QSlider(Qt::Horizontal,0);
|
||||
#if QT_VERSION < 0x040000
|
||||
qualitySlider->setMinValue(0);
|
||||
qualitySlider->setMaxValue(100);
|
||||
qualitySlider->setTickmarks(QSlider::Below);
|
||||
#else
|
||||
qualitySlider->setMinimum(0);
|
||||
qualitySlider->setMaximum(100);
|
||||
qualitySlider->setTickPosition(QSlider::TicksBelow);
|
||||
#endif
|
||||
qualitySlider->setValue(60);
|
||||
hSlider->addWidget(new QLabel("low",0));
|
||||
hSlider->addWidget(qualitySlider);
|
||||
hSlider->addWidget(new QLabel("Maximum",0));
|
||||
#if QT_VERSION >= 0x040000
|
||||
sliderBox->setLayout(hSlider);
|
||||
#endif
|
||||
imageGroupBoxLayout->addWidget(sliderBox);
|
||||
|
||||
#if QT_VERSION >= 0x040000
|
||||
imageGroupBox->setLayout(imageGroupBoxLayout);
|
||||
#endif
|
||||
globalVLayout->addWidget(imageGroupBox);
|
||||
}
|
||||
|
||||
if(nomFich.endsWith(".eps")) {
|
||||
QGroupBox *EPSGroupBox = new QGroupBox(tr("EPS options"));
|
||||
|
||||
#if QT_VERSION < 0x040000
|
||||
QVBoxLayout *EPSGroupBoxLayout = new QVBoxLayout(EPSGroupBox);
|
||||
#else
|
||||
QVBoxLayout *EPSGroupBoxLayout = new QVBoxLayout;
|
||||
#endif
|
||||
|
||||
// transparencyEPS = new QCheckBox( "transparencyEPS" );
|
||||
// transparencyEPS->setText( "save background" );
|
||||
// transparencyEPS->setChecked( true );
|
||||
|
||||
colorButton = new QRadioButton("Color",0);
|
||||
BWButton = new QRadioButton("Grayscale",0);
|
||||
colorButton->setChecked( true );
|
||||
BWButton->setChecked( false );
|
||||
|
||||
|
||||
// EPSGroupBoxLayout->addWidget(transparencyEPS);
|
||||
EPSGroupBoxLayout->addWidget(colorButton);
|
||||
EPSGroupBoxLayout->addWidget(BWButton);
|
||||
#if QT_VERSION >= 0x040000
|
||||
EPSGroupBox->setLayout(EPSGroupBoxLayout);
|
||||
#endif
|
||||
globalVLayout->addWidget(EPSGroupBox);
|
||||
|
||||
}
|
||||
|
||||
if(nomFich.endsWith(".tif") ||
|
||||
nomFich.endsWith(".tiff") ||
|
||||
nomFich.endsWith(".jpg") ||
|
||||
nomFich.endsWith(".png") ||
|
||||
nomFich.endsWith(".xpm")) {
|
||||
|
||||
QGroupBox *transparencyGroupBox = new QGroupBox(tr("Transparency"));
|
||||
#if QT_VERSION < 0x040000
|
||||
QVBoxLayout *transparencyGroupBoxLayout = new QVBoxLayout(transparencyGroupBox);
|
||||
#else
|
||||
QVBoxLayout *transparencyGroupBoxLayout = new QVBoxLayout;
|
||||
#endif
|
||||
|
||||
boxTransparency = new QCheckBox("Save transparency",0);
|
||||
boxTransparency->setChecked( false );
|
||||
// boxTransparency->setEnabled(false);
|
||||
|
||||
transparencyGroupBoxLayout->addWidget(boxTransparency);
|
||||
#if QT_VERSION >= 0x040000
|
||||
transparencyGroupBox->setLayout(transparencyGroupBoxLayout);
|
||||
#endif
|
||||
globalVLayout->addWidget(transparencyGroupBox);
|
||||
|
||||
}
|
||||
|
||||
// size box
|
||||
QGroupBox *sizeGroupBox = new QGroupBox(tr("Size"));
|
||||
QWidget* modifyAndRatioWidget = new QWidget;
|
||||
|
||||
#if QT_VERSION < 0x040000
|
||||
QHBoxLayout *modifyAndRatioLayout = new QHBoxLayout(modifyAndRatioWidget);
|
||||
QVBoxLayout *sizeGroupBoxLayout = new QVBoxLayout(sizeGroupBox);
|
||||
#else
|
||||
QHBoxLayout *modifyAndRatioLayout = new QHBoxLayout;
|
||||
QVBoxLayout *sizeGroupBoxLayout = new QVBoxLayout;
|
||||
#endif
|
||||
|
||||
// original button
|
||||
original = new QRadioButton("Original",0);
|
||||
original->setChecked( true );
|
||||
sizeGroupBoxLayout->addWidget(original);
|
||||
|
||||
// modify and ratio
|
||||
modify = new QRadioButton("Modify",0);
|
||||
modify->setChecked( false );
|
||||
|
||||
ratioCheckBox = new QCheckBox( "Keep ratio",0 );
|
||||
ratioCheckBox->setChecked( true );
|
||||
|
||||
modifyAndRatioLayout->addWidget(modify);
|
||||
modifyAndRatioLayout->addWidget(ratioCheckBox);
|
||||
#if QT_VERSION >= 0x040000
|
||||
modifyAndRatioWidget->setLayout(modifyAndRatioLayout);
|
||||
#endif
|
||||
sizeGroupBoxLayout->addWidget(modifyAndRatioWidget);
|
||||
if (modify->isChecked()) {
|
||||
ratioCheckBox->show();
|
||||
} else {
|
||||
ratioCheckBox->hide();
|
||||
}
|
||||
|
||||
connect( original, SIGNAL( clicked(bool) ), this, SLOT( changeSizeBox(true)) );
|
||||
connect( modify, SIGNAL( clicked(bool) ), this, SLOT( changeSizeBox(false) ) );
|
||||
|
||||
// height
|
||||
heightWidget = new QWidget;
|
||||
|
||||
#if QT_VERSION < 0x040000
|
||||
QHBoxLayout *heightLineLayout = new QHBoxLayout(heightWidget);
|
||||
#else
|
||||
QHBoxLayout *heightLineLayout = new QHBoxLayout;
|
||||
#endif
|
||||
|
||||
QString tmp;
|
||||
|
||||
heightLineLayout->addWidget(new QLabel("Height",0));
|
||||
height = new QLineEdit(tmp.setNum(originalHeight),0);
|
||||
height->setMaxLength(5);
|
||||
heightLineLayout->addWidget(height);
|
||||
#if QT_VERSION >= 0x040000
|
||||
heightWidget->setLayout(heightLineLayout);
|
||||
#endif
|
||||
sizeGroupBoxLayout->addWidget(heightWidget);
|
||||
connect( height, SIGNAL( textChanged ( const QString& ) ), this, SLOT( textHeightChanged(const QString &) ) );
|
||||
|
||||
|
||||
// width
|
||||
widthWidget = new QWidget;
|
||||
|
||||
#if QT_VERSION < 0x040000
|
||||
QHBoxLayout *widthLineLayout = new QHBoxLayout(widthWidget);
|
||||
#else
|
||||
QHBoxLayout *widthLineLayout = new QHBoxLayout;
|
||||
#endif
|
||||
|
||||
widthLineLayout->addWidget(new QLabel("Width ",0));
|
||||
width = new QLineEdit(tmp.setNum(originalWidth),0);
|
||||
width->setMaxLength(5);
|
||||
widthLineLayout->addWidget(width);
|
||||
#if QT_VERSION >= 0x040000
|
||||
widthWidget->setLayout(widthLineLayout);
|
||||
#endif
|
||||
sizeGroupBoxLayout->addWidget(widthWidget);
|
||||
connect( width, SIGNAL( textChanged ( const QString& ) ), this, SLOT( textWidthChanged(const QString &) ) );
|
||||
|
||||
#if QT_VERSION >= 0x040000
|
||||
sizeGroupBox->setLayout(sizeGroupBoxLayout);
|
||||
#endif
|
||||
globalVLayout->addWidget(sizeGroupBox);
|
||||
|
||||
heightWidget->hide();
|
||||
widthWidget->hide();
|
||||
|
||||
// button ok/cancel box
|
||||
|
||||
QGroupBox *buttonGroupBox = new QGroupBox();
|
||||
|
||||
#if QT_VERSION < 0x040000
|
||||
QHBoxLayout *buttonGroupBoxLayout = new QHBoxLayout(buttonGroupBox);
|
||||
#else
|
||||
QHBoxLayout *buttonGroupBoxLayout = new QHBoxLayout;
|
||||
#endif
|
||||
|
||||
buttonOk = new QPushButton( tr( "&OK" ),0 );
|
||||
buttonOk->setAutoDefault( TRUE );
|
||||
buttonOk->setDefault( TRUE );
|
||||
buttonGroupBoxLayout->addWidget(buttonOk);
|
||||
|
||||
buttonCancel = new QPushButton( tr( "&Cancel" ),0 );
|
||||
buttonCancel->setAutoDefault( TRUE );
|
||||
buttonGroupBoxLayout->addWidget(buttonCancel);
|
||||
|
||||
#if QT_VERSION >= 0x040000
|
||||
buttonGroupBox->setLayout(buttonGroupBoxLayout);
|
||||
#endif
|
||||
globalVLayout->addWidget(buttonGroupBox);
|
||||
|
||||
|
||||
#if QT_VERSION >= 0x040000
|
||||
setLayout(globalVLayout);
|
||||
#endif
|
||||
|
||||
// signals and slots connections
|
||||
connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) );
|
||||
connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
int G4OpenGLQtExportDialog::getSliderValue()
|
||||
{
|
||||
if (!qualitySlider) return -1;
|
||||
return qualitySlider->value();
|
||||
}
|
||||
|
||||
int G4OpenGLQtExportDialog::getHeight()
|
||||
{
|
||||
if (!height) return -1;
|
||||
return height->text().toInt();
|
||||
}
|
||||
|
||||
int G4OpenGLQtExportDialog::getWidth()
|
||||
{
|
||||
if (!width) return -1;
|
||||
return width->text().toInt();
|
||||
}
|
||||
|
||||
bool G4OpenGLQtExportDialog::getTransparency()
|
||||
{
|
||||
if (!boxTransparency) return -1;
|
||||
return boxTransparency->isChecked();
|
||||
}
|
||||
|
||||
int G4OpenGLQtExportDialog::getNbColor()
|
||||
{
|
||||
// Black and white
|
||||
if (!colorButton->isChecked())
|
||||
return 1;
|
||||
// rgb color
|
||||
return 3;
|
||||
}
|
||||
|
||||
|
||||
void G4OpenGLQtExportDialog::changeSizeBox(bool aClick)
|
||||
{
|
||||
if (aClick) {
|
||||
modify->toggle();
|
||||
} else {
|
||||
original->toggle();
|
||||
}
|
||||
if ( original->isChecked()) {
|
||||
heightWidget->hide();
|
||||
widthWidget->hide();
|
||||
ratioCheckBox->hide();
|
||||
} else {
|
||||
heightWidget->show();
|
||||
widthWidget->show();
|
||||
ratioCheckBox->show();
|
||||
}
|
||||
}
|
||||
|
||||
void G4OpenGLQtExportDialog::textWidthChanged(
|
||||
const QString & s
|
||||
)
|
||||
{
|
||||
if (ratioCheckBox->isChecked()){
|
||||
QString tmp;
|
||||
width->setText(tmp.setNum(s.toInt()*originalHeight/originalHeight));
|
||||
}
|
||||
}
|
||||
|
||||
void G4OpenGLQtExportDialog:: textHeightChanged(
|
||||
const QString & s
|
||||
)
|
||||
{
|
||||
if (ratioCheckBox->isChecked()){
|
||||
QString tmp;
|
||||
width->setText(tmp.setNum(s.toInt()*originalWidth/originalWidth));
|
||||
}
|
||||
}
|
||||
|
||||
G4OpenGLQtExportDialog::~G4OpenGLQtExportDialog()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,206 @@
|
||||
/****************************************************************************
|
||||
** G4OpenGLQtExportDialog meta object code from reading C++ file 'G4OpenGLQtExportDialog.hh'
|
||||
**
|
||||
** Created: Mon Nov 12 10:36:59 2007
|
||||
** by: The Qt MOC ($Id: G4OpenGLQtExportDialog_moc.cc,v 1.5 2007/11/14 11:49:00 lgarnier Exp $)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
*****************************************************************************/
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLQT_DRIVER
|
||||
|
||||
#undef QT_NO_COMPAT
|
||||
#include "../include/G4OpenGLQtExportDialog.hh"
|
||||
#include <qmetaobject.h>
|
||||
#include <qapplication.h>
|
||||
|
||||
#if QT_VERSION < 0x040000
|
||||
|
||||
#include <private/qucomextra_p.h>
|
||||
#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26)
|
||||
#error "This file was generated using the moc from 3.3.5. It"
|
||||
#error "cannot be used with the include files from this version of Qt."
|
||||
#error "(The moc has changed too much.)"
|
||||
#endif
|
||||
|
||||
const char *G4OpenGLQtExportDialog::className() const
|
||||
{
|
||||
return "G4OpenGLQtExportDialog";
|
||||
}
|
||||
|
||||
QMetaObject *G4OpenGLQtExportDialog::metaObj = 0;
|
||||
static QMetaObjectCleanUp cleanUp_G4OpenGLQtExportDialog( "G4OpenGLQtExportDialog", &G4OpenGLQtExportDialog::staticMetaObject );
|
||||
|
||||
#ifndef QT_NO_TRANSLATION
|
||||
QString G4OpenGLQtExportDialog::tr( const char *s, const char *c )
|
||||
{
|
||||
if ( qApp )
|
||||
return qApp->translate( "G4OpenGLQtExportDialog", s, c, QApplication::DefaultCodec );
|
||||
else
|
||||
return QString::fromLatin1( s );
|
||||
}
|
||||
#ifndef QT_NO_TRANSLATION_UTF8
|
||||
QString G4OpenGLQtExportDialog::trUtf8( const char *s, const char *c )
|
||||
{
|
||||
if ( qApp )
|
||||
return qApp->translate( "G4OpenGLQtExportDialog", s, c, QApplication::UnicodeUTF8 );
|
||||
else
|
||||
return QString::fromUtf8( s );
|
||||
}
|
||||
#endif // QT_NO_TRANSLATION_UTF8
|
||||
|
||||
#endif // QT_NO_TRANSLATION
|
||||
|
||||
QMetaObject* G4OpenGLQtExportDialog::staticMetaObject()
|
||||
{
|
||||
if ( metaObj )
|
||||
return metaObj;
|
||||
QMetaObject* parentObject = QDialog::staticMetaObject();
|
||||
static const QUParameter param_slot_0[] = {
|
||||
{ 0, &static_QUType_bool, 0, QUParameter::In }
|
||||
};
|
||||
static const QUMethod slot_0 = {"changeSizeBox", 1, param_slot_0 };
|
||||
static const QUParameter param_slot_1[] = {
|
||||
{ 0, &static_QUType_QString, 0, QUParameter::In }
|
||||
};
|
||||
static const QUMethod slot_1 = {"textWidthChanged", 1, param_slot_1 };
|
||||
static const QUParameter param_slot_2[] = {
|
||||
{ 0, &static_QUType_QString, 0, QUParameter::In }
|
||||
};
|
||||
static const QUMethod slot_2 = {"textHeightChanged", 1, param_slot_2 };
|
||||
static const QMetaData slot_tbl[] = {
|
||||
{ "changeSizeBox(bool)", &slot_0, QMetaData::Public },
|
||||
{ "textWidthChanged(const QString&)", &slot_1, QMetaData::Public },
|
||||
{ "textHeightChanged(const QString&)", &slot_2, QMetaData::Public }
|
||||
};
|
||||
metaObj = QMetaObject::new_metaobject(
|
||||
"G4OpenGLQtExportDialog", parentObject,
|
||||
slot_tbl, 3,
|
||||
0, 0,
|
||||
#ifndef QT_NO_PROPERTIES
|
||||
0, 0,
|
||||
0, 0,
|
||||
#endif // QT_NO_PROPERTIES
|
||||
0, 0 );
|
||||
cleanUp_G4OpenGLQtExportDialog.setMetaObject( metaObj );
|
||||
return metaObj;
|
||||
}
|
||||
|
||||
void* G4OpenGLQtExportDialog::qt_cast( const char* clname )
|
||||
{
|
||||
if ( !qstrcmp( clname, "G4OpenGLQtExportDialog" ) )
|
||||
return this;
|
||||
return QDialog::qt_cast( clname );
|
||||
}
|
||||
|
||||
bool G4OpenGLQtExportDialog::qt_invoke( int _id, QUObject* _o )
|
||||
{
|
||||
switch ( _id - staticMetaObject()->slotOffset() ) {
|
||||
case 0: changeSizeBox((bool)static_QUType_bool.get(_o+1)); break;
|
||||
case 1: textWidthChanged((const QString&)static_QUType_QString.get(_o+1)); break;
|
||||
case 2: textHeightChanged((const QString&)static_QUType_QString.get(_o+1)); break;
|
||||
default:
|
||||
return QDialog::qt_invoke( _id, _o );
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool G4OpenGLQtExportDialog::qt_emit( int _id, QUObject* _o )
|
||||
{
|
||||
return QDialog::qt_emit(_id,_o);
|
||||
}
|
||||
#ifndef QT_NO_PROPERTIES
|
||||
|
||||
bool G4OpenGLQtExportDialog::qt_property( int id, int f, QVariant* v)
|
||||
{
|
||||
return QDialog::qt_property( id, f, v);
|
||||
}
|
||||
|
||||
bool G4OpenGLQtExportDialog::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; }
|
||||
#endif // QT_NO_PROPERTIES
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
** Meta object code from reading C++ file 'G4OpenGLQtExportDialog.hh'
|
||||
**
|
||||
** Created: Fri Sep 28 12:35:41 2007
|
||||
** by: The Qt Meta Object Compiler version 59 (Qt 4.2.2)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
*****************************************************************************/
|
||||
|
||||
#if QT_VERSION >= 0x040000
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLQT_DRIVER
|
||||
|
||||
#include "../include/G4OpenGLQtExportDialog.hh"
|
||||
#if !defined(Q_MOC_OUTPUT_REVISION)
|
||||
#error "The header file 'G4OpenGLQtExportDialog.hh' doesn't include <QObject>."
|
||||
#elif Q_MOC_OUTPUT_REVISION != 59
|
||||
#error "This file was generated using the moc from 4.2.2. It"
|
||||
#error "cannot be used with the include files from this version of Qt."
|
||||
#error "(The moc has changed too much.)"
|
||||
#endif
|
||||
|
||||
static const uint qt_meta_data_G4OpenGLQtExportDialog[] = {
|
||||
|
||||
// content:
|
||||
1, // revision
|
||||
0, // classname
|
||||
0, 0, // classinfo
|
||||
3, 10, // methods
|
||||
0, 0, // properties
|
||||
0, 0, // enums/sets
|
||||
|
||||
// slots: signature, parameters, type, tag, flags
|
||||
23, 43, 43, 43, 0x0a,
|
||||
44, 43, 43, 43, 0x0a,
|
||||
70, 43, 43, 43, 0x0a,
|
||||
|
||||
0 // eod
|
||||
};
|
||||
|
||||
static const char qt_meta_stringdata_G4OpenGLQtExportDialog[] = {
|
||||
"G4OpenGLQtExportDialog\0changeSizeBox(bool)\0"
|
||||
"\0textWidthChanged(QString)\0"
|
||||
"textHeightChanged(QString)\0"
|
||||
};
|
||||
|
||||
const QMetaObject G4OpenGLQtExportDialog::staticMetaObject = {
|
||||
{ &QDialog::staticMetaObject, qt_meta_stringdata_G4OpenGLQtExportDialog,
|
||||
qt_meta_data_G4OpenGLQtExportDialog, 0 }
|
||||
};
|
||||
|
||||
const QMetaObject *G4OpenGLQtExportDialog::metaObject() const
|
||||
{
|
||||
return &staticMetaObject;
|
||||
}
|
||||
|
||||
void *G4OpenGLQtExportDialog::qt_metacast(const char *_clname)
|
||||
{
|
||||
if (!_clname) return 0;
|
||||
if (!strcmp(_clname, qt_meta_stringdata_G4OpenGLQtExportDialog))
|
||||
return static_cast<void*>(const_cast<G4OpenGLQtExportDialog*>(this));
|
||||
return QDialog::qt_metacast(_clname);
|
||||
}
|
||||
|
||||
int G4OpenGLQtExportDialog::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
|
||||
{
|
||||
_id = QDialog::qt_metacall(_c, _id, _a);
|
||||
if (_id < 0)
|
||||
return _id;
|
||||
if (_c == QMetaObject::InvokeMetaMethod) {
|
||||
switch (_id) {
|
||||
case 0: changeSizeBox((*reinterpret_cast< bool(*)>(_a[1]))); break;
|
||||
case 1: textWidthChanged((*reinterpret_cast< const QString(*)>(_a[1]))); break;
|
||||
case 2: textHeightChanged((*reinterpret_cast< const QString(*)>(_a[1]))); break;
|
||||
}
|
||||
_id -= 3;
|
||||
}
|
||||
return _id;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,308 @@
|
||||
/****************************************************************************
|
||||
** G4OpenGLQtViewer meta object code from reading C++ file 'G4OpenGLQtViewer.hh'
|
||||
**
|
||||
** Created: Mon Nov 12 10:34:24 2007
|
||||
** by: The Qt MOC ($Id: G4OpenGLQtViewer_moc.cc,v 1.5 2007/11/14 11:49:00 lgarnier Exp $)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
*****************************************************************************/
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLQT_DRIVER
|
||||
|
||||
#undef QT_NO_COMPAT
|
||||
#include "../include/G4OpenGLQtViewer.hh"
|
||||
#include <qmetaobject.h>
|
||||
#include <qapplication.h>
|
||||
|
||||
#if QT_VERSION < 0x040000
|
||||
|
||||
#include <private/qucomextra_p.h>
|
||||
#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26)
|
||||
#error "This file was generated using the moc from 3.3.5. It"
|
||||
#error "cannot be used with the include files from this version of Qt."
|
||||
#error "(The moc has changed too much.)"
|
||||
#endif
|
||||
|
||||
const char *G4OpenGLQtViewer::className() const
|
||||
{
|
||||
return "G4OpenGLQtViewer";
|
||||
}
|
||||
|
||||
QMetaObject *G4OpenGLQtViewer::metaObj = 0;
|
||||
static QMetaObjectCleanUp cleanUp_G4OpenGLQtViewer( "G4OpenGLQtViewer", &G4OpenGLQtViewer::staticMetaObject );
|
||||
|
||||
#ifndef QT_NO_TRANSLATION
|
||||
QString G4OpenGLQtViewer::tr( const char *s, const char *c )
|
||||
{
|
||||
if ( qApp )
|
||||
return qApp->translate( "G4OpenGLQtViewer", s, c, QApplication::DefaultCodec );
|
||||
else
|
||||
return QString::fromLatin1( s );
|
||||
}
|
||||
#ifndef QT_NO_TRANSLATION_UTF8
|
||||
QString G4OpenGLQtViewer::trUtf8( const char *s, const char *c )
|
||||
{
|
||||
if ( qApp )
|
||||
return qApp->translate( "G4OpenGLQtViewer", s, c, QApplication::UnicodeUTF8 );
|
||||
else
|
||||
return QString::fromUtf8( s );
|
||||
}
|
||||
#endif // QT_NO_TRANSLATION_UTF8
|
||||
|
||||
#endif // QT_NO_TRANSLATION
|
||||
|
||||
QMetaObject* G4OpenGLQtViewer::staticMetaObject()
|
||||
{
|
||||
if ( metaObj )
|
||||
return metaObj;
|
||||
QMetaObject* parentObject = QObject::staticMetaObject();
|
||||
static const QUMethod slot_0 = {"actionDrawingWireframe", 0, 0 };
|
||||
static const QUMethod slot_1 = {"actionDrawingLineRemoval", 0, 0 };
|
||||
static const QUMethod slot_2 = {"actionDrawingSurfaceRemoval", 0, 0 };
|
||||
static const QUMethod slot_3 = {"actionDrawingLineSurfaceRemoval", 0, 0 };
|
||||
static const QUMethod slot_4 = {"actionControlPanels", 0, 0 };
|
||||
static const QUMethod slot_5 = {"actionExitG4", 0, 0 };
|
||||
static const QUMethod slot_6 = {"actionCreateEPS", 0, 0 };
|
||||
static const QUParameter param_slot_7[] = {
|
||||
{ 0, &static_QUType_int, 0, QUParameter::In }
|
||||
};
|
||||
static const QUMethod slot_7 = {"toggleDrawingAction", 1, param_slot_7 };
|
||||
static const QUParameter param_slot_8[] = {
|
||||
{ 0, &static_QUType_bool, 0, QUParameter::In }
|
||||
};
|
||||
static const QUMethod slot_8 = {"toggleMouseAction", 1, param_slot_8 };
|
||||
static const QUParameter param_slot_9[] = {
|
||||
{ 0, &static_QUType_bool, 0, QUParameter::In }
|
||||
};
|
||||
static const QUMethod slot_9 = {"toggleRepresentation", 1, param_slot_9 };
|
||||
static const QUParameter param_slot_10[] = {
|
||||
{ 0, &static_QUType_bool, 0, QUParameter::In }
|
||||
};
|
||||
static const QUMethod slot_10 = {"toggleBackground", 1, param_slot_10 };
|
||||
static const QUParameter param_slot_11[] = {
|
||||
{ 0, &static_QUType_bool, 0, QUParameter::In }
|
||||
};
|
||||
static const QUMethod slot_11 = {"toggleTransparency", 1, param_slot_11 };
|
||||
static const QUParameter param_slot_12[] = {
|
||||
{ 0, &static_QUType_bool, 0, QUParameter::In }
|
||||
};
|
||||
static const QUMethod slot_12 = {"toggleAntialiasing", 1, param_slot_12 };
|
||||
static const QUParameter param_slot_13[] = {
|
||||
{ 0, &static_QUType_bool, 0, QUParameter::In }
|
||||
};
|
||||
static const QUMethod slot_13 = {"toggleHaloing", 1, param_slot_13 };
|
||||
static const QUParameter param_slot_14[] = {
|
||||
{ 0, &static_QUType_bool, 0, QUParameter::In }
|
||||
};
|
||||
static const QUMethod slot_14 = {"toggleAux", 1, param_slot_14 };
|
||||
static const QUParameter param_slot_15[] = {
|
||||
{ 0, &static_QUType_bool, 0, QUParameter::In }
|
||||
};
|
||||
static const QUMethod slot_15 = {"toggleFullScreen", 1, param_slot_15 };
|
||||
static const QUMethod slot_16 = {"dialogClosed", 0, 0 };
|
||||
static const QMetaData slot_tbl[] = {
|
||||
{ "actionDrawingWireframe()", &slot_0, QMetaData::Private },
|
||||
{ "actionDrawingLineRemoval()", &slot_1, QMetaData::Private },
|
||||
{ "actionDrawingSurfaceRemoval()", &slot_2, QMetaData::Private },
|
||||
{ "actionDrawingLineSurfaceRemoval()", &slot_3, QMetaData::Private },
|
||||
{ "actionControlPanels()", &slot_4, QMetaData::Private },
|
||||
{ "actionExitG4()", &slot_5, QMetaData::Private },
|
||||
{ "actionCreateEPS()", &slot_6, QMetaData::Private },
|
||||
{ "toggleDrawingAction(int)", &slot_7, QMetaData::Private },
|
||||
{ "toggleMouseAction(bool)", &slot_8, QMetaData::Private },
|
||||
{ "toggleRepresentation(bool)", &slot_9, QMetaData::Private },
|
||||
{ "toggleBackground(bool)", &slot_10, QMetaData::Private },
|
||||
{ "toggleTransparency(bool)", &slot_11, QMetaData::Private },
|
||||
{ "toggleAntialiasing(bool)", &slot_12, QMetaData::Private },
|
||||
{ "toggleHaloing(bool)", &slot_13, QMetaData::Private },
|
||||
{ "toggleAux(bool)", &slot_14, QMetaData::Private },
|
||||
{ "toggleFullScreen(bool)", &slot_15, QMetaData::Private },
|
||||
{ "dialogClosed()", &slot_16, QMetaData::Private }
|
||||
};
|
||||
metaObj = QMetaObject::new_metaobject(
|
||||
"G4OpenGLQtViewer", parentObject,
|
||||
slot_tbl, 17,
|
||||
0, 0,
|
||||
#ifndef QT_NO_PROPERTIES
|
||||
0, 0,
|
||||
0, 0,
|
||||
#endif // QT_NO_PROPERTIES
|
||||
0, 0 );
|
||||
cleanUp_G4OpenGLQtViewer.setMetaObject( metaObj );
|
||||
return metaObj;
|
||||
}
|
||||
|
||||
void* G4OpenGLQtViewer::qt_cast( const char* clname )
|
||||
{
|
||||
if ( !qstrcmp( clname, "G4OpenGLQtViewer" ) )
|
||||
return this;
|
||||
if ( !qstrcmp( clname, "G4OpenGLViewer" ) )
|
||||
return (G4OpenGLViewer*)this;
|
||||
return QObject::qt_cast( clname );
|
||||
}
|
||||
|
||||
bool G4OpenGLQtViewer::qt_invoke( int _id, QUObject* _o )
|
||||
{
|
||||
switch ( _id - staticMetaObject()->slotOffset() ) {
|
||||
case 0: actionDrawingWireframe(); break;
|
||||
case 1: actionDrawingLineRemoval(); break;
|
||||
case 2: actionDrawingSurfaceRemoval(); break;
|
||||
case 3: actionDrawingLineSurfaceRemoval(); break;
|
||||
case 4: actionControlPanels(); break;
|
||||
case 5: actionExitG4(); break;
|
||||
case 6: actionCreateEPS(); break;
|
||||
case 7: toggleDrawingAction((int)static_QUType_int.get(_o+1)); break;
|
||||
case 8: toggleMouseAction((bool)static_QUType_bool.get(_o+1)); break;
|
||||
case 9: toggleRepresentation((bool)static_QUType_bool.get(_o+1)); break;
|
||||
case 10: toggleBackground((bool)static_QUType_bool.get(_o+1)); break;
|
||||
case 11: toggleTransparency((bool)static_QUType_bool.get(_o+1)); break;
|
||||
case 12: toggleAntialiasing((bool)static_QUType_bool.get(_o+1)); break;
|
||||
case 13: toggleHaloing((bool)static_QUType_bool.get(_o+1)); break;
|
||||
case 14: toggleAux((bool)static_QUType_bool.get(_o+1)); break;
|
||||
case 15: toggleFullScreen((bool)static_QUType_bool.get(_o+1)); break;
|
||||
case 16: dialogClosed(); break;
|
||||
default:
|
||||
return QObject::qt_invoke( _id, _o );
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool G4OpenGLQtViewer::qt_emit( int _id, QUObject* _o )
|
||||
{
|
||||
return QObject::qt_emit(_id,_o);
|
||||
}
|
||||
#ifndef QT_NO_PROPERTIES
|
||||
|
||||
bool G4OpenGLQtViewer::qt_property( int id, int f, QVariant* v)
|
||||
{
|
||||
return QObject::qt_property( id, f, v);
|
||||
}
|
||||
|
||||
bool G4OpenGLQtViewer::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; }
|
||||
#endif // QT_NO_PROPERTIES
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
** Meta object code from reading C++ file 'G4OpenGLQtViewer.hh'
|
||||
**
|
||||
** Created: Tue Sep 18 17:43:43 2007
|
||||
** by: The Qt Meta Object Compiler version 59 (Qt 4.2.2)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
*****************************************************************************/
|
||||
|
||||
#if QT_VERSION >= 0x040000
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLQT_DRIVER
|
||||
|
||||
#include "../include/G4OpenGLQtViewer.hh"
|
||||
#if !defined(Q_MOC_OUTPUT_REVISION)
|
||||
#error "The header file 'G4OpenGLQtViewer.hh' doesn't include <QObject>."
|
||||
#elif Q_MOC_OUTPUT_REVISION != 59
|
||||
#error "This file was generated using the moc from 4.2.2. It"
|
||||
#error "cannot be used with the include files from this version of Qt."
|
||||
#error "(The moc has changed too much.)"
|
||||
#endif
|
||||
|
||||
static const uint qt_meta_data_G4OpenGLQtViewer[] = {
|
||||
|
||||
// content:
|
||||
1, // revision
|
||||
0, // classname
|
||||
0, 0, // classinfo
|
||||
17, 10, // methods
|
||||
0, 0, // properties
|
||||
0, 0, // enums/sets
|
||||
|
||||
// slots: signature, parameters, type, tag, flags
|
||||
17, 42, 42, 42, 0x08,
|
||||
43, 42, 42, 42, 0x08,
|
||||
70, 42, 42, 42, 0x08,
|
||||
100, 42, 42, 42, 0x08,
|
||||
134, 42, 42, 42, 0x08,
|
||||
156, 42, 42, 42, 0x08,
|
||||
171, 42, 42, 42, 0x08,
|
||||
189, 42, 42, 42, 0x08,
|
||||
214, 42, 42, 42, 0x08,
|
||||
238, 42, 42, 42, 0x08,
|
||||
265, 42, 42, 42, 0x08,
|
||||
288, 42, 42, 42, 0x08,
|
||||
313, 42, 42, 42, 0x08,
|
||||
338, 42, 42, 42, 0x08,
|
||||
358, 42, 42, 42, 0x08,
|
||||
374, 42, 42, 42, 0x08,
|
||||
397, 42, 42, 42, 0x08,
|
||||
|
||||
0 // eod
|
||||
};
|
||||
|
||||
static const char qt_meta_stringdata_G4OpenGLQtViewer[] = {
|
||||
"G4OpenGLQtViewer\0actionDrawingWireframe()\0"
|
||||
"\0actionDrawingLineRemoval()\0"
|
||||
"actionDrawingSurfaceRemoval()\0"
|
||||
"actionDrawingLineSurfaceRemoval()\0"
|
||||
"actionControlPanels()\0actionExitG4()\0"
|
||||
"actionCreateEPS()\0toggleDrawingAction(int)\0"
|
||||
"toggleMouseAction(bool)\0"
|
||||
"toggleRepresentation(bool)\0"
|
||||
"toggleBackground(bool)\0toggleTransparency(bool)\0"
|
||||
"toggleAntialiasing(bool)\0toggleHaloing(bool)\0"
|
||||
"toggleAux(bool)\0toggleFullScreen(bool)\0"
|
||||
"dialogClosed()\0"
|
||||
};
|
||||
|
||||
const QMetaObject G4OpenGLQtViewer::staticMetaObject = {
|
||||
{ &QObject::staticMetaObject, qt_meta_stringdata_G4OpenGLQtViewer,
|
||||
qt_meta_data_G4OpenGLQtViewer, 0 }
|
||||
};
|
||||
|
||||
const QMetaObject *G4OpenGLQtViewer::metaObject() const
|
||||
{
|
||||
return &staticMetaObject;
|
||||
}
|
||||
|
||||
void *G4OpenGLQtViewer::qt_metacast(const char *_clname)
|
||||
{
|
||||
if (!_clname) return 0;
|
||||
if (!strcmp(_clname, qt_meta_stringdata_G4OpenGLQtViewer))
|
||||
return static_cast<void*>(const_cast<G4OpenGLQtViewer*>(this));
|
||||
if (!strcmp(_clname, "G4OpenGLViewer"))
|
||||
return static_cast<G4OpenGLViewer*>(const_cast<G4OpenGLQtViewer*>(this));
|
||||
return QObject::qt_metacast(_clname);
|
||||
}
|
||||
|
||||
int G4OpenGLQtViewer::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
|
||||
{
|
||||
_id = QObject::qt_metacall(_c, _id, _a);
|
||||
if (_id < 0)
|
||||
return _id;
|
||||
if (_c == QMetaObject::InvokeMetaMethod) {
|
||||
switch (_id) {
|
||||
case 0: actionDrawingWireframe(); break;
|
||||
case 1: actionDrawingLineRemoval(); break;
|
||||
case 2: actionDrawingSurfaceRemoval(); break;
|
||||
case 3: actionDrawingLineSurfaceRemoval(); break;
|
||||
case 4: actionControlPanels(); break;
|
||||
case 5: actionExitG4(); break;
|
||||
case 6: actionCreateEPS(); break;
|
||||
case 7: toggleDrawingAction((*reinterpret_cast< int(*)>(_a[1]))); break;
|
||||
case 8: toggleMouseAction((*reinterpret_cast< bool(*)>(_a[1]))); break;
|
||||
case 9: toggleRepresentation((*reinterpret_cast< bool(*)>(_a[1]))); break;
|
||||
case 10: toggleBackground((*reinterpret_cast< bool(*)>(_a[1]))); break;
|
||||
case 11: toggleTransparency((*reinterpret_cast< bool(*)>(_a[1]))); break;
|
||||
case 12: toggleAntialiasing((*reinterpret_cast< bool(*)>(_a[1]))); break;
|
||||
case 13: toggleHaloing((*reinterpret_cast< bool(*)>(_a[1]))); break;
|
||||
case 14: toggleAux((*reinterpret_cast< bool(*)>(_a[1]))); break;
|
||||
case 15: toggleFullScreen((*reinterpret_cast< bool(*)>(_a[1]))); break;
|
||||
case 16: dialogClosed(); break;
|
||||
}
|
||||
_id -= 17;
|
||||
}
|
||||
return _id;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLSceneHandler.cc,v 1.51 2007/05/25 15:41:38 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 27th March 1996
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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.cc,v 1.3 2007/11/15 18:24:28 lgarnier Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// OpenGLStoredQt graphics system factory.
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLQT_DRIVER
|
||||
|
||||
#include "G4VisFeaturesOfOpenGL.hh"
|
||||
#include "G4VSceneHandler.hh"
|
||||
#include "G4OpenGLSceneHandler.hh"
|
||||
#include "G4OpenGLViewer.hh"
|
||||
#include "G4OpenGLStoredQt.hh"
|
||||
#include "G4OpenGLStoredQtViewer.hh"
|
||||
#include "G4OpenGLViewerMessenger.hh"
|
||||
|
||||
G4OpenGLStoredQt::G4OpenGLStoredQt ():
|
||||
G4VGraphicsSystem ("OpenGLStoredQt",
|
||||
"OGLSQT",
|
||||
G4VisFeaturesOfOpenGLIQt (),
|
||||
G4VGraphicsSystem::threeD)
|
||||
{
|
||||
G4OpenGLViewerMessenger::GetInstance();
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
printf("G4OpenGLStoredQt::Create \n");
|
||||
#endif
|
||||
}
|
||||
|
||||
G4VSceneHandler* G4OpenGLStoredQt::CreateSceneHandler
|
||||
(const G4String& name) {
|
||||
G4VSceneHandler* pScene = new G4OpenGLStoredSceneHandler (*this, name);
|
||||
return pScene;
|
||||
}
|
||||
|
||||
G4VViewer* G4OpenGLStoredQt::CreateViewer
|
||||
(G4VSceneHandler& scene, const G4String& name) {
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
printf("G4OpenGLStoredQt::CreateViewer \n");
|
||||
#endif
|
||||
G4VViewer* pView =
|
||||
new G4OpenGLStoredQtViewer
|
||||
((G4OpenGLStoredSceneHandler&) scene, name);
|
||||
if (pView) {
|
||||
if (pView -> GetViewId () < 0) {
|
||||
G4cerr << "G4OpenGLStoredQt::CreateViewer: error flagged by negative"
|
||||
" view id in G4OpenGLStoredQtViewer creation."
|
||||
"\n Destroying view and returning null pointer."
|
||||
<< G4endl;
|
||||
delete pView;
|
||||
pView = 0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
G4cerr << "G4OpenGLStoredQt::CreateViewer: null pointer on"
|
||||
" new G4OpenGLStoredQtViewer." << G4endl;
|
||||
}
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
printf("G4OpenGLStoredQt::CreateViewer END \n");
|
||||
#endif
|
||||
return pView;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,329 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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.cc,v 1.6 2007/11/15 18:24:28 lgarnier Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Class G4OpenGLStoredQtViewer : a class derived from G4OpenGLQtViewer and
|
||||
// G4OpenGLStoredViewer.
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLQT_DRIVER
|
||||
|
||||
#include "G4OpenGLStoredQtViewer.hh"
|
||||
#include "G4VisManager.hh"
|
||||
|
||||
#include "G4ios.hh"
|
||||
|
||||
//#include <qmouseevent.h>
|
||||
#include <qevent.h> // include <qcontextmenuevent.h>
|
||||
|
||||
G4OpenGLStoredQtViewer::G4OpenGLStoredQtViewer
|
||||
(G4OpenGLStoredSceneHandler& sceneHandler,
|
||||
const G4String& name):
|
||||
G4VViewer (sceneHandler, sceneHandler.IncrementViewCount (), name),
|
||||
G4OpenGLViewer (sceneHandler),
|
||||
G4OpenGLQtViewer (sceneHandler),
|
||||
G4OpenGLStoredViewer (sceneHandler),
|
||||
QGLWidget() // FIXME : gerer le pb du parent !
|
||||
{
|
||||
nbPaint =0;
|
||||
hasToRepaint =false;
|
||||
if (fViewId < 0) return; // In case error in base class instantiation.
|
||||
}
|
||||
|
||||
G4OpenGLStoredQtViewer::~G4OpenGLStoredQtViewer() {
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
printf("GLWidget::~GLWidget \n");
|
||||
#endif
|
||||
makeCurrent();
|
||||
// this is connect to the Dialog for deleting it properly
|
||||
// when close event.
|
||||
// ((QDialog*)window())->reject();
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
printf("GLWidget::~GLWidget END\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
void G4OpenGLStoredQtViewer::Initialise() {
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
printf("GLWidget::Initialise \n");
|
||||
#endif
|
||||
readyToPaint = false;
|
||||
CreateGLQtContext ();
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
printf("G4OpenGLStoredQtViewer::Initialise () 2\n");
|
||||
#endif
|
||||
CreateMainWindow (this);
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
printf("G4OpenGLStoredQtViewer::Initialise () 3\n");
|
||||
#endif
|
||||
CreateFontLists (); // FIXME Does nothing!
|
||||
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
printf("readyToPaint = true \n");
|
||||
#endif
|
||||
readyToPaint = true;
|
||||
|
||||
// First Draw
|
||||
SetView();
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
printf(" ClearView\n");
|
||||
#endif
|
||||
ClearView (); //ok, put the background correct
|
||||
ShowView();
|
||||
FinishView();
|
||||
}
|
||||
|
||||
void G4OpenGLStoredQtViewer::initializeGL () {
|
||||
|
||||
InitializeGLView ();
|
||||
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
printf("G4OpenGLStoredQtViewer::InitialiseGL () 1\n");
|
||||
#endif
|
||||
|
||||
// clear the buffers and window.
|
||||
ClearView ();
|
||||
// printf("G4OpenGLStoredQtViewer::InitialiseGL () 2\n");
|
||||
FinishView ();
|
||||
|
||||
glDepthFunc (GL_LEQUAL);
|
||||
glDepthMask (GL_TRUE);
|
||||
|
||||
hasToRepaint =true;
|
||||
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
printf("G4OpenGLStoredQtViewer::InitialiseGL -------------------------------------------------------------------------------------\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void G4OpenGLStoredQtViewer::DrawView () {
|
||||
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
printf("G4OpenGLStoredQtViewer::DrawView %d %d VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV\n",WinSize_x, WinSize_y);
|
||||
printf("G4OpenGLStoredQtViewer::DrawView Dialog adress : %d\n",GLWindow);
|
||||
#endif
|
||||
G4ViewParameters::DrawingStyle style = GetViewParameters().GetDrawingStyle();
|
||||
|
||||
//Make sure current viewer is attached and clean...
|
||||
//Qt version needed
|
||||
glViewport (0, 0, WinSize_x, WinSize_y);
|
||||
|
||||
//See if things have changed from last time and remake if necessary...
|
||||
// The fNeedKernelVisit flag might have been set by the user in
|
||||
// /vis/viewer/rebuild, but if not, make decision and set flag only
|
||||
// if necessary...
|
||||
if (!fNeedKernelVisit)
|
||||
|
||||
if (!fNeedKernelVisit) KernelVisitDecision ();
|
||||
|
||||
G4bool kernelVisitWasNeeded = fNeedKernelVisit; // Keep (ProcessView resets).
|
||||
ProcessView ();
|
||||
|
||||
|
||||
if(style!=G4ViewParameters::hlr &&
|
||||
haloing_enabled) {
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
printf("G4OpenGLStoredQtViewer::DrawView DANS LE IF\n");
|
||||
#endif
|
||||
|
||||
HaloingFirstPass ();
|
||||
DrawDisplayLists ();
|
||||
glFlush ();
|
||||
|
||||
HaloingSecondPass ();
|
||||
|
||||
DrawDisplayLists ();
|
||||
FinishView ();
|
||||
|
||||
} else {
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
printf("*************************** CASE 1 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ \n");
|
||||
#endif
|
||||
|
||||
// If kernel visit was needed, drawing and FinishView will already
|
||||
// have been done, so...
|
||||
if (!kernelVisitWasNeeded) {
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
printf("*************************** CASE 2 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ \n");
|
||||
#endif
|
||||
DrawDisplayLists ();
|
||||
FinishView ();
|
||||
} else {
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
printf("*************************** CASE 3 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ \n");
|
||||
#endif
|
||||
// However, union cutaways are implemented in DrawDisplayLists, so make
|
||||
// an extra pass...
|
||||
if (fVP.IsCutaway() &&
|
||||
fVP.GetCutawayMode() == G4ViewParameters::cutawayUnion) {
|
||||
ClearView();
|
||||
DrawDisplayLists ();
|
||||
FinishView ();
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
printf("*************************** CASE 4 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ \n");
|
||||
#endif
|
||||
} else { // ADD TO AVOID KernelVisit=1 and nothing to display
|
||||
DrawDisplayLists ();
|
||||
FinishView ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
printf("G4OpenGLStoredQtViewer::DrawView %d %d ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ \n",WinSize_x, WinSize_y);
|
||||
#endif
|
||||
hasToRepaint =true;
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
void G4OpenGLStoredQtViewer::FinishView (
|
||||
)
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
|
||||
{
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
printf("G4OpenGLStoredQtViewer::FinishView VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV\n");
|
||||
#endif
|
||||
|
||||
glFlush ();
|
||||
swapBuffers ();
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
printf("G4OpenGLStoredQtViewer::FinishView ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ \n");
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
- Lors du resize de la fenetre, on doit non pas redessiner le detecteur, mais aussi les evenements
|
||||
*/
|
||||
void G4OpenGLStoredQtViewer::resizeGL(
|
||||
int aWidth
|
||||
,int aHeight)
|
||||
{
|
||||
glViewport(0, 0, aWidth, aHeight);
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
|
||||
if (((WinSize_x != (G4int)aWidth)) || (WinSize_y != (G4int) aHeight)) {
|
||||
hasToRepaint =true;
|
||||
}
|
||||
WinSize_x = (G4int) aWidth;
|
||||
WinSize_y = (G4int) aHeight;
|
||||
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
printf("G4OpenGLStoredQtViewer::resizeGL ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ %d %d=%d %d=%d\n",hasToRepaint,width(),aWidth,height(),aHeight);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
void G4OpenGLStoredQtViewer::paintGL()
|
||||
{
|
||||
if (!readyToPaint) {
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
printf("G4OpenGLStoredQtViewer::paintGL ============ Not ready %d\n",readyToPaint);
|
||||
#endif
|
||||
readyToPaint= true;
|
||||
return;
|
||||
}
|
||||
// DO NOT RESIZE IF SIZE HAS NOT CHANGE :
|
||||
// WHEN CLICK ON THE FRAME FOR EXAMPLE
|
||||
// EXECEPT WHEN MOUSE MOVE EVENT
|
||||
if ( !hasToRepaint) {
|
||||
if (((WinSize_x == (G4int)width())) &&(WinSize_y == (G4int) height())) {
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
printf("G4OpenGLStoredQtViewer::paintGL ============ Dont repaint\n");
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
}
|
||||
nbPaint++;
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
printf("G4OpenGLStoredQtViewer::paintGL VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV %d ready %d\n",nbPaint,readyToPaint);
|
||||
#endif
|
||||
WinSize_x = (G4int) width();
|
||||
WinSize_y = (G4int) height();
|
||||
|
||||
glViewport (0, 0, width(), height());
|
||||
// glLoadIdentity();
|
||||
|
||||
|
||||
SetView();
|
||||
|
||||
// // printf("before ClearView\n");
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
printf(" ClearView\n");
|
||||
#endif
|
||||
|
||||
ClearView (); //ok, put the background correct
|
||||
DrawView();
|
||||
|
||||
hasToRepaint =false;
|
||||
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
printf("G4OpenGLStoredQtViewer::paintGL ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ %d ready %d\n",nbPaint,readyToPaint);
|
||||
#endif
|
||||
}
|
||||
|
||||
void G4OpenGLStoredQtViewer::mousePressEvent(QMouseEvent *event)
|
||||
{
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
printf("G4OpenGLStoredQtViewer::mousePressEvent\n");
|
||||
#endif
|
||||
G4MousePressEvent(event->pos());
|
||||
}
|
||||
|
||||
void G4OpenGLStoredQtViewer::mouseMoveEvent(QMouseEvent *event)
|
||||
{
|
||||
#ifdef GEANT4_QT_DEBUG
|
||||
printf("G4OpenGLStoredQtViewer::mouseMoveEvent\n");
|
||||
#endif
|
||||
#if QT_VERSION < 0x040000
|
||||
G4MouseMoveEvent(event->x(),event->y(),event->button());
|
||||
#else
|
||||
G4MouseMoveEvent(event->x(),event->y(),event->buttons());
|
||||
#endif
|
||||
// DrawView();
|
||||
}
|
||||
|
||||
|
||||
void G4OpenGLStoredQtViewer::contextMenuEvent(QContextMenuEvent *e)
|
||||
{
|
||||
manageContextMenuEvent(e);
|
||||
}
|
||||
|
||||
void G4OpenGLStoredQtViewer::updateQWidget() {
|
||||
hasToRepaint= true;
|
||||
updateGL();
|
||||
hasToRepaint= false;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLStoredSceneHandler.cc,v 1.34 2007/04/04 16:50:27 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.cc,v 1.23 2007/04/04 16:50:27 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 7th February 1997
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLStoredWin32.cc,v 1.14 2006/08/14 12:07:19 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// OpenGLStoredWin32 graphics system factory.
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLStoredWin32Viewer.cc,v 1.19 2007/04/04 16:50:27 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Class G4OpenGLStoredWin32Viewer : a class derived from G4OpenGLWin32Viewer and
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLStoredX.cc,v 1.13 2006/08/14 12:07:19 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// $Id: G4OpenGLStoredX.cc,v 1.14 2007/08/21 14:05:51 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
@@ -41,7 +41,6 @@
|
||||
#include "G4OpenGLStoredX.hh"
|
||||
#include "G4OpenGLStoredXViewer.hh"
|
||||
#include "G4OpenGLViewerMessenger.hh"
|
||||
#include "G4OpenGLXViewerMessenger.hh"
|
||||
|
||||
G4OpenGLStoredX::G4OpenGLStoredX ():
|
||||
G4VGraphicsSystem ("OpenGLStoredX",
|
||||
@@ -50,7 +49,6 @@ G4OpenGLStoredX::G4OpenGLStoredX ():
|
||||
G4VGraphicsSystem::threeD)
|
||||
{
|
||||
G4OpenGLViewerMessenger::GetInstance();
|
||||
G4OpenGLXViewerMessenger::GetInstance();
|
||||
}
|
||||
|
||||
G4OpenGLStoredX::~G4OpenGLStoredX () {}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLStoredXViewer.cc,v 1.22 2007/04/04 16:50:27 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.cc,v 1.11 2006/08/14 12:07:19 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLStoredXmViewer.cc,v 1.22 2007/04/04 16:50:27 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.cc,v 1.8 2006/06/29 21:19:32 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 24th October 1996
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLViewer.cc,v 1.34 2007/05/24 18:27:13 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 27th March 1996
|
||||
|
||||
@@ -24,8 +24,10 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLViewerMessenger.cc,v 1.8 2007/05/16 15:59:58 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// $Id: G4OpenGLViewerMessenger.cc,v 1.11 2007/11/15 10:14:23 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGL_DRIVER
|
||||
|
||||
#include "G4OpenGLViewerMessenger.hh"
|
||||
|
||||
@@ -63,7 +65,8 @@ G4OpenGLViewerMessenger::G4OpenGLViewerMessenger()
|
||||
fpCommandPrintEPS->SetGuidance("Print Encapsulated PostScript file.");
|
||||
fpCommandPrintEPS->SetGuidance
|
||||
("Generates files with names G4OpenGL_n.eps, where n is a sequence"
|
||||
"\nnumber, starting at 0.");
|
||||
"\nnumber, starting at 0."
|
||||
"\nCan be \"vectored\" or \"pixmap\" - see \"/vis/ogl/set/printMode\".");
|
||||
|
||||
fpDirectorySet = new G4UIdirectory ("/vis/ogl/set/");
|
||||
fpDirectorySet->SetGuidance("G4OpenGLViewer set commands.");
|
||||
@@ -217,6 +220,8 @@ G4OpenGLViewerMessenger::~G4OpenGLViewerMessenger ()
|
||||
delete fpDirectorySet;
|
||||
delete fpCommandPrintEPS;
|
||||
delete fpDirectory;
|
||||
|
||||
delete fpInstance;
|
||||
}
|
||||
|
||||
void G4OpenGLViewerMessenger::SetNewValue
|
||||
@@ -377,3 +382,5 @@ void G4OpenGLViewerMessenger::SetNewValue
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLWin32Viewer.cc,v 1.17 2006/06/29 21:19:36 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// G4OpenGLWin32Viewer : Class to provide WindowsNT specific
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXViewer.cc,v 1.42 2007/05/25 10:47:17 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 7th February 1997
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmBox.cc,v 1.6 2006/06/29 21:19:40 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//Box container class
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmConvenienceRoutines.cc,v 1.11 2006/06/29 21:19:42 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 16th April 1997
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmFourArrowButtons.cc,v 1.5 2006/06/29 21:19:44 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.cc,v 1.6 2006/06/29 21:19:46 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//Framed box container class
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmMainMenubarCallbacks.cc,v 1.13 2006/06/29 21:19:48 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 16th April 1997
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmPanningCallbacks.cc,v 1.8 2006/06/29 21:19:50 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 16th April 1997
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmPushButton.cc,v 1.6 2006/06/29 21:19:52 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.cc,v 1.6 2006/06/29 21:19:54 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: G4OpenGLXmRotationCallbacks.cc,v 1.14 2006/06/29 21:19:56 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 16th April 1997
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmSeparator.cc,v 1.5 2006/06/29 21:19:58 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.cc,v 1.7 2006/06/29 21:20:00 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: G4OpenGLXmStyleCallbacks.cc,v 1.14 2006/06/29 21:20:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 16th April 1997
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmTextField.cc,v 1.7 2006/06/29 21:20:04 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.cc,v 1.5 2006/06/29 21:20:06 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//Top level shell class
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmVWidgetComponent.cc,v 1.5 2006/06/29 21:20:08 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.cc,v 1.5 2006/06/29 21:20:10 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.cc,v 1.5 2006/06/29 21:20:12 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.cc,v 1.5 2006/06/29 21:20:14 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//Base class for all Motif shell widgets
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmViewer.cc,v 1.23 2006/06/29 21:20:16 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// $Id: G4OpenGLXmViewer.cc,v 1.24 2007/08/21 14:05:51 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
@@ -615,7 +615,7 @@ dolly_high (fVP.GetDolly() + 1000.0),
|
||||
fov (0.0),
|
||||
rot_sens_limit (90.),
|
||||
pan_sens_limit (100.),
|
||||
rot_sens (4.),
|
||||
rot_sens (1.),
|
||||
wob_sens (20.),
|
||||
original_vp(fVP.GetViewpointDirection()),
|
||||
frameNo (0),
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmViewerMessenger.cc,v 1.4 2006/06/29 21:20:18 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLXM_DRIVER
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmWindowHandlingCallbacks.cc,v 1.6 2006/06/29 21:20:20 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 16th June 1997
|
||||
|
||||
Reference in New Issue
Block a user