msgid "VisuGUI_TimeAnimationDlg::MSG_NO_ANIMATIONDATA"
msgstr "There is no data for animation"
+msgid "VisuGUI_TimeAnimationDlg::MSG_NO_AVI_MAKER"
+msgstr "Tool jpeg2yuv, necessary for AVI recording, is not available.\nPlease, refer to the documentation."
+
#: VisuGUI_VectorsDlg.cxx
msgid "VVTK_MainWindow::DSC_VVTK_RECORDING_STOP"
msgstr "Stop recording"
+msgid "VVTK_MainWindow::MSG_NO_AVI_MAKER"
+msgstr "Tool jpeg2yuv, necessary for AVI recording, is not available.\nPlease, refer to the documentation."
+
msgid "VVTK_MainWindow1::LBL_TOOLBAR_GAUSS_LABEL"
msgstr "Gauss Viewer Tools"
msgstr "Plot3D"
msgid "VISU_SCALAR_MAP_ON_DEFORMED_SHAPE"
-msgstr "Scalar Map on Def. Shape"
\ No newline at end of file
+msgstr "Scalar Map on Def. Shape"
this, SLOT( onCheckDump(bool) ));
aSaveLay->addMultiCellWidget(mySaveAVICheck, 3, 3, 0, 2);
- QLabel* aPathAVILbl = new QLabel("Path:", aSaveBox);
- aPathAVILbl->setEnabled(false);
- connect(mySaveAVICheck, SIGNAL( toggled(bool)),
- aPathAVILbl, SLOT( setEnabled(bool) ));
- aSaveLay->addWidget(aPathAVILbl, 4, 0);
+ myPathAVILbl = new QLabel("Path:", aSaveBox);
+ myPathAVILbl->setEnabled(false);
+ //connect(mySaveAVICheck, SIGNAL( toggled(bool)),
+ // myPathAVILbl, SLOT( setEnabled(bool) ));
+ aSaveLay->addWidget(myPathAVILbl, 4, 0);
myPathAVIEdit = new QLineEdit(aSaveBox);
myPathAVIEdit->setReadOnly(true);
myPathAVIEdit->setEnabled(false);
- connect(mySaveAVICheck, SIGNAL( toggled(bool)),
- myPathAVIEdit, SLOT( setEnabled(bool) ));
+ //connect(mySaveAVICheck, SIGNAL( toggled(bool)),
+ // myPathAVIEdit, SLOT( setEnabled(bool) ));
aSaveLay->addWidget(myPathAVIEdit, 4, 1);
- QPushButton* aBrowseAVIBtn = new QPushButton("Browse...", aSaveBox);
- aBrowseAVIBtn->setEnabled(false);
- connect(mySaveAVICheck, SIGNAL( toggled(bool)),
- aBrowseAVIBtn, SLOT( setEnabled(bool) ));
- connect(aBrowseAVIBtn, SIGNAL( clicked()),
+ myBrowseAVIBtn = new QPushButton("Browse...", aSaveBox);
+ myBrowseAVIBtn->setEnabled(false);
+ //connect(mySaveAVICheck, SIGNAL( toggled(bool)),
+ // myBrowseAVIBtn, SLOT( setEnabled(bool) ));
+ connect(myBrowseAVIBtn, SIGNAL( clicked()),
this, SLOT( onBrowseAVI() ));
- aSaveLay->addWidget(aBrowseAVIBtn, 4, 2);
+ aSaveLay->addWidget(myBrowseAVIBtn, 4, 2);
mySaveAVICheck->setChecked(false);
- mySaveAVICheck->setEnabled(myAnimator->checkAVIMaker());
+ //mySaveAVICheck->setEnabled(myAnimator->checkAVIMaker());
TopLayout->addMultiCellWidget(aSaveBox, 7, 7, 0, 3);
} else {
myAnimator->dumpTo("");
}
- mySaveAVICheck->setEnabled(!mySaveCheck->isChecked() && myAnimator->checkAVIMaker());
+ //mySaveAVICheck->setEnabled(!mySaveCheck->isChecked() && myAnimator->checkAVIMaker());
+ mySaveAVICheck->setEnabled(!mySaveCheck->isChecked());
}
else if (source == mySaveAVICheck) {
if (mySaveAVICheck->isChecked()) {
- if (mySaveCheck->isChecked())
- mySaveCheck->setChecked(false);
+ if (!myAnimator->checkAVIMaker()) {
+ // AVI maker is not available
+ SUIT_MessageBox::warn1(this, tr("ERROR"), tr("MSG_NO_AVI_MAKER"), tr("&OK"));
+ mySaveAVICheck->setChecked(false);
+ }
+ else {
+ if (mySaveCheck->isChecked()) {
+ mySaveCheck->setChecked(false);
+ }
+ myPathAVILbl->setEnabled(true);
+ myPathAVIEdit->setEnabled(true);
+ myBrowseAVIBtn->setEnabled(true);
+ }
+ }
+ else {
+ // it is necessary in case of not available AVI maker,
+ // because otherwise they will stay enabled
+ // (??? slots, connected on SIGNAL(toggled(bool)) of mySaveAVICheck,
+ // works in wrong order ???)
+ myPathAVILbl->setEnabled(false);
+ myPathAVIEdit->setEnabled(false);
+ myBrowseAVIBtn->setEnabled(false);
}
mySaveCheck->setEnabled(!mySaveAVICheck->isChecked());
}
#include "SUIT_ResourceMgr.h"
#include "SUIT_ToolButton.h"
#include "SUIT_Accel.h"
+#include "SUIT_MessageBox.h"
#include "QtxAction.h"
#include <qimage.h>
connect( myStopAction, SIGNAL( activated() ), this, SLOT( OnStopRecording() ) );
myRecorder = VVTK_Recorder::New();
- myRecorder->CheckExistAVIMaker();
- if(myRecorder->ErrorStatus())
- myRecordingToolBar->setEnabled(false);
+ //myRecorder->CheckExistAVIMaker();
+ //if(myRecorder->ErrorStatus())
+ // myRecordingToolBar->setEnabled(false);
}
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
void VVTK_MainWindow::OnStartRecording()
{
- VVTK_RecorderDlg* aRecorderDlg = new VVTK_RecorderDlg( this, myRecorder );
+ myRecorder->CheckExistAVIMaker();
+ if (myRecorder->ErrorStatus()) {
+ SUIT_MessageBox::warn1(this, tr("ERROR"), tr("MSG_NO_AVI_MAKER"), tr("&OK"));
+ }
+ else {
+ VVTK_RecorderDlg* aRecorderDlg = new VVTK_RecorderDlg( this, myRecorder );
- if( !aRecorderDlg->exec() )
- return;
+ if( !aRecorderDlg->exec() )
+ return;
- myStartAction->setEnabled( false );
- myPlayAction->setEnabled( false );
- myPauseAction->setEnabled( true );
- myStopAction->setEnabled( true );
+ myStartAction->setEnabled( false );
+ myPlayAction->setEnabled( false );
+ myPauseAction->setEnabled( true );
+ myStopAction->setEnabled( true );
- myRecorder->Record();
+ myRecorder->Record();
+ }
}
//----------------------------------------------------------------------------