Changeset 1240 for trunk/source
- Timestamp:
- Mar 8, 2010, 5:36:15 PM (14 years ago)
- Location:
- trunk/source/visualization/OpenGL
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/visualization/OpenGL/History
r1238 r1240 1 $Id: History,v 1.16 2 2010/01/06 15:05:29 lgarnierExp $1 $Id: History,v 1.163 2010/01/28 09:19:04 gcosmo Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 19 19 3rd March 2010 Laurent Garnier 20 20 - G4OpenGLViewer : Add protection against null pointer scene 21 22 27th January 2010 Gabriele Cosmo 23 - Fixed compilation warnings on G4OpenGLQtViewer and corrected compilation 24 error when using Qt-3. 21 25 22 26 6th January 2010 Laurent Garnier (needs interfaces-V09-02-07 + laurent-QtUI_with_tabs_v1) -
trunk/source/visualization/OpenGL/include/G4OpenGLImmediateQtViewer.hh
r1228 r1240 63 63 64 64 protected: 65 void showEvent(QShowEvent * event ); 65 66 void wheelEvent(QWheelEvent *event); 66 67 void mousePressEvent(QMouseEvent *event); -
trunk/source/visualization/OpenGL/include/G4OpenGLStoredQtViewer.hh
r1235 r1240 64 64 65 65 protected: 66 void showEvent(QShowEvent * event ); 66 67 void wheelEvent(QWheelEvent *event); 67 68 void mousePressEvent(QMouseEvent *event); -
trunk/source/visualization/OpenGL/src/G4OpenGLImmediateQtViewer.cc
r1235 r1240 150 150 NeedKernelVisit (); 151 151 ProcessView (); 152 glFlush();152 FinishView(); 153 153 #ifdef G4DEBUG_VIS_OGL 154 154 printf("G4OpenGLImmediateQtViewer::ComputeView First ProcessView ok\n"); … … 166 166 167 167 #ifdef G4DEBUG_VIS_OGL 168 printf("G4OpenGLImmediateQtViewer::ComputeView %d %d ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ \n",getWinWidth(), getWinHeight());168 printf("G4OpenGLImmediateQtViewer::ComputeView %d %d hasTo:%d^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ \n",getWinWidth(), getWinHeight(),fHasToRepaint); 169 169 #endif 170 170 fHasToRepaint = true; … … 262 262 } 263 263 264 void G4OpenGLImmediateQtViewer::showEvent (QShowEvent * event) 265 { 266 fHasToRepaint = true; 267 } 268 269 264 270 /** 265 271 * This function was build in order to make a zoom on double clic event. … … 296 302 } 297 303 #ifdef G4DEBUG_VIS_OGL 298 printf("\n\nG4OpenGLImmediateQtViewer::paintEvent ^^^^^^^^^ \n");304 printf("\n\nG4OpenGLImmediateQtViewer::paintEvent ^^^^^^^^^ %d\n",fHasToRepaint); 299 305 #endif 300 306 } … … 307 313 #endif 308 314 updateGL(); 315 repaint(); 309 316 #ifdef G4DEBUG_VIS_OGL 310 317 printf("\n\nG4OpenGLImmediateQtViewer::updateQWidget ^^^^^^^^^\n"); … … 322 329 printf("\n\nG4OpenGLImmediateQtViewer::ShowView VVVV\n"); 323 330 #endif 331 fHasToRepaint = true; 324 332 #if QT_VERSION < 0x040000 325 333 setActiveWindow(); -
trunk/source/visualization/OpenGL/src/G4OpenGLQtViewer.cc
r1233 r1240 25 25 // 26 26 // 27 // $Id: G4OpenGLQtViewer.cc,v 1.4 6 2010/01/06 15:05:29 lgarnierExp $27 // $Id: G4OpenGLQtViewer.cc,v 1.47 2010/01/27 15:49:22 gcosmo Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 1436 1436 void G4OpenGLQtViewer::FinishView() 1437 1437 { 1438 #ifdef G4DEBUG_VIS_OGL 1439 printf("G4OpenGLQtViewer::FinishView() flush \n"); 1440 #endif 1438 1441 glFlush (); 1439 1442 … … 1578 1581 } 1579 1582 fVP.IncrementPan(-dx*coefTrans,dy*coefTrans,dz*coefDepth); 1580 emit moveX(- dx*coefTrans);1581 emit moveY( dy*coefTrans);1582 emit moveZ( dz*coefTrans);1583 emit moveX(-static_cast<int>(dx*coefTrans)); 1584 emit moveY(static_cast<int>(dy*coefTrans)); 1585 emit moveZ(static_cast<int>(dz*coefTrans)); 1583 1586 1584 1587 updateQWidget(); … … 1603 1606 if( dx != 0) { 1604 1607 rotateScene(dx,0,fDeltaRotation); 1605 emit rotateTheta( dx);1608 emit rotateTheta(static_cast<int>(dx)); 1606 1609 } 1607 1610 if( dy != 0) { 1608 1611 rotateScene(0,dy,fDeltaRotation); 1609 emit rotatePhi( dy);1612 emit rotatePhi(static_cast<int>(dy)); 1610 1613 } 1611 1614 updateQWidget(); … … 1626 1629 1627 1630 rotateScene(dx,dy,fDeltaRotation); 1628 emit rotateTheta( dx);1629 emit rotatePhi( dy);1631 emit rotateTheta(static_cast<int>(dx)); 1632 emit rotatePhi(static_cast<int>(dy)); 1630 1633 updateQWidget(); 1631 1634 … … 1689 1692 } 1690 1693 */ 1691 printer.setOutputFileName( aFilename);1694 printer.setOutputFileName(QString(aFilename.c_str())); 1692 1695 // printer.setFullPage ( true); 1693 1696 QPainter paint(&printer); … … 2657 2660 // launch Qt if not 2658 2661 G4Qt* interactorManager = G4Qt::getInstance (); 2659 G4UImanager* UI = G4UImanager::GetUIpointer(); 2662 // G4UImanager* UI = 2663 G4UImanager::GetUIpointer(); 2660 2664 #ifdef G4DEBUG_VIS_OGL 2661 2665 // printf("G4OpenGLQtViewer::getParentWidget :: UImanager %d G4Qt:%d et via GetUIQt:%d---------------------\n",UI,UI->GetSession(),interactorManager,interactorManager->GetUIVisWidget()); -
trunk/source/visualization/OpenGL/src/G4OpenGLStoredQtViewer.cc
r1238 r1240 291 291 } 292 292 293 void G4OpenGLStoredQtViewer::showEvent (QShowEvent * event) 294 { 295 fHasToRepaint = true; 296 } 297 293 298 /** 294 299 * This function was build in order to make a zoom on double clic event.
Note: See TracChangeset
for help on using the changeset viewer.