78{
79
80#if QT_VERSION < 0x060000
81 QWidget* parent = SoQt::getTopLevelWidget();
82#else
83 QWidget* parent = new QWidget;
84 QObject::connect(parent,SIGNAL(destroyed()),fDestroyCallback,SLOT(execute()));
85#endif
86
87
88
89
90
92
93#if 0x060000 <= QT_VERSION
95#endif
96
97
98
99
100
101
103 auto uiQt = dynamic_cast<G4UIQt*>(UI->GetG4UIWindow());
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122#if QT_VERSION < 0x060000
123 int width =
fVP.GetWindowSizeHintX();
124 int height =
fVP.GetWindowSizeHintY();
125
126
127
128
129
130
131
132
133
134
135
136 fViewer->setSize(SbVec2s(width, height));
137 fViewer->setOrigWindowSize(width, height);
138#else
139
140
141#endif
142
143
144
145
146 QMenu* filemenu =
fViewer->getFileMenu();
147 QMenu* etcmenu =
fViewer->getEtcMenu();
148 QFont* font =
fViewer->getFont();
149
150
151
152 FileWritePS = new QAction("Write PostScript (gl2ps)", this);
153 FileWritePS->setFont(*font);
154 connect(FileWritePS, SIGNAL(triggered()), this,
155 SLOT(FileWritePSCB()));
156 filemenu->addAction(FileWritePS);
157
158 FileWritePDF = new QAction("Write PDF (gl2ps)", this);
159 FileWritePDF->setFont(*font);
160 connect(FileWritePDF, SIGNAL(triggered()), this,
161 SLOT(FileWritePDFCB()));
162 filemenu->addAction(FileWritePDF);
163
164 FileWriteIV = new QAction("Write IV", this);
165 FileWriteIV->setFont(*font);
166 connect(FileWriteIV, SIGNAL(triggered()), this,
167 SLOT(FileWriteIVCB()));
168 filemenu->addAction(FileWriteIV);
169
170 FileEscape = new QAction("Escape", this);
171 FileEscape->setFont(*font);
172 connect(FileEscape, SIGNAL(triggered()), this,
173 SLOT(FileEscapeCB()));
174 filemenu->addAction(FileEscape);
175
176
177
180
181
182
183
184
185
186
187 EtcEraseDetector = new QAction("Erase detector", this);
188 EtcEraseDetector->setFont(*font);
189 connect(EtcEraseDetector, SIGNAL(triggered()), this,
190 SLOT(EtcEraseDetectorCB()));
191 etcmenu->addAction(EtcEraseDetector);
192
193 EtcEraseEvent = new QAction("Erase event", this);
194 EtcEraseEvent->setFont(*font);
195 connect(EtcEraseEvent, SIGNAL(triggered()), this,
196 SLOT(EtcEraseEventCB()));
197 etcmenu->addAction(EtcEraseEvent);
198
199 EtcSetSolid = new QAction("Set solid", this);
200 EtcSetSolid->setFont(*font);
201 connect(EtcSetSolid, SIGNAL(triggered()), this, SLOT(EtcSetSolidCB()));
202 etcmenu->addAction(EtcSetSolid);
203
204 EtcSetReducedWireframe = new QAction("Set (G4) reduced wireframe", this);
205 EtcSetReducedWireframe->setFont(*font);
206 connect(EtcSetReducedWireframe, SIGNAL(triggered()), this,
207 SLOT(EtcSetReducedWireframeCB()));
208 etcmenu->addAction(EtcSetReducedWireframe);
209
210 EtcSetFullWireframe = new QAction("Set full wireframe", this);
211 EtcSetFullWireframe->setFont(*font);
212 connect(EtcSetFullWireframe, SIGNAL(triggered()), this,
213 SLOT(EtcSetFullWireframeCB()));
214 etcmenu->addAction(EtcSetFullWireframe);
215
216 EtcVisibMInvisibD = new QAction("Visible mothers + invisible daughters",
217 this);
218 EtcVisibMInvisibD->setFont(*font);
219 connect(EtcVisibMInvisibD, SIGNAL(triggered()), this,
220 SLOT(EtcVisibMInvisibDCB()));
221 etcmenu->addAction(EtcVisibMInvisibD);
222
223 EtcVisibMVisibD = new QAction("Visible mothers + visible daughters", this);
224 EtcVisibMVisibD->setFont(*font);
225 connect(EtcVisibMVisibD, SIGNAL(triggered()), this,
226 SLOT(EtcVisibMVisibDCB()));
227 etcmenu->addAction(EtcVisibMVisibD);
228
229 EtcUpdateScene = new QAction("Update scene", this);
230 EtcUpdateScene->setFont(*font);
231 connect(EtcUpdateScene, SIGNAL(triggered()), this,
232 SLOT(EtcUpdateSceneCB()));
233 etcmenu->addAction(EtcUpdateScene);
234
235 EtcSceneGraphStats = new QAction("Scene graph stats", this);
236 EtcSceneGraphStats->setFont(*font);
237 connect(EtcSceneGraphStats, SIGNAL(triggered()), this,
238 SLOT(EtcSceneGraphStatsCB()));
239 etcmenu->addAction(EtcSceneGraphStats);
240
241
242
243 const SbViewportRegion& vpRegion =
fViewer->getViewportRegion();
246
247
248
249
250
251
252
253
254
256 fViewer->setTransparencyType(SoGLRenderAction::SORTED_OBJECT_ADD);
259
261#if QT_VERSION < 0x060000
263
264
265
266
267 QWidget* mainWin = SoQt::getTopLevelWidget();
268
269
270
271
272
273 SoQt::show(mainWin);
275
276
278#else
280#endif
281}
SoSelection * fSoSelection
G4VInteractorManager * fInteractorManager
Geant4_SoGL2PSAction * fGL2PSAction
static G4UImanager * GetUIpointer()