Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4ToolsSGQtGLESViewer Class Reference

#include <G4ToolsSGQtGLESViewer.hh>

Inheritance diagram for G4ToolsSGQtGLESViewer:

Public Member Functions

 G4ToolsSGQtGLESViewer (toolx::Qt::session &a_session, G4ToolsSGSceneHandler &a_scene_handler, const G4String &a_name)
virtual ~G4ToolsSGQtGLESViewer ()
virtual void Initialise ()
Public Member Functions inherited from G4ToolsSGViewer< toolx::Qt::session, toolx::Qt::sg_viewer >
virtual void key_press (const tools::sg::key_down_event &)
virtual void key_release (const tools::sg::key_up_event &)
virtual void mouse_press (const tools::sg::mouse_down_event &a_event)
virtual void mouse_release (const tools::sg::mouse_up_event &)
virtual void mouse_move (const tools::sg::mouse_move_event &a_event)
virtual void wheel_rotate (const tools::sg::wheel_rotate_event &a_event)
 G4ToolsSGViewer (toolx::Qt::session &a_session, G4ToolsSGSceneHandler &a_scene_handler, const G4String &a_name)
virtual ~G4ToolsSGViewer ()
virtual void SetView ()
virtual void ClearView ()
virtual void DrawView ()
virtual void ShowView ()
virtual void FinishView ()
G4bool GetWindowSize (unsigned int &a_w, unsigned int &a_h)
G4bool GetRenderAreaSize (unsigned int &a_w, unsigned int &a_h)
virtual void EmitWindowRender ()
Public Member Functions inherited from G4VViewer
 G4VViewer (G4VSceneHandler &, G4int id, const G4String &name="")
virtual ~G4VViewer ()
virtual void ResetView ()
void RefreshView ()
virtual G4bool ReadyToDraw ()
std::vector< G4ThreeVectorComputeFlyThrough (G4Vector3D *)
virtual void DoneWithMasterThread ()
virtual void MovingToVisSubThread ()
virtual void SwitchToVisSubThread ()
virtual void DoneWithVisSubThread ()
virtual void MovingToMasterThread ()
virtual void SwitchToMasterThread ()
void InsertModelInSceneTree (G4VModel *)
const G4SceneTreeItemGetSceneTree ()
G4SceneTreeItemAccessSceneTree ()
void UpdateGUISceneTree ()
void UpdateGUIControlWidgets ()
void UpdateGUIDrawingStyle ()
void UpdateGUIProjectionStyle ()
void UpdateGUITransparencySlider ()
const G4StringGetName () const
const G4StringGetShortName () const
void SetName (const G4String &)
G4int GetViewId () const
G4VSceneHandlerGetSceneHandler () const
const G4ViewParametersGetViewParameters () const
const G4ViewParametersGetDefaultViewParameters () const
G4double GetKernelVisitElapsedTimeSeconds () const
virtual const std::vector< G4ModelingParameters::VisAttributesModifier > * GetPrivateVisAttributesModifiers () const
void SetViewParameters (const G4ViewParameters &vp)
void SetDefaultViewParameters (const G4ViewParameters &vp)
const G4VisAttributesGetApplicableVisAttributes (const G4VisAttributes *) const
void SetNeedKernelVisit (G4bool need)
void NeedKernelVisit ()
void ProcessView ()
void ProcessTransients ()
void ZoomFromMouseWheel (G4double delta, G4bool shift=false, G4double xPos=0, G4double yPos=0)
Public Member Functions inherited from G4ToolsSG_viewer
 G4ToolsSG_viewer ()
virtual ~G4ToolsSG_viewer ()

Protected Member Functions

 G4ToolsSGQtGLESViewer (const G4ToolsSGQtGLESViewer &a_from)
G4ToolsSGQtGLESVieweroperator= (const G4ToolsSGQtGLESViewer &)
Protected Member Functions inherited from G4ToolsSGViewer< toolx::Qt::session, toolx::Qt::sg_viewer >
 G4ToolsSGViewer (const G4ToolsSGViewer &a_from)
G4ToolsSGVieweroperator= (const G4ToolsSGViewer &)
void KernelVisitDecision ()
G4bool CompareForKernelVisit (G4ViewParameters &vp)
G4bool CompareForTransientsRedraw (G4ViewParameters &vp)
void CreateSG (tools::sg::base_camera *a_camera, const G4Vector3D &a_light_dir)
void Export (const G4String &a_format, const G4String &a_file, G4bool a_do_transparency)
G4double GetSceneNearWidth ()
Protected Member Functions inherited from G4VViewer
void SetTouchable (const std::vector< G4PhysicalVolumeModel::G4PhysicalVolumeNodeID > &fullPath)
void TouchableSetVisibility (const std::vector< G4PhysicalVolumeModel::G4PhysicalVolumeNodeID > &fullPath, G4bool visibility)
void TouchableSetColour (const std::vector< G4PhysicalVolumeModel::G4PhysicalVolumeNodeID > &fullPath, const G4Colour &)
Protected Member Functions inherited from G4ToolsSG_viewer
 G4ToolsSG_viewer (const G4ToolsSG_viewer &)
G4ToolsSG_vieweroperator= (const G4ToolsSG_viewer &)

Protected Attributes

G4UIQtfUIQt = nullptr
QWidget * fSGQWidget
G4ToolsSGQtDestroyCallbackfDestroyCallback
Protected Attributes inherited from G4ToolsSGViewer< toolx::Qt::session, toolx::Qt::sg_viewer >
toolx::Qt::session & fSGSession
G4ToolsSGSceneHandlerfSGSceneHandler
toolx::Qt::sg_viewer * fSGViewer
G4ViewParameters fLastVP
G4bool fMousePressed
G4double fMousePressedX
G4double fMousePressedY
tools::sg::zb_manager f_zb_mgr
tools::sg::gl2ps_manager f_gl2ps_mgr
Protected Attributes inherited from G4VViewer
G4VSceneHandlerfSceneHandler
G4int fViewId
G4String fName
G4String fShortName
G4ViewParameters fVP
G4ViewParameters fDefaultVP
G4double fKernelVisitElapsedTimeSeconds = 999.
G4SceneTreeItem fSceneTree
G4bool fNeedKernelVisit
G4bool fTransientsNeedRedrawing

Additional Inherited Members

Public Attributes inherited from G4VViewer
const G4int fMaxAllTouchables = 10000
G4bool fCurtailDescent = false

Detailed Description

Definition at line 58 of file G4ToolsSGQtGLESViewer.hh.

Constructor & Destructor Documentation

◆ G4ToolsSGQtGLESViewer() [1/2]

G4ToolsSGQtGLESViewer::G4ToolsSGQtGLESViewer ( toolx::Qt::session & a_session,
G4ToolsSGSceneHandler & a_scene_handler,
const G4String & a_name )
inline

Definition at line 61 of file G4ToolsSGQtGLESViewer.hh.

62 :parent(a_session,a_scene_handler,a_name)
63 ,fSGQWidget(nullptr)
65 {
66 fDestroyCallback = new G4ToolsSGQtDestroyCallback(this);
67 }
G4ToolsSGQtDestroyCallback * fDestroyCallback

Referenced by G4ToolsSGQtGLESViewer(), and operator=().

◆ ~G4ToolsSGQtGLESViewer()

virtual G4ToolsSGQtGLESViewer::~G4ToolsSGQtGLESViewer ( )
inlinevirtual

Definition at line 68 of file G4ToolsSGQtGLESViewer.hh.

68 {
69 delete fDestroyCallback; //it will remove the below signal/slot connection.
70 }

◆ G4ToolsSGQtGLESViewer() [2/2]

G4ToolsSGQtGLESViewer::G4ToolsSGQtGLESViewer ( const G4ToolsSGQtGLESViewer & a_from)
inlineprotected

Definition at line 72 of file G4ToolsSGQtGLESViewer.hh.

72:parent(a_from){}

Member Function Documentation

◆ Initialise()

virtual void G4ToolsSGQtGLESViewer::Initialise ( )
inlinevirtual

Reimplemented from G4ToolsSGViewer< toolx::Qt::session, toolx::Qt::sg_viewer >.

Definition at line 75 of file G4ToolsSGQtGLESViewer.hh.

75 {
76 if(fSGQWidget) return; //done.
78 if(!fSGViewer) {
79 G4cerr << "G4ToolsSGQtGLESViewer::Initialise: ERROR: G4ToolsSGQtGLESViewer has no toolx::Qt::sg_viewer." << G4endl;
80 return;
81 }
82 fSGQWidget = fSGViewer->shell();
83 if (!fSGQWidget) {
84 G4cerr << "G4ToolsSGQtGLESViewer::Initialise: ERROR: toolx::Qt::sg_viewer has no QWidget shell." << G4endl;
85 return;
86 }
87
88 {G4UImanager* ui = G4UImanager::GetUIpointer();
89 G4UIsession* session = ui->GetG4UIWindow();
90 fUIQt = session? dynamic_cast<G4UIQt*>(session) :nullptr;
91 if(fUIQt) {
92 G4Qt* interactorManager = G4Qt::getInstance ();
93 if (!interactorManager->IsExternalApp()) {
94 fSGViewer->set_own_shell(false);
95 fUIQt->AddTabWidget(fSGQWidget,QString(GetName()));
96 QObject::connect(fSGQWidget,SIGNAL(destroyed()),fDestroyCallback,SLOT(execute()));
97
98 QMainWindow* main_window = fUIQt->GetMainWindow();
99 if(main_window) {
100 main_window->show();
101 interactorManager->FlushAndWaitExecution();
102 }
103 }
104 }}
105
106 fSGViewer->enable_keyboard_focus();
107 }
G4GLOB_DLL std::ostream G4cerr
#define G4endl
Definition G4ios.hh:67
static G4Qt * getInstance()
Definition G4Qt.cc:61
bool IsExternalApp()
Definition G4Qt.cc:210
void FlushAndWaitExecution() override
Definition G4Qt.cc:201
G4UIsession * GetG4UIWindow() const
static G4UImanager * GetUIpointer()
const G4String & GetName() const

◆ operator=()

G4ToolsSGQtGLESViewer & G4ToolsSGQtGLESViewer::operator= ( const G4ToolsSGQtGLESViewer & )
inlineprotected

Definition at line 73 of file G4ToolsSGQtGLESViewer.hh.

73{return *this;}

Member Data Documentation

◆ fDestroyCallback

G4ToolsSGQtDestroyCallback* G4ToolsSGQtGLESViewer::fDestroyCallback
protected

◆ fSGQWidget

QWidget* G4ToolsSGQtGLESViewer::fSGQWidget
protected

Definition at line 111 of file G4ToolsSGQtGLESViewer.hh.

Referenced by G4ToolsSGQtGLESViewer(), and Initialise().

◆ fUIQt

G4UIQt* G4ToolsSGQtGLESViewer::fUIQt = nullptr
protected

Definition at line 110 of file G4ToolsSGQtGLESViewer.hh.

Referenced by Initialise().


The documentation for this class was generated from the following file: