Import Geant4 9.1.0 source tree
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4DAWNFILE.hh,v 1.9 2006/06/29 21:16:28 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
// Satoshi TANAKA
|
||||
// DAWNFILE driver factory.
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4DAWNFILESceneHandler.hh,v 1.16 2006/06/29 21:16:30 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
// Satoshi TANAKA
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4DAWNFILEViewer.hh,v 1.10 2006/06/29 21:16:32 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
// Satoshi TANAKA
|
||||
// DAWNFILE viewer - opens window, hard copy, etc.
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4FRClientServer.hh,v 1.7 2006/06/29 21:16:34 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
// Satoshi TANAKA, Wed Jul 3 14:13:52 JST 1996
|
||||
////////////////////////////////
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4FRConst.hh,v 1.7 2006/06/29 21:16:36 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
// Satoshi TANAKA, Tue Jul 2 15:30:49 JST 1996
|
||||
///////////////////////////////////
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4FRFeatures.hh,v 1.6 2006/06/29 21:16:38 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
#if !defined G4_FR_FEATURES_HH
|
||||
#define G4_FR_FEATURES_HH
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4FRSceneFunc.icc,v 1.15 2006/07/10 15:31:45 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
|
||||
#include "G4PhysicalVolumeModel.hh"
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4FRofstream.hh,v 1.9 2006/06/29 21:16:42 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
#include <fstream>
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4FukuiRenderer.hh,v 1.8 2006/06/29 21:16:44 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Satoshi TANAKA
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4FukuiRendererSceneHandler.hh,v 1.15 2006/06/29 21:16:46 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Satoshi TANAKA, Fri Jun 28 11:19:19 JST 1996
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4FukuiRendererViewer.hh,v 1.8 2006/06/29 21:16:48 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Satoshi TANAKA, Fri Jun 28 12:10:14 JST 1996
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4DAWNFILE.cc,v 1.11 2006/06/29 21:16:50 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
// Satoshi TANAKA
|
||||
// DAWNFILE factory.
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4DAWNFILESceneHandler.cc,v 1.18 2006/06/29 21:16:52 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
// Satoshi TANAKA
|
||||
// DAWNFILE scene.
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4DAWNFILEViewer.cc,v 1.20 2006/06/29 21:16:54 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
// Satoshi TANAKA
|
||||
// DAWNFILE view - opens window, hard copy, etc.
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4FRClientServer.cc,v 1.6 2006/06/29 21:16:56 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
// Satoshi TANAKA, Wed Jul 3 14:14:29 JST 1996
|
||||
////////////////////////////////
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4FukuiRenderer.cc,v 1.9 2006/06/29 21:16:58 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Satoshi TANAKA
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4FukuiRendererSceneHandler.cc,v 1.14 2006/06/29 21:17:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Satoshi TANAKA, Fri Jun 28 11:34:24 JST 1996
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4FukuiRendererViewer.cc,v 1.11 2006/06/29 21:17:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Satoshi TANAKA, Fri Jun 28 12:09:11 JST 1996
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.$Id: History,v 1.126 2007/05/22 17:05:26 allison Exp $
|
||||
.$Id: History,v 1.127 2007/11/16 20:29:04 perl Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -20,6 +20,12 @@ committal in the CVS repository !
|
||||
History file for visualization/HepRep sub-category
|
||||
--------------------------------------------------
|
||||
|
||||
16 Nov 2007 Joseph Perl (vis-HepRep-V09-00-01)
|
||||
- Adjust geometry hierarchy in G4HepRepFileSceneHandler to accomodate
|
||||
parallel worlds. Where used to just have world at top of hierarchy,
|
||||
now have world or worlds as one level below top level of geometry.
|
||||
- Cleaned up G4HepRepSceneHandler (just removing inaccurate old comment).
|
||||
|
||||
22 May 2007 John Allison (vis-HepRep-V08-03-00)
|
||||
- Fixed memory leak in G4HepRepFile.
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
This G4 Graphics Driver creates a HepRep File suitable for viewing
|
||||
by the WIRED Event Display client. It requires no external packages.
|
||||
by the HepRApp, Wired4 or FRED Event Display clients.
|
||||
It requires no external packages.
|
||||
|
||||
The HepRep graphics format is further described at
|
||||
http://heprep.freehep.org
|
||||
http://www.slac.stanford.edu/~perl/heprep/
|
||||
|
||||
|
||||
Two different drivers are available for either HepRep1 or HepRep2.
|
||||
@@ -33,15 +34,15 @@ choose to make them visible from within the heprep browser).
|
||||
To force culling of invisible objects,
|
||||
set G44HEPREPFILE_CULL
|
||||
|
||||
View the file using the WIRED3 HepRep Browser, available from:
|
||||
http://www.slac.stanford.edu/BFROOT/www/Computing/Graphics/Wired/
|
||||
View the file using the HepRApp HepRep Browser, available from:
|
||||
http://www.slac.stanford.edu/~perl/HepRApp
|
||||
|
||||
WIRED can read xml files in zipped format as well as unzipped,
|
||||
HepRApp can read xml files in zipped format as well as unzipped,
|
||||
so you can save space by applying gzip to the xml file.
|
||||
This will reduce the file to about five percent of its original size.
|
||||
|
||||
Joseph Perl
|
||||
2 June 2005
|
||||
15 November 2007
|
||||
|
||||
|
||||
Driver: HepRepXML
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4HepRep.hh,v 1.17 2006/06/29 21:17:04 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
|
||||
/**
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4HepRepFile.hh,v 1.8 2006/06/29 21:17:06 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 5th April 2001
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4HepRepFileSceneHandler.hh,v 1.29 2006/06/29 21:17:08 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Joseph Perl 27th January 2002
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4HepRepFileViewer.hh,v 1.9 2006/06/29 21:17:10 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 5th April 2001
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4HepRepMessenger.hh,v 1.7 2006/06/29 21:17:14 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
#ifndef G4HepRepMessenger_HH
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4HepRepSceneHandler.hh,v 1.42 2006/11/06 09:22:26 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
|
||||
/**
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4HepRepViewer.hh,v 1.18 2006/06/29 21:17:18 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
|
||||
/**
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4HepRep.cc,v 1.22 2006/06/29 21:17:20 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
|
||||
/**
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4HepRepFile.cc,v 1.11 2007/05/22 17:05:26 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Joseph Perl 1 October 2001
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4HepRepFileSceneHandler.cc,v 1.64 2006/11/16 21:06:11 perl Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// $Id: G4HepRepFileSceneHandler.cc,v 1.65 2007/11/16 20:29:04 perl Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Joseph Perl 27th January 2002
|
||||
@@ -586,7 +586,6 @@ void G4HepRepFileSceneHandler::AddCompound (const G4VTrajectory& traj) {
|
||||
// Do not write out the Aux or Pos attribute. Aux does not conform to the HepRep rule
|
||||
// that each object can have only one instance of a given AttValue.
|
||||
// Both of these attributes are redundant to actual position information of the point.
|
||||
// New Wired can just tell the user the point position itself.
|
||||
if (strcmp(iAttVal->GetName(),"Aux-X")!=0 &&
|
||||
strcmp(iAttVal->GetName(),"Aux-Y")!=0 &&
|
||||
strcmp(iAttVal->GetName(),"Aux-Z")!=0 &&
|
||||
@@ -708,7 +707,6 @@ void G4HepRepFileSceneHandler::AddCompound (const G4VTrajectory& traj) {
|
||||
// Do not write out the Aux or Pos attribute. Aux does not conform to the HepRep rule
|
||||
// that each object can have only one instance of a given AttValue.
|
||||
// Both of these attributes are redundant to actual position information of the point.
|
||||
// New Wired can just tell the user the point position itself.
|
||||
if (strcmp(iAttVal->GetName(),"Aux-X")!=0 &&
|
||||
strcmp(iAttVal->GetName(),"Aux-Y")!=0 &&
|
||||
strcmp(iAttVal->GetName(),"Aux-Z")!=0 &&
|
||||
@@ -818,7 +816,6 @@ void G4HepRepFileSceneHandler::AddCompound (const G4VTrajectory& traj) {
|
||||
// Do not write out the Aux or Pos attribute. Aux does not conform to the HepRep rule
|
||||
// that each object can have only one instance of a given AttValue.
|
||||
// Both of these attributes are redundant to actual position information of the point.
|
||||
// New Wired can just tell the user the point position itself.
|
||||
if (strcmp(iAttVal->GetName(),"Aux-X")!=0 &&
|
||||
strcmp(iAttVal->GetName(),"Aux-Y")!=0 &&
|
||||
strcmp(iAttVal->GetName(),"Aux-Z")!=0 &&
|
||||
@@ -1391,42 +1388,45 @@ void G4HepRepFileSceneHandler::AddHepRepInstance(const char* primName,
|
||||
// replacing G4's top geometry level name "worldPhysical" with the
|
||||
// name "Detector Geometry".
|
||||
} else {
|
||||
//G4cout << "CurrentDepth" << currentDepth << G4endl;
|
||||
//G4cout << "currentName" << pCurrentPV->GetName() << G4endl;
|
||||
if (strcmp("Detector Geometry",hepRepXMLWriter->prevTypeName[0])!=0) {
|
||||
//G4cout << "Adding Det Geom type" << G4endl;
|
||||
hepRepXMLWriter->addType("Detector Geometry",0);
|
||||
hepRepXMLWriter->addInstance();
|
||||
}
|
||||
|
||||
// Re-insert any layers of the hierarchy that were removed by G4's culling process.
|
||||
// Don't bother checking if same type name as last instance.
|
||||
if(strcmp(hepRepXMLWriter->prevTypeName[currentDepth],pCurrentPV->GetName())!=0) {
|
||||
if(strcmp(hepRepXMLWriter->prevTypeName[currentDepth+1],pCurrentPV->GetName())!=0) {
|
||||
//G4cout << "Looking for mother of:" << pCurrentLV->GetName() << G4endl;
|
||||
typedef G4PhysicalVolumeModel::G4PhysicalVolumeNodeID PVNodeID;
|
||||
typedef std::vector<PVNodeID> PVPath;
|
||||
const PVPath& drawnPVPath = pPVModel->GetDrawnPVPath();
|
||||
PVPath::const_reverse_iterator ri = ++drawnPVPath.rbegin();
|
||||
G4int drawnMotherDepth = 0;
|
||||
G4int drawnMotherDepth;
|
||||
if (ri != drawnPVPath.rend()) {
|
||||
// This volume has a mother.
|
||||
drawnMotherDepth = ri->GetNonCulledDepth();
|
||||
//G4cout << "drawnMotherDepth" << drawnMotherDepth << G4endl;
|
||||
} else {
|
||||
// This volume has no mother. Must be a top level volume.
|
||||
drawnMotherDepth = -1;
|
||||
//G4cout << "Mother must be very top" << G4endl;
|
||||
}
|
||||
|
||||
while (drawnMotherDepth < (currentDepth-1)) {
|
||||
G4String culledParentName = "Culled parent of " + pCurrentPV->GetName();
|
||||
//G4cout << "Inserting culled layer " << culledParentName << " at depth:" << drawnMotherDepth+1 << G4endl;
|
||||
hepRepXMLWriter->addType(culledParentName, drawnMotherDepth+1);
|
||||
//G4cout << "Inserting culled layer " << culledParentName << " at depth:" << drawnMotherDepth+2 << G4endl;
|
||||
hepRepXMLWriter->addType(culledParentName, drawnMotherDepth+2);
|
||||
hepRepXMLWriter->addInstance();
|
||||
drawnMotherDepth ++;
|
||||
}
|
||||
}
|
||||
|
||||
if (currentDepth!=0) {
|
||||
// Add the HepRepType for the current volume.
|
||||
hepRepXMLWriter->addType(pCurrentPV->GetName(),currentDepth);
|
||||
hepRepXMLWriter->addInstance();
|
||||
}
|
||||
// Add the HepRepType for the current volume.
|
||||
hepRepXMLWriter->addType(pCurrentPV->GetName(),currentDepth+1);
|
||||
hepRepXMLWriter->addInstance();
|
||||
|
||||
if (fpVisAttribs && (fpVisAttribs->IsVisible()==0) && cullInvisibleObjects)
|
||||
return;
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4HepRepFileViewer.cc,v 1.15 2006/06/29 21:17:26 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
|
||||
#include "G4HepRepFileViewer.hh"
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4HepRepMessenger.cc,v 1.10 2006/06/29 21:17:30 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
#include "G4HepRepMessenger.hh"
|
||||
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4HepRepSceneHandler.cc,v 1.100 2006/11/16 12:17:54 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// $Id: G4HepRepSceneHandler.cc,v 1.101 2007/11/16 20:29:04 perl Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
|
||||
/**
|
||||
@@ -1241,10 +1241,7 @@ void G4HepRepSceneHandler::addAttVals(HepRepAttribute* attribute, const map<G4St
|
||||
if (attValues == NULL) return;
|
||||
|
||||
// Copy the instance's G4AttValues to HepRepAttValues.
|
||||
for (vector<G4AttValue>::iterator attValIterator = attValues->begin(); attValIterator != attValues->end(); attValIterator++) {
|
||||
// Use GetDesc rather than GetName once WIRED can handle names with spaces in them.
|
||||
//attribute->addAttValue(iAttDef->second.GetDesc(), iAttVal->GetValue());
|
||||
|
||||
for (vector<G4AttValue>::iterator attValIterator = attValues->begin(); attValIterator != attValues->end(); attValIterator++) {
|
||||
G4String name = attValIterator->GetName();
|
||||
|
||||
HepRepPoint* point = dynamic_cast<HepRepPoint*>(attribute);
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4HepRepViewer.cc,v 1.26 2006/06/29 21:17:34 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: History,v 1.413 2007/06/14 15:26:57 allison Exp $
|
||||
$Id: History,v 1.418 2007/11/19 19:56:26 perl Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -24,6 +24,22 @@ committal in the CVS repository !
|
||||
History file for visualization category
|
||||
---------------------------------------
|
||||
|
||||
19th November 2007 Joseph Perl (vis-V09-00-03)
|
||||
- visman-V09-00-02: Replace references to Wired3 in command guidance
|
||||
- vis-HepRep-V09-00-01: Adjust geometry hierarchy for parallel worlds.
|
||||
- opengl-V09-00-04: Added GEANT4_QT_DEBUG flag to more places
|
||||
|
||||
13th November 2007 John Allison (vis-V09-00-02)
|
||||
- Removed OpenGL Qt files from tag. File are still at head - need fixing.
|
||||
|
||||
10th November 2007 John Allison (vis-V09-00-01)
|
||||
- opengl-V09-00-01: Minor improvements in design and messaging.
|
||||
- modeling-V09-00-00: Minor improvements in messaging.
|
||||
- visman-V09-00-01:Minor improvement in messaging.
|
||||
|
||||
10th July 2007 John Allison (vis-V09-00-00)
|
||||
- visman-V09-00-00: Remove redundant method declarations and minor tidies.
|
||||
|
||||
14th June 2007 John Allison (vis-V08-03-07)
|
||||
- raytracer-V08-03-01: Fixed memory leak in G4RayTracer.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: History,v 1.93 2007/05/25 15:41:38 allison Exp $
|
||||
$Id: History,v 1.103 2007/11/19 19:45:39 perl Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -20,12 +20,63 @@ committal in the CVS repository !
|
||||
History file for visualization/OpenGL
|
||||
-------------------------------------
|
||||
|
||||
19th November 2007 Joseph Perl (for Laurent Garnier) (opengl-V09-00-04)
|
||||
- Added GEANT4_QT_DEBUG flag to more places
|
||||
|
||||
15th November 2007 John Allison (opengl-V09-00-03)
|
||||
- Re-introduced Qt files, now properly protected by cpp flags.
|
||||
- cpp flags also added to some other files not previously properly protected.
|
||||
|
||||
15 Nov 2007, Laurent Garnier
|
||||
- G4UIQt,G4Qt : Adding a GEANT4_QT_DEBUG flag to hide all debug messages
|
||||
- G4UIQt,G4Qt : Compilation improvements for Qt3
|
||||
- G4UIQt,G4Qt : Minors corrections on G4UIQt helpWidget
|
||||
|
||||
14 Nov 2007, Laurent Garnier
|
||||
- G4OpenGLStoredQtViewer.cc : Correction of a bug with mouse move event in
|
||||
Qt4
|
||||
- G4OpenGLQtExportDialog_moc.cc, G4OpenGLQtViewer.cc, G4OpenGLQtViewer_moc.cc :
|
||||
Adding protection for Qt version between 4.0 and 4.2
|
||||
|
||||
13th November 2007 John Allison (opengl-V09-00-02)
|
||||
- Removed Qt files from tag. File are still at head - need fixing.
|
||||
|
||||
13 Nov 2007, Laurent Garnier
|
||||
- G4UIQt,G4Qt : Moving all moc in one big file interface/G4UIQT_moc.cc,
|
||||
including Qt3 and Qt4 moc support
|
||||
|
||||
10th November 2007 John Allison (opengl-V09-00-01)
|
||||
- Moved WinSize_x, y to base class G4OpenGLViewer.
|
||||
- Minor improvement in guidance for /vis/ogl/printEPS.
|
||||
|
||||
09 Nov 2007, Laurent Garnier
|
||||
- G4UIQt,G4Qt : Change all include directive to be compatible with Qt3
|
||||
|
||||
08 Nov 2007, Laurent Garnier
|
||||
- moc_G4OpenGLQtExportDialog.cc move in G4OpenGLQtExportDialog_moc.cc
|
||||
- moc_G4OpenGLQtViewer.cc move to G4OpenGLQtViewer_moc.cc
|
||||
|
||||
27 Sept 2007, Laurent Garnier
|
||||
- Adding sur files for G4UIQt driver :
|
||||
- G4OpenGLImmediateQt.cc
|
||||
- G4OpenGLImmediateQtViewer.cc
|
||||
- G4OpenGLQtExportDialog.cc
|
||||
- G4OpenGLQtViewer.cc
|
||||
- G4OpenGLStoredQt.cc
|
||||
- G4OpenGLStoredQtViewer.cc
|
||||
- moc_G4OpenGLQtExportDialog.cc
|
||||
- moc_G4OpenGLQtViewer.cc
|
||||
|
||||
28th September 2007 lgarnier
|
||||
- first import of G4UI Qt files : Do not try to compil them
|
||||
|
||||
21st August 2007 John Allison (opengl-V09-00-00)
|
||||
- Removed redundant G4OpenGLXViewerMessenger.
|
||||
|
||||
25th May 2007 John Allison (opengl-V08-03-03)
|
||||
- G4OpenGLSceneHandler and G4OpenGLXViewerMessenger:
|
||||
Fixed gcc-4.1.2 compiler warnings.
|
||||
|
||||
G4OpenGLXViewer: Trapped glXMakeCurrent in Initialise function.
|
||||
|
||||
25th May 2007 John Allison (opengl-V08-03-02)
|
||||
- G4OpenGLXViewer: Trapped glXMakeCurrent in Initialise function.
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user