- Timestamp:
- Mar 11, 2008, 5:35:07 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/geant4/visualization/OpenGL/src/G4OpenGLQtMovieDialog.cc
r752 r754 25 25 // 26 26 // 27 // $Id: G4OpenGLQtMovieDialog.cc,v 1. 6 2008/02/15 10:54:13lgarnier Exp $27 // $Id: G4OpenGLQtMovieDialog.cc,v 1.3 2008/03/11 16:05:56 lgarnier Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // 31 31 32 #define GEANT4_QT_DEBUG32 //#define GEANT4_QT_DEBUG 33 33 #ifdef G4VIS_BUILD_OPENGLQT_DRIVER 34 34 … … 70 70 fParentViewer(parentViewer) 71 71 { 72 #if QT_VERSION > 0x030200 72 73 setModal(false); 74 #endif 73 75 #if QT_VERSION < 0x040000 74 76 setCaption( tr( " Movie parameters" )); … … 96 98 97 99 fEncoderStatus = new QLabel(encoderGroupBox); 100 101 #if QT_VERSION > 0x040000 98 102 fEncoderStatus->setWordWrap(true); 103 #else 104 fEncoderStatus->setAlignment ( Qt::AlignAuto |Qt::WordBreak ); 105 #endif 106 99 107 fEncoderStatus->setText(""); 100 108 … … 133 141 134 142 fTempFolderStatus = new QLabel(tempFolderGroupBox); 143 #if QT_VERSION > 0x040000 135 144 fTempFolderStatus->setWordWrap(true); 145 #else 146 fTempFolderStatus->setAlignment ( Qt::AlignAuto |Qt::WordBreak ); 147 #endif 136 148 fTempFolderStatus->setText(""); 137 149 … … 172 184 173 185 fSaveFileStatus = new QLabel(saveFileGroupBox); 186 #if QT_VERSION > 0x040000 174 187 fSaveFileStatus->setWordWrap(true); 188 #else 189 fSaveFileStatus->setAlignment ( Qt::AlignAuto |Qt::WordBreak ); 190 #endif 175 191 fSaveFileStatus->setText(""); 176 192 … … 198 214 // label 199 215 200 QLabel *infoLabel = new QLabel(" Press SPACE to Start/Pause video recording \n Press RETURN to Stop video recording" );216 QLabel *infoLabel = new QLabel(" Press SPACE to Start/Pause video recording \n Press RETURN to Stop video recording",this); 201 217 202 218 // global status … … 205 221 206 222 fRecordingStatus = new QLabel(statusGroupBox); 223 #if QT_VERSION > 0x040000 207 224 fRecordingStatus->setWordWrap(true); 225 #else 226 fRecordingStatus->setAlignment ( Qt::AlignAuto |Qt::WordBreak ); 227 #endif 208 228 QPalette palette( fRecordingStatus->palette() ); 229 #if QT_VERSION > 0x040000 209 230 palette.setColor( QPalette::Text, Qt::green); 231 #else 232 palette.setColor( QColorGroup::Text, Qt::green); 233 #endif 210 234 fRecordingStatus->setPalette(palette); 211 235 212 236 fRecordingInfos = new QLabel(statusGroupBox); 237 #if QT_VERSION > 0x040000 213 238 fRecordingInfos->setWordWrap(true); 239 #else 240 fRecordingInfos->setAlignment ( Qt::AlignAuto |Qt::WordBreak ); 241 #endif 214 242 setRecordingInfos(""); 215 243 … … 298 326 void G4OpenGLQtMovieDialog::selectEncoderPathAction() 299 327 { 328 #if QT_VERSION < 0x040000 329 QString nomFich = QFileDialog::getOpenFileName ( ".", 330 NULL, 331 this, 332 "Select your encoder", 333 tr("Select your encoder ...")); 334 #else 300 335 QString nomFich = QFileDialog::getOpenFileName ( this, 301 336 "Select your encoder", 302 337 tr("Select your encoder ...")); 338 339 #endif 340 303 341 if (nomFich == "") { 304 342 return; … … 311 349 void G4OpenGLQtMovieDialog::selectTempPathAction() 312 350 { 351 #if QT_VERSION < 0x040000 352 QString nomFich = QFileDialog::getOpenFileName ( ".", 353 NULL, 354 this, 355 "Select temporary folder", 356 tr("Select temporary folder ...")); 357 #else 313 358 QString nomFich = QFileDialog::getOpenFileName ( this, 314 359 "Select temporary folder", 315 360 tr("Select temporary folder ...")); 361 362 #endif 316 363 if (nomFich == "") { 317 364 return; … … 324 371 void G4OpenGLQtMovieDialog::selectSaveFileNameAction() 325 372 { 373 #if QT_VERSION < 0x040000 374 QString nomFich = QFileDialog::getSaveFileName ( ".", 375 NULL, 376 this, 377 "Select saved file", 378 tr("Select saved file ...")); 379 #else 326 380 QString nomFich = QFileDialog::getSaveFileName ( this, 327 381 "Select saved file", 328 382 tr("Select saved file ...")); 383 384 #endif 329 385 if (nomFich == "") { 330 386 return; … … 372 428 fEncoderStatus->setText(temp); 373 429 if (temp != "") { 430 #if QT_VERSION > 0x040000 374 431 palette.setColor( QPalette::Base, Qt::red); 432 #else 433 palette.setColor( QColorGroup::Base, Qt::red); 434 #endif 375 435 if (fParentViewer->isReadyToEncode()) { 376 436 setRecordingInfos("No valid encode defined, screen capture had been saved in the temp folder in ppm format.\nPlease define a encoder and clic on Apply button"); … … 378 438 status = false; 379 439 } else { 440 #if QT_VERSION > 0x040000 380 441 palette.setColor( QPalette::Base, Qt::white); 442 #else 443 palette.setColor( QColorGroup::Base, Qt::white); 444 #endif 381 445 fEncoderPath->setText(fParentViewer->getEncoderPath()); 382 446 } … … 398 462 fTempFolderStatus->setText(temp); 399 463 if (temp != "") { 464 #if QT_VERSION > 0x040000 400 465 palette.setColor( QPalette::Base, Qt::red); 466 #else 467 palette.setColor( QColorGroup::Base, Qt::red); 468 #endif 401 469 status = false; 402 470 } else { 471 #if QT_VERSION > 0x040000 403 472 palette.setColor( QPalette::Base, Qt::white); 473 #else 474 palette.setColor( QColorGroup::Base, Qt::white); 475 #endif 404 476 fTempFolderPath->setText(fParentViewer->getTempFolderPath()); 405 477 } … … 421 493 fSaveFileStatus->setText(temp); 422 494 if (temp != "") { 495 #if QT_VERSION > 0x040000 423 496 palette.setColor( QPalette::Base, Qt::red); 497 #else 498 palette.setColor( QColorGroup::Base, Qt::red); 499 #endif 424 500 status = false; 425 501 } else { 502 #if QT_VERSION > 0x040000 426 503 palette.setColor( QPalette::Base, Qt::white); 504 #else 505 palette.setColor( QColorGroup::Base, Qt::white); 506 #endif 427 507 fSaveFileName->setText(fParentViewer->getSaveFileName()); 428 508 }
Note: See TracChangeset
for help on using the changeset viewer.