Import Geant4 11.3.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2024-06-28 13:08:51 +02:00
parent f7b23877ed
commit e58e650b32
5232 changed files with 239416 additions and 244360 deletions
@@ -127,14 +127,20 @@ private Q_SLOTS :
private:
#if QT_VERSION < 0x060000
static G4OpenInventorQtExaminerViewer* viewer;
QString* fName;
#else
QString fName;
#endif
#if QT_VERSION < 0x060000
int OWwidth, OWheight;
void (*escapeCallback)();
void* examinerObject;
#endif
SbBool lshiftdown, rshiftdown, lctrldown, rctrldown;
QFont* font;
@@ -177,12 +183,16 @@ private:
QDialog* AuxWindow;
G4UIQt* uiQt;
#if QT_VERSION < 0x060000
QWidget* viewerParent;
QWidget* viewerParent2;
int uiQtTabIndex;
#endif
int processSoEventCount;
#if QT_VERSION < 0x060000
G4String empty = "";
#endif
public:
@@ -194,12 +204,14 @@ public:
~G4OpenInventorQtExaminerViewer();
G4UIQt* GetUIQt() {return uiQt;}
template <class T> void parseString(T &t, const std::string &s, bool &error);
#if QT_VERSION < 0x060000
G4UIQt* GetUIQt() {return uiQt;}
// In case the viewer is embedded and then detached:
void setOrigWindowSize(int w, int h) { OWwidth = w; OWheight = h; }
#endif
// Menubar information needed by G4OpenInventorQtViewer
// for common menu items:
@@ -210,16 +222,21 @@ public:
void setExternalQtApp() { externalQtApp = TRUE; }
#if QT_VERSION < 0x060000
// Needed?
std::string saveScenegraphFileName;
std::string saveRefCoordsFileName;
void addEscapeCallback(void (*cb)());
#endif
bool abbrOutputFlag;
bool pickRefPathFlag;
bool viewingBeforePickRef;
#if 0x060000 <= QT_VERSION
void addInTab();
#endif
protected:
// FWJ Constructor with build flag added (as in parent)
@@ -234,7 +251,11 @@ protected:
void construct(const SbBool build);
void buildWidget(QWidget* parent);
#if QT_VERSION < 0x060000
virtual void afterRealizeHook();
#else
void setupSceneGraph();
#endif
HookEventProcState* hookBeamOn;
friend class HookEventProcState;
@@ -317,7 +338,11 @@ protected:
// For storing the view point
struct viewPtData {
#if QT_VERSION < 0x060000
char* viewPtName{nullptr};
#else
std::string viewPtName;
#endif
int viewportMapping{0};
SbVec3f position{0.0, 0.0, 0.0} ;
SbRotation orientation{};
@@ -385,7 +410,11 @@ protected:
int prevRefIdx;
float distance;
State currentState, prevState, beforePausing;
#if QT_VERSION < 0x060000
char* curViewPtName;
#else
std::string curViewPtName;
#endif
int step;
SbVec3f prevPt;
@@ -44,6 +44,9 @@ class QMenuBar;
class QFont;
class QAction;
#if 0x060000 <= QT_VERSION
class G4OpenInventorQtDestroyCallback;
#endif
class G4OpenInventorQtViewer: public QObject,
public G4OpenInventorViewer {
@@ -112,6 +115,27 @@ protected:
//SoQtExaminerViewer* fViewer;
G4OpenInventorQtExaminerViewer* fViewer;
#if 0x060000 <= QT_VERSION
G4OpenInventorQtDestroyCallback* fDestroyCallback;
#endif
};
//G.Barrand: I don't put the below class within "#if 0x060000 <= QT_VERSION"
// since Qt6/moc does not handle it correctly! (With it, Qt6/moc
// will anyway NOT handle this class. It looks to be a known Qt problem).
//#if 0x060000 <= QT_VERSION
class G4OpenInventorQtDestroyCallback : public QObject {
Q_OBJECT
public:
G4OpenInventorQtDestroyCallback(G4OpenInventorQtViewer* a_viewer):fViewer(a_viewer) {}
virtual ~G4OpenInventorQtDestroyCallback() = default;
public slots:
void execute(){
delete fViewer;
}
private:
G4OpenInventorQtViewer* fViewer;
};
//#endif
#endif