- Timestamp:
- May 13, 2009, 12:15:37 PM (15 years ago)
- Location:
- trunk/source/visualization
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/visualization/HepRep/History
r841 r1040 1 .$Id: History,v 1.12 8 2008/01/04 22:11:31 allisonExp $1 .$Id: History,v 1.129 2009/05/08 09:29:23 gcosmo Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 21 21 -------------------------------------------------- 22 22 23 4th January 2008 John Allison (vis-HepRep-V09-01-00) 23 8 May 2009 Gabriele Cosmo (vis-HepRep-V09-02-00) 24 - Added inclusion of <cstdio> in DeflateOutputStreamBuffer.h to resolve 25 compilation errors reported by gcc-4.4.0. 26 27 4 January 2008 John Allison (vis-HepRep-V09-01-00) 24 28 - Adapted to new BeginPrimitives2D signature. 25 29 26 16 Nov 2007 Joseph Perl (vis-HepRep-V09-00-01)30 16 November 2007 Joseph Perl (vis-HepRep-V09-00-01) 27 31 - Adjust geometry hierarchy in G4HepRepFileSceneHandler to accomodate 28 32 parallel worlds. Where used to just have world at top of hierarchy, -
trunk/source/visualization/HepRep/include/cheprep/DeflateOutputStreamBuffer.h
r834 r1040 6 6 #include <iostream> 7 7 #include <string> 8 #include <cstdio> 8 9 9 10 #ifndef CHEPREP_NO_ZLIB … … 13 14 /** 14 15 * @author Mark Donszelmann 15 * @version $Id: DeflateOutputStreamBuffer.h,v 1. 5 2005/06/02 21:28:45 dunsExp $16 * @version $Id: DeflateOutputStreamBuffer.h,v 1.6 2009/05/08 09:26:58 gcosmo Exp $ 16 17 */ 17 18 namespace cheprep { -
trunk/source/visualization/History
r1023 r1040 1 $Id: History,v 1.43 7 2009/04/27 16:23:06allison Exp $1 $Id: History,v 1.438 2009/04/29 20:06:39 allison Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 24 24 History file for visualization category 25 25 --------------------------------------- 26 27 29 April 2009, John Allison (vis-V09-02-03) 28 - visexternal-V09-02-04: Fix a circular dependency to G4OpenGL. 26 29 27 30 27th April 2009 John Allison (vis-V09-02-02) -
trunk/source/visualization/OpenGL/History
r1036 r1040 20 20 History file for visualization/OpenGL 21 21 ------------------------------------- 22 23 13 May 2009, Laurent Garnier 24 - G4OpenGLStoredQtViewer.cc: Fix a second view redraw at ShowView() call 25 - G4OpenGLQtViewer : Remove unuseful variables, renaming others 26 27 22 28 6 May 2009, Laurent Garnier 23 29 - G4OpenGLQtViewer.cc: Fix compilation warning and error with gcc4.4 -
trunk/source/visualization/OpenGL/include/G4OpenGLQtViewer.hh
r941 r1040 120 120 protected: 121 121 QGLWidget* fWindow; 122 QDialog* GLWindow;122 QDialog* fGLWindow; 123 123 bool hasPendingEvents(); 124 124 void savePPMToTemp(); … … 131 131 float fDeltaRotationAngleZ; 132 132 133 bool hasToRepaint; 134 bool readyToPaint; 135 bool zoomAction; 136 QPoint beginZoom; 137 QPoint endZoom; 133 bool fHasToRepaint; 134 bool fReadyToPaint; 138 135 139 136 private: -
trunk/source/visualization/OpenGL/include/G4OpenGLViewer.hh
r1039 r1040 75 75 76 76 unsigned int getWinWidth(); 77 unsigned int getWinHeight(); 77 78 G4bool sizeHasChanged(); 78 79 // return true if size has change since last redraw 79 unsigned int getWinHeight();80 80 GLdouble getSceneNearWidth(); 81 81 GLdouble getSceneFarWidth(); -
trunk/source/visualization/OpenGL/src/G4OpenGLImmediateQtViewer.cc
r1039 r1040 56 56 setFocusPolicy(Qt::StrongFocus); // enable keybord events 57 57 #endif 58 hasToRepaint =false;58 fHasToRepaint =false; 59 59 60 60 if (fViewId < 0) return; // In case error in base class instantiation. … … 69 69 printf("G4OpenGLImmediateQtViewer::Initialise \n"); 70 70 #endif 71 readyToPaint = false;71 fReadyToPaint = false; 72 72 CreateMainWindow (this,QString(fName)); 73 73 CreateFontLists (); 74 74 75 readyToPaint = true;75 fReadyToPaint = true; 76 76 } 77 77 … … 92 92 93 93 if (fSceneHandler.GetScene() == 0) { 94 hasToRepaint =false;94 fHasToRepaint =false; 95 95 } else { 96 hasToRepaint =true;96 fHasToRepaint =true; 97 97 } 98 98 … … 152 152 printf("G4OpenGLImmediateQtViewer::ComputeView %d %d ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ \n",getWinWidth(), getWinHeight()); 153 153 #endif 154 hasToRepaint = true;154 fHasToRepaint = true; 155 155 } 156 156 … … 176 176 { 177 177 ResizeWindow(aWidth,aHeight); 178 hasToRepaint = sizeHasChanged();178 fHasToRepaint = sizeHasChanged(); 179 179 } 180 180 … … 185 185 printf("\n\nG4OpenGLImmediateQtViewer::paintGL ??\n"); 186 186 #endif 187 if (! readyToPaint) {188 readyToPaint= true;187 if (!fReadyToPaint) { 188 fReadyToPaint= true; 189 189 return; 190 190 } 191 191 // DO NOT RESIZE IF SIZE HAS NOT CHANGE 192 if ( ! hasToRepaint) {192 if ( !fHasToRepaint) { 193 193 if (((getWinWidth() == (unsigned int)width())) &&(getWinHeight() == (unsigned int) height())) { 194 194 return; … … 196 196 } 197 197 #ifdef G4DEBUG_VIS_OGL 198 printf("G4OpenGLImmediateQtViewer::paintGL VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV ready %d\n", readyToPaint);198 printf("G4OpenGLImmediateQtViewer::paintGL VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV ready %d\n",fReadyToPaint); 199 199 #endif 200 200 … … 204 204 ComputeView(); 205 205 206 hasToRepaint = false; // could be set to false by ComputeView207 208 #ifdef G4DEBUG_VIS_OGL 209 printf("G4OpenGLImmediateQtViewer::paintGL ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ready %d\n\n\n", readyToPaint);206 fHasToRepaint = false; // could be set to false by ComputeView 207 208 #ifdef G4DEBUG_VIS_OGL 209 printf("G4OpenGLImmediateQtViewer::paintGL ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ready %d\n\n\n",fReadyToPaint); 210 210 #endif 211 211 } … … 252 252 253 253 void G4OpenGLImmediateQtViewer::updateQWidget() { 254 hasToRepaint= true;254 fHasToRepaint= true; 255 255 updateGL(); 256 hasToRepaint= false;256 fHasToRepaint= false; 257 257 } 258 258 -
trunk/source/visualization/OpenGL/src/G4OpenGLQtViewer.cc
r1039 r1040 130 130 ++it; 131 131 if ((found== false) && (widget->inherits("QMainWindow"))) { 132 GLWindow = new QDialog(0,0,FALSE,Qt::WStyle_Title | Qt::WStyle_SysMenu | Qt::WStyle_MinMax );132 fGLWindow = new QDialog(0,0,FALSE,Qt::WStyle_Title | Qt::WStyle_SysMenu | Qt::WStyle_MinMax ); 133 133 found = true; 134 134 } … … 138 138 foreach (QWidget *widget, QApplication::allWidgets()) { 139 139 if ((found== false) && (widget->inherits("QMainWindow"))) { 140 GLWindow = new QDialog(0,Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowMinMaxButtonsHint);140 fGLWindow = new QDialog(0,Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowMinMaxButtonsHint); 141 141 found = true; 142 142 } … … 145 145 146 146 #if QT_VERSION < 0x040000 147 glWidget->reparent( GLWindow,0,QPoint(0,0));148 #else 149 glWidget->setParent( GLWindow);147 glWidget->reparent(fGLWindow,0,QPoint(0,0)); 148 #else 149 glWidget->setParent(fGLWindow); 150 150 #endif 151 151 … … 154 154 printf("G4OpenGLQtViewer::CreateMainWindow case Qapp exist, but not found\n"); 155 155 #endif 156 GLWindow = new QDialog();156 fGLWindow = new QDialog(); 157 157 } 158 158 } else { … … 160 160 printf("G4OpenGLQtViewer::CreateMainWindow case Qapp exist\n"); 161 161 #endif 162 GLWindow = new QDialog();163 } 164 165 QHBoxLayout *mainLayout = new QHBoxLayout( GLWindow);162 fGLWindow = new QDialog(); 163 } 164 165 QHBoxLayout *mainLayout = new QHBoxLayout(fGLWindow); 166 166 167 167 mainLayout->addWidget(fWindow); 168 168 169 169 #if QT_VERSION < 0x040000 170 GLWindow->setCaption(name );171 #else 172 GLWindow->setLayout(mainLayout);173 GLWindow->setWindowTitle( name);170 fGLWindow->setCaption(name ); 171 #else 172 fGLWindow->setLayout(mainLayout); 173 fGLWindow->setWindowTitle( name); 174 174 #endif 175 175 ResizeWindow(fVP.GetWindowSizeHintX(),fVP.GetWindowSizeHintY()); … … 183 183 YPos = offset; 184 184 } 185 GLWindow->resize(getWinWidth(), getWinHeight());186 GLWindow->move(fVP.GetWindowAbsoluteLocationHintX(QApplication::desktop()->width()),YPos);187 GLWindow->show();185 fGLWindow->resize(getWinWidth(), getWinHeight()); 186 fGLWindow->move(fVP.GetWindowAbsoluteLocationHintX(QApplication::desktop()->width()),YPos); 187 fGLWindow->show(); 188 188 189 189 if(!fWindow) return; … … 201 201 */ 202 202 // void G4OpenGLQtViewer::dialogClosed() { 203 // // GLWindow = NULL;203 // // fGLWindow = NULL; 204 204 // } 205 205 #endif … … 275 275 276 276 #if QT_VERSION < 0x040000 277 fContextMenu = new QPopupMenu( GLWindow,"All" );277 fContextMenu = new QPopupMenu( fGLWindow,"All" ); 278 278 #else 279 279 fContextMenu = new QMenu("All"); … … 775 775 void G4OpenGLQtViewer::G4manageContextMenuEvent(QContextMenuEvent *e) 776 776 { 777 if (! GLWindow) {777 if (!fGLWindow) { 778 778 G4cerr << "Visualization window not defined, please choose one before" << G4endl; 779 779 } else { … … 1234 1234 */ 1235 1235 void G4OpenGLQtViewer::toggleFullScreen(bool check) { 1236 if (check != GLWindow->isFullScreen()) { //toggle1236 if (check != fGLWindow->isFullScreen()) { //toggle 1237 1237 #if QT_VERSION >= 0x030200 1238 GLWindow->setWindowState(GLWindow->windowState() ^ Qt::WindowFullScreen);1238 fGLWindow->setWindowState(fGLWindow->windowState() ^ Qt::WindowFullScreen); 1239 1239 #else 1240 1240 G4cerr << "This version of Qt could not do fullScreen. Resizing the widget is the only solution available." << G4endl; … … 1294 1294 fPrintFilename = QFileDialog::getSaveFileName ( ".", 1295 1295 filters, 1296 GLWindow,1296 fGLWindow, 1297 1297 "Save file dialog", 1298 1298 tr("Save as ..."), 1299 1299 selectedFormat ).ascii(); 1300 1300 #else 1301 fPrintFilename = QFileDialog::getSaveFileName ( GLWindow,1301 fPrintFilename = QFileDialog::getSaveFileName ( fGLWindow, 1302 1302 tr("Save as ..."), 1303 1303 ".", … … 1316 1316 QString format = selectedFormat->toLower(); 1317 1317 #endif 1318 G4OpenGLQtExportDialog* exportDialog= new G4OpenGLQtExportDialog( GLWindow,format,fWindow->height(),fWindow->width());1318 G4OpenGLQtExportDialog* exportDialog= new G4OpenGLQtExportDialog(fGLWindow,format,fWindow->height(),fWindow->width()); 1319 1319 if( exportDialog->exec()) { 1320 1320 … … 1398 1398 void G4OpenGLQtViewer::showMovieParametersDialog() { 1399 1399 if (!fMovieParametersDialog) { 1400 fMovieParametersDialog= new G4OpenGLQtMovieDialog(this, GLWindow);1400 fMovieParametersDialog= new G4OpenGLQtMovieDialog(this,fGLWindow); 1401 1401 displayRecordingStatus(); 1402 1402 fMovieParametersDialog->checkEncoderSwParameters(); -
trunk/source/visualization/OpenGL/src/G4OpenGLStoredQtViewer.cc
r1039 r1040 57 57 setFocusPolicy(Qt::StrongFocus); // enable keybord events 58 58 #endif 59 hasToRepaint =false;59 fHasToRepaint =false; 60 60 61 61 if (fViewId < 0) return; // In case error in base class instantiation. … … 73 73 printf("G4OpenGLStoredQtViewer::Initialise 1\n"); 74 74 #endif 75 readyToPaint = false;75 fReadyToPaint = false; 76 76 CreateMainWindow (this,QString(fName)); 77 77 CreateFontLists (); 78 78 79 readyToPaint = true;79 fReadyToPaint = true; 80 80 } 81 81 … … 96 96 97 97 if (fSceneHandler.GetScene() == 0) { 98 hasToRepaint =false;98 fHasToRepaint =false; 99 99 } else { 100 hasToRepaint =true;100 fHasToRepaint =true; 101 101 } 102 102 … … 197 197 printf("G4OpenGLStoredQtViewer::ComputeView %d %d ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ \n",getWinWidth(), getWinHeight()); 198 198 #endif 199 hasToRepaint =true;199 fHasToRepaint =true; 200 200 } 201 201 … … 210 210 // Set new size, it will be update when next Repaint()->SetView() called 211 211 ResizeWindow(aWidth,aHeight); 212 hasToRepaint = sizeHasChanged();212 fHasToRepaint = sizeHasChanged(); 213 213 } 214 214 … … 217 217 { 218 218 #ifdef G4DEBUG_VIS_OGL 219 printf("G4OpenGLStoredQtViewer::paintGL ??\n");220 #endif 221 if (! readyToPaint) {222 readyToPaint= true;219 printf("G4OpenGLStoredQtViewer::paintGL ready:%d fHasTo:%d??\n",fReadyToPaint,fHasToRepaint); 220 #endif 221 if (!fReadyToPaint) { 222 fReadyToPaint= true; 223 223 return; 224 224 } … … 226 226 // WHEN CLICK ON THE FRAME FOR EXAMPLE 227 227 // EXECEPT WHEN MOUSE MOVE EVENT 228 if ( ! hasToRepaint) {228 if ( !fHasToRepaint) { 229 229 if (((getWinWidth() == (unsigned int)width())) &&(getWinHeight() == (unsigned int) height())) { 230 230 return; … … 232 232 } 233 233 #ifdef G4DEBUG_VIS_OGL 234 printf("G4OpenGLStoredQtViewer::paintGL VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV ready %d\n", readyToPaint);234 printf("G4OpenGLStoredQtViewer::paintGL VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV ready %d\n",fReadyToPaint); 235 235 #endif 236 236 … … 240 240 ComputeView(); 241 241 242 hasToRepaint =false;242 fHasToRepaint =false; 243 243 244 244 #ifdef G4DEBUG_VIS_OGL 245 printf("G4OpenGLStoredQtViewer::paintGL ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ready %d\n", readyToPaint);245 printf("G4OpenGLStoredQtViewer::paintGL ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ready %d\n",fReadyToPaint); 246 246 #endif 247 247 } … … 288 288 289 289 void G4OpenGLStoredQtViewer::updateQWidget() { 290 hasToRepaint= true;290 fHasToRepaint= true; 291 291 updateGL(); 292 hasToRepaint= false;292 fHasToRepaint= false; 293 293 } 294 294 … … 303 303 activateWindow(); 304 304 #endif 305 updateQWidget(); 306 } 307 308 #endif 305 } 306 307 #endif -
trunk/source/visualization/OpenGL/src/G4OpenGLViewer.cc
r1039 r1040 209 209 void G4OpenGLViewer::SetView () { 210 210 211 #ifdef G4DEBUG_VIS_OGL212 printf("G4OpenGLViewer::SetView\n");213 #endif214 211 if (!fSceneHandler.GetScene()) { 215 212 G4cerr << "G4OpenGLStoredViewer: Creating a Viewer without a scene is not allowed. \nPlease use /vis/scene/create before /vis/open/.... " … … 350 347 background = fVP.GetBackgroundColour (); 351 348 352 #ifdef G4DEBUG_VIS_OGL353 printf("G4OpenGLViewer::SetView END\n");354 #endif355 349 } 356 350 … … 632 626 } 633 627 634 width=8192;635 height=8192;636 637 628 if (!fGL2PSAction) return false; 638 629 -
trunk/source/visualization/externals/gl2ps/History
r1038 r1040 1 $Id: History,v 1. 8 2009/04/29 09:37:55 lgarnierExp $1 $Id: History,v 1.9 2009/04/29 19:23:10 allison Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 18 18 ---------------------------------------------------------- 19 19 20 29 April 2009, Laurent Garnier 20 29 April 2009, Laurent Garnier (visexternal-V09-02-04) 21 21 - G4OpenGL2PSAction : Fix a circular dependency to G4OpenGL on Linux 22 22
Note: See TracChangeset
for help on using the changeset viewer.