Ignore:
Timestamp:
Mar 10, 2008, 2:17:54 PM (16 years ago)
Author:
garnier
Message:

avancement sur le encode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/geant4/visualization/OpenGL/src/G4OpenGLQtMovieDialog.cc

    r748 r750  
    238238  buttonBoxLayout->addWidget(buttonCancel);
    239239
    240   QPushButton *buttonApply = new QPushButton( tr( "&Apply" ),buttonBox );
    241   buttonApply->setAutoDefault( TRUE );
    242   buttonApply->setDefault( TRUE );
    243   buttonBoxLayout->addWidget(buttonApply);
     240  QPushButton *buttonReset = new QPushButton( tr( "&Reset" ),buttonBox );
     241  buttonReset->setAutoDefault( TRUE );
     242  buttonBoxLayout->addWidget(buttonReset);
     243
     244  fButtonApply = new QPushButton( tr( "&Apply" ),buttonBox );
     245  fButtonApply->setAutoDefault( TRUE );
     246  fButtonApply->setEnabled(true);
     247  buttonBoxLayout->addWidget(fButtonApply);
    244248
    245249  fButtonEncode = new QPushButton( tr( "&Encode" ),buttonBox );
     
    260264
    261265  // signals and slots connections
    262   connect( buttonApply, SIGNAL( clicked() ), this, SLOT( checkAllParameters() ) );
     266  connect( fButtonApply, SIGNAL( clicked() ), this, SLOT( checkAllParameters() ) );
     267  connect( buttonReset, SIGNAL( clicked() ), this, SLOT( resetRecording() ) );
    263268  connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
    264269  connect( fButtonEncode, SIGNAL( clicked() ), this, SLOT( encode() ) );
     
    268273  fEncoderPath->setText(fParentViewer->getEncoderPath());
    269274  fTempFolderPath->setText(fParentViewer->getTempFolderPath());
     275
     276  // connect line edit signals
     277  connect (fEncoderPath,SIGNAL(textEdited ( const QString&)),fButtonApply,SLOT(setEnabled(true)));
     278  connect (fTempFolderPath,SIGNAL(textEdited ( const QString&)),fButtonApply,SLOT(setEnabled(true)));
     279  connect (fSaveFileName,SIGNAL(textEdited ( const QString&)),fButtonApply,SLOT(setEnabled(true)));
    270280
    271281  if (fParentViewer->getEncoderPath() == "") {
     
    289299    return;
    290300  }
    291   checkEncoderParameters(nomFich);
     301  fEncoderPath->setText(nomFich);
     302  checkAllParameters();
    292303 }
     304
    293305
    294306void G4OpenGLQtMovieDialog::selectTempPathAction()
     
    300312    return;
    301313  }
    302   checkTempFolderParameters(nomFich);
     314  fTempFolderPath->setText(nomFich);
     315  checkAllParameters();
    303316 }
     317
    304318
    305319void G4OpenGLQtMovieDialog::selectSaveFileNameAction()
     
    311325    return;
    312326  }
    313   checkSaveFileNameParameters(nomFich);
     327  fSaveFileName->setText(nomFich);
     328  checkAllParameters();
    314329 }
     330
    315331
    316332void G4OpenGLQtMovieDialog::encode() {
     
    334350    }
    335351  }
     352  fButtonApply->setEnabled(false);
    336353}
    337354
     
    397414
    398415  QString temp = fParentViewer->setSaveFileName(param);
    399     fSaveFileStatus->setText(temp);
     416  fSaveFileStatus->setText(temp);
    400417  if (temp != "") {
    401418    palette.setColor( QPalette::Base, Qt::red);
     
    410427
    411428
     429void G4OpenGLQtMovieDialog::resetRecording() {
     430  fParentViewer->resetRecording();
     431}
     432
     433
    412434void G4OpenGLQtMovieDialog::setRecordingStatus(QString txt) {
    413435  fButtonEncode->setEnabled(fParentViewer->isReadyToEncode());
     
    415437}
    416438
     439
    417440void G4OpenGLQtMovieDialog::setRecordingInfos(QString txt) {
    418441  fRecordingInfos->setText(txt);
Note: See TracChangeset for help on using the changeset viewer.