Back to index

salome-gui  6.5.0
Public Member Functions | Protected Slots | Private Member Functions | Private Attributes
SVTK_RecorderDlg Class Reference

#include <SVTK_RecorderDlg.h>

Inheritance diagram for SVTK_RecorderDlg:
Inheritance graph
[legend]
Collaboration diagram for SVTK_RecorderDlg:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 SVTK_RecorderDlg (QWidget *, SVTK_Recorder *)
 Constructor.
 ~SVTK_RecorderDlg ()
int exec ()
QString fileName () const

Protected Slots

void onStart ()
void onClose ()
void onHelp ()
bool onBrowseFile ()

Private Member Functions

virtual void keyPressEvent (QKeyEvent *)

Private Attributes

SVTK_RecordermyRecorder
QString myFileName
QLineEdit * myFileNameLineEdit
QComboBox * myRecordingModeComboBox
QtxDoubleSpinBoxmyFPSSpinBox
QtxIntSpinBoxmyQualitySpinBox
QCheckBox * myProgressiveCheckBox

Detailed Description

Definition at line 38 of file SVTK_RecorderDlg.h.


Constructor & Destructor Documentation

SVTK_RecorderDlg::SVTK_RecorderDlg ( QWidget *  theParent,
SVTK_Recorder theRecorder 
)

Constructor.

Definition at line 43 of file SVTK_RecorderDlg.cxx.

                                                                                  :
  QDialog( theParent ),
  myRecorder( theRecorder )
{
  setWindowTitle( tr( "DLG_RECORDER_TITLE" ) );

  SUIT_ResourceMgr* aResourceMgr = SUIT_Session::session()->resourceMgr();

  QVBoxLayout* aTopLayout = new QVBoxLayout( this );
  aTopLayout->setSpacing( 6 );
  aTopLayout->setMargin( 6 );

  // Settings
  QGroupBox* mySettingsBox = new QGroupBox( tr( "SETTINGS" ), this );

  QGridLayout* aSettingsLayout = new QGridLayout( mySettingsBox );
  aSettingsLayout->setSpacing( 6 );
  aSettingsLayout->setMargin( 11 );

  QLabel* aFileNameLabel = new QLabel( tr( "FILE_NAME" ), mySettingsBox );
  myFileNameLineEdit = new QLineEdit( mySettingsBox );
  myFileNameLineEdit->setMinimumWidth( 250 );
  myFileNameLineEdit->setReadOnly( true );

  QLabel* aRecordingModeLabel = new QLabel( tr( "RECORDING_MODE" ), mySettingsBox );
  myRecordingModeComboBox = new QComboBox( mySettingsBox );
  myRecordingModeComboBox->addItem( tr( "SKIPPED_FRAMES" ) );
  myRecordingModeComboBox->addItem( tr( "ALL_DISLPAYED_FRAMES" ) );
  myRecordingModeComboBox->setCurrentIndex( aResourceMgr->integerValue( "VTKViewer", "recorder_mode", 1 ) );

  QLabel* aFPSLabel = new QLabel( tr( "FPS" ), mySettingsBox );
  myFPSSpinBox = new QtxDoubleSpinBox( 0.1, 100.0, 1.0, mySettingsBox );
  myFPSSpinBox->setValue( aResourceMgr->doubleValue( "VTKViewer", "recorder_fps", 10.0 ) );

  QLabel* aQualityLabel = new QLabel( tr( "QUALITY" ), mySettingsBox );
  myQualitySpinBox = new QtxIntSpinBox( 1, 100, 1, mySettingsBox );
  myQualitySpinBox->setValue( aResourceMgr->integerValue( "VTKViewer", "recorder_quality", 80 ) );

  myProgressiveCheckBox = new QCheckBox( tr( "PROGRESSIVE" ), mySettingsBox );
  myProgressiveCheckBox->setChecked( aResourceMgr->booleanValue( "VTKViewer", "recorder_progressive", false ) );

  aSettingsLayout->addWidget( aFileNameLabel, 0, 0 );
  aSettingsLayout->addWidget( myFileNameLineEdit, 1, 0, 1, 2 );
  aSettingsLayout->addWidget( aRecordingModeLabel, 2, 0 );
  aSettingsLayout->addWidget( myRecordingModeComboBox, 2, 1 );
  aSettingsLayout->addWidget( aFPSLabel, 3, 0 );
  aSettingsLayout->addWidget( myFPSSpinBox, 3, 1 );
  aSettingsLayout->addWidget( aQualityLabel, 4, 0 );
  aSettingsLayout->addWidget( myQualitySpinBox, 4, 1 );
  aSettingsLayout->addWidget( myProgressiveCheckBox, 5, 0 );

  aTopLayout->addWidget( mySettingsBox );

  // Start / Close
  QGroupBox* CommonGroup = new QGroupBox( this );
  QGridLayout* CommonGroupLayout = new QGridLayout( CommonGroup );
  CommonGroupLayout->setAlignment( Qt::AlignTop );
  CommonGroupLayout->setSpacing( 6 );
  CommonGroupLayout->setMargin( 11 );

  QPushButton* aStartButton = new QPushButton( tr( "START" ), CommonGroup );
  aStartButton->setAutoDefault( true );
  aStartButton->setDefault( true );
  CommonGroupLayout->addWidget( aStartButton, 0, 0 );
  CommonGroupLayout->addItem( new QSpacerItem( 5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum ), 0, 1 );

  QPushButton* aCloseButton = new QPushButton( tr( "CLOSE" ), CommonGroup );
  aCloseButton->setAutoDefault( true );
  CommonGroupLayout->addWidget( aCloseButton, 0, 2 );

  //QPushButton* aHelpButton = new QPushButton( tr( "HELP" ), CommonGroup );
  //aHelpButton->setAutoDefault( true );
  //CommonGroupLayout->addWidget( aHelpButton, 0, 3 );

  aTopLayout->addWidget( CommonGroup );

  connect( aStartButton, SIGNAL( clicked() ), this, SLOT( onStart() ) );
  connect( aCloseButton, SIGNAL( clicked() ), this, SLOT( onClose() ) );
  //connect( aHelpButton,  SIGNAL( clicked() ), this, SLOT( onHelp() ) );
}

Here is the call graph for this function:

Definition at line 124 of file SVTK_RecorderDlg.cxx.

{
}

Member Function Documentation

Definition at line 188 of file SVTK_RecorderDlg.cxx.

{
  if( !onBrowseFile() )
  {
    reject();
    return 0;
  }
  return QDialog::exec();
}

Here is the call graph for this function:

QString SVTK_RecorderDlg::fileName ( ) const [inline]

Definition at line 48 of file SVTK_RecorderDlg.h.

{ return myFileName; }
void SVTK_RecorderDlg::keyPressEvent ( QKeyEvent *  e) [private, virtual]

Definition at line 198 of file SVTK_RecorderDlg.cxx.

{
  QDialog::keyPressEvent( e );
  if ( e->isAccepted() )
    return;

  if ( e->key() == Qt::Key_F1 )
    {
      e->accept();
      onHelp();
    }
}

Here is the call graph for this function:

bool SVTK_RecorderDlg::onBrowseFile ( ) [protected, slot]

Definition at line 170 of file SVTK_RecorderDlg.cxx.

{
  QStringList aFilter;
  aFilter.append( tr( "FLT_AVI_FILES" ) );
  aFilter.append( tr( "FLT_ALL_FILES" ) );

  QString aFileName = SUIT_FileDlg::getFileName( this, getenv( "HOME" ), aFilter,
                                                 tr( "FILE_NAME" ), false );

  if( aFileName.isNull() )
    return false;

  myFileName = aFileName;
  myFileNameLineEdit->setText( aFileName.section( '/', -1 ) );

  return true;
}

Here is the caller graph for this function:

void SVTK_RecorderDlg::onClose ( ) [protected, slot]

Definition at line 144 of file SVTK_RecorderDlg.cxx.

{
  reject();
}

Here is the caller graph for this function:

void SVTK_RecorderDlg::onHelp ( ) [protected, slot]

Definition at line 149 of file SVTK_RecorderDlg.cxx.

{
  /*
  QString aHelpFileName = "animation_in_gauss_viewer.htm";
  LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
  if (app)
    app->onHelpContextModule(app->activeModule() ? app->moduleName(app->activeModule()->moduleName()) : QString(""), aHelpFileName);
  else {
                QString platform;
#ifdef WIN32
                platform = "winapplication";
#else
                platform = "application";
#endif
    SUIT_MessageBox::warning(0, QObject::tr("WRN_WARNING"),
                             QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
                             arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName) );
  }
  */
}

Here is the caller graph for this function:

void SVTK_RecorderDlg::onStart ( ) [protected, slot]

Definition at line 128 of file SVTK_RecorderDlg.cxx.

{
  if( myFileName.isNull() )
    return;

  myRecorder->SetName( (const char*)myFileName.toLatin1() );

  myRecorder->SetUseSkippedFrames( myRecordingModeComboBox->currentIndex() == 0 );
  myRecorder->SetNbFPS( myFPSSpinBox->value() );
  myRecorder->SetQuality( myQualitySpinBox->value() );
  myRecorder->SetProgressiveMode( myProgressiveCheckBox->isChecked() );

  accept();

}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

QString SVTK_RecorderDlg::myFileName [private]

Definition at line 62 of file SVTK_RecorderDlg.h.

Definition at line 64 of file SVTK_RecorderDlg.h.

Definition at line 67 of file SVTK_RecorderDlg.h.

Definition at line 69 of file SVTK_RecorderDlg.h.

Definition at line 68 of file SVTK_RecorderDlg.h.

Definition at line 61 of file SVTK_RecorderDlg.h.

Definition at line 66 of file SVTK_RecorderDlg.h.


The documentation for this class was generated from the following files: