34#include <qpushbutton.h> 
   40#include <qfiledialog.h> 
   44#include "moc_G4OpenGLQtMovieDialog.cpp" 
   69    fParentViewer(parentViewer)
 
   72  setWindowTitle( tr( 
" Save as movie" ));
 
   76  QVBoxLayout* globalVLayout = 
new QVBoxLayout(
this);
 
   77  globalVLayout->setMargin(10);
 
   78  globalVLayout->setSpacing(10);
 
   81  QGroupBox *encoderGroupBox = 
new QGroupBox(tr(
"Encoder path"),
this);
 
   82  QVBoxLayout *encoderVGroupBoxLayout = 
new QVBoxLayout(encoderGroupBox);
 
   85  QWidget *encoderHBox = 
new QWidget(encoderGroupBox);
 
   86  QHBoxLayout *encoderHBoxLayout = 
new QHBoxLayout(encoderHBox);
 
   89  QPushButton *encoderButton = 
new QPushButton(tr(
"..."),encoderHBox);
 
   90  encoderButton->setMaximumWidth (30);
 
   95  encoderVGroupBoxLayout->setMargin(15);
 
  100  encoderHBoxLayout->addWidget(encoderButton);
 
  101  encoderVGroupBoxLayout->addWidget(encoderHBox);
 
  104  encoderGroupBox->setLayout(encoderVGroupBoxLayout);
 
  105  globalVLayout->addWidget(encoderGroupBox);
 
  111  QGroupBox *tempFolderGroupBox = 
new QGroupBox(tr(
"Temporary folder path"),
this);
 
  112  QVBoxLayout *tempFolderVGroupBoxLayout = 
new QVBoxLayout(tempFolderGroupBox);
 
  115  QWidget *tempFolderHBox = 
new QWidget(tempFolderGroupBox);
 
  116  QHBoxLayout *tempFolderHBoxLayout = 
new QHBoxLayout(tempFolderHBox);
 
  120  QPushButton *tempButton = 
new QPushButton(tr(
"..."),tempFolderHBox);
 
  121  tempButton->setMaximumWidth (30);
 
  125  tempFolderVGroupBoxLayout->setMargin(15);
 
  129  tempFolderHBoxLayout->addWidget(tempButton);
 
  130  tempFolderVGroupBoxLayout->addWidget(tempFolderHBox);
 
  133  tempFolderGroupBox->setLayout(tempFolderVGroupBoxLayout);
 
  134  globalVLayout->addWidget(tempFolderGroupBox);
 
  142  QGroupBox *saveFileGroupBox = 
new QGroupBox(tr(
"Save as"),
this);
 
  143  QVBoxLayout *saveFileVGroupBoxLayout = 
new QVBoxLayout(saveFileGroupBox);
 
  146  QWidget *saveFileHBox = 
new QWidget(saveFileGroupBox);
 
  147  QHBoxLayout *saveFileHBoxLayout = 
new QHBoxLayout(saveFileHBox);
 
  151  QPushButton *saveButton = 
new QPushButton(tr(
"..."),saveFileHBox);
 
  152  saveButton->setMaximumWidth (30);
 
  156  saveFileVGroupBoxLayout->setMargin(15);
 
  160  saveFileHBoxLayout->addWidget(saveButton);
 
  161  saveFileVGroupBoxLayout->addWidget(saveFileHBox);
 
  164  saveFileGroupBox->setLayout(saveFileVGroupBoxLayout);
 
  165  globalVLayout->addWidget(saveFileGroupBox);
 
  173  QLabel *infoLabel = 
new QLabel(
"  Press SPACE to Start/Pause video recording \n  Press RETURN to Stop video recording",
this);
 
  176  QGroupBox *statusGroupBox = 
new QGroupBox(tr(
"Status"),
this);
 
  177  QVBoxLayout *statusVGroupBoxLayout = 
new QVBoxLayout(statusGroupBox);
 
  180  statusVGroupBoxLayout->setMargin(15);
 
  183  mypalette.setColor( QPalette::Text, Qt::green);
 
  193  statusGroupBox->setLayout(statusVGroupBoxLayout);
 
  194  globalVLayout->addWidget(infoLabel);
 
  195  globalVLayout->addWidget(statusGroupBox);
 
  198  QWidget *buttonBox = 
new QWidget(
this);
 
  200  QHBoxLayout *buttonBoxLayout = 
new QHBoxLayout(buttonBox);
 
  202  QPushButton *buttonReset = 
new QPushButton( tr( 
"&Reset" ),buttonBox );
 
  203  buttonReset->setAutoDefault( 
TRUE );
 
  204  buttonBoxLayout->addWidget(buttonReset);
 
  216  fButtonSave = 
new QPushButton( tr( 
"&Save" ),buttonBox );
 
  221  QPushButton *buttonCancel = 
new QPushButton( tr( 
"&Cancel" ),buttonBox );
 
  222  buttonCancel->setAutoDefault( 
TRUE );
 
  223  buttonBoxLayout->addWidget(buttonCancel);
 
  225  buttonBox->setLayout(buttonBoxLayout);
 
  226  globalVLayout->addWidget(buttonBox);
 
  230  setLayout(globalVLayout);
 
  235  connect( buttonCancel, SIGNAL( clicked() ), 
this, SLOT( reject() ) );
 
  263  QString nomFich =  QFileDialog::getOpenFileName ( 
this,
 
  264                                                    "Select your encoder",
 
  265                                                    tr(
"Select your encoder ..."));
 
  278  QString nomFich =  QFileDialog::getExistingDirectory ( 
this,
 
  279                                                    "Select temporary folder",
 
  280                                                    tr(
"Select temporary folder ..."));
 
  292  QString nomFich =  QFileDialog::getSaveFileName ( 
this,
 
  294                                                    tr(
"Select saved file ..."));
 
  327    mypalette.setColor( QPalette::Base, Qt::red);
 
  329      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");
 
  333    mypalette.setColor( QPalette::Base, Qt::white);
 
  353    mypalette.setColor( QPalette::Base, Qt::red);
 
  356    mypalette.setColor( QPalette::Base, Qt::white);
 
  376    mypalette.setColor( QPalette::Base, Qt::red);
 
  379    mypalette.setColor( QPalette::Base, Qt::white);
 
QLabel * fTempFolderStatus
bool checkSaveFileNameParameters()
void setRecordingInfos(QString)
void selectSaveFileNameAction()
void enabledApplyButton()
void selectTempPathAction()
void setRecordingStatus(QString)
QLineEdit * fSaveFileName
G4OpenGLQtMovieDialog(G4OpenGLQtViewer *, QWidget *)
void selectEncoderPathAction()
QLabel * fRecordingStatus
bool checkTempFolderParameters()
G4OpenGLQtViewer * fParentViewer
QPushButton * fButtonStopFinishClose
QLineEdit * fTempFolderPath
bool checkEncoderSwParameters()
QPushButton * fButtonStartPause
QPushButton * fButtonSave
QString getSaveFileName()
QString getTempFolderPath()
QString setEncoderPath(QString path)
QString setSaveFileName(QString path)
QString setTempFolderPath(QString path)
def connect(endpoint="tcp://127.0.0.1:5555")