80#if QT_VERSION < 0x060000
81 QWidget* parent = SoQt::getTopLevelWidget();
83 QWidget* parent =
new QWidget;
84 QObject::connect(parent,SIGNAL(destroyed()),fDestroyCallback,SLOT(execute()));
93#if 0x060000 <= QT_VERSION
103 auto uiQt =
dynamic_cast<G4UIQt*
>(UI->GetG4UIWindow());
122#if QT_VERSION < 0x060000
123 int width =
fVP.GetWindowSizeHintX();
124 int height =
fVP.GetWindowSizeHintY();
136 fViewer->setSize(SbVec2s(width, height));
137 fViewer->setOrigWindowSize(width, height);
146 QMenu* filemenu =
fViewer->getFileMenu();
147 QMenu* etcmenu =
fViewer->getEtcMenu();
148 QFont* font =
fViewer->getFont();
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);
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);
164 FileWriteIV =
new QAction(
"Write IV",
this);
165 FileWriteIV->setFont(*font);
166 connect(FileWriteIV, SIGNAL(triggered()),
this,
167 SLOT(FileWriteIVCB()));
168 filemenu->addAction(FileWriteIV);
170 FileEscape =
new QAction(
"Escape",
this);
171 FileEscape->setFont(*font);
172 connect(FileEscape, SIGNAL(triggered()),
this,
173 SLOT(FileEscapeCB()));
174 filemenu->addAction(FileEscape);
187 EtcEraseDetector =
new QAction(
"Erase detector",
this);
188 EtcEraseDetector->setFont(*font);
189 connect(EtcEraseDetector, SIGNAL(triggered()),
this,
190 SLOT(EtcEraseDetectorCB()));
191 etcmenu->addAction(EtcEraseDetector);
193 EtcEraseEvent =
new QAction(
"Erase event",
this);
194 EtcEraseEvent->setFont(*font);
195 connect(EtcEraseEvent, SIGNAL(triggered()),
this,
196 SLOT(EtcEraseEventCB()));
197 etcmenu->addAction(EtcEraseEvent);
199 EtcSetSolid =
new QAction(
"Set solid",
this);
200 EtcSetSolid->setFont(*font);
201 connect(EtcSetSolid, SIGNAL(triggered()),
this, SLOT(EtcSetSolidCB()));
202 etcmenu->addAction(EtcSetSolid);
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);
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);
216 EtcVisibMInvisibD =
new QAction(
"Visible mothers + invisible daughters",
218 EtcVisibMInvisibD->setFont(*font);
219 connect(EtcVisibMInvisibD, SIGNAL(triggered()),
this,
220 SLOT(EtcVisibMInvisibDCB()));
221 etcmenu->addAction(EtcVisibMInvisibD);
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);
229 EtcUpdateScene =
new QAction(
"Update scene",
this);
230 EtcUpdateScene->setFont(*font);
231 connect(EtcUpdateScene, SIGNAL(triggered()),
this,
232 SLOT(EtcUpdateSceneCB()));
233 etcmenu->addAction(EtcUpdateScene);
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);
243 const SbViewportRegion& vpRegion =
fViewer->getViewportRegion();
256 fViewer->setTransparencyType(SoGLRenderAction::SORTED_OBJECT_ADD);
261#if QT_VERSION < 0x060000
267 QWidget* mainWin = SoQt::getTopLevelWidget();