Salome HOME
Improve english localization
[modules/visu.git] / src / VISUGUI / VisuGUI_StreamLinesDlg.cxx
1 //  VISU VISUGUI : GUI of VISU component
2 //
3 //  Copyright (C) 2003  CEA/DEN, EDF R&D
4 //
5 //
6 //
7 //  File   : VisuGUI_StreamLinesDlg.cxx
8 //  Author : Vitaly SMETANNIKOV
9 //  Module : VISU
10
11 #include "VisuGUI_StreamLinesDlg.h"
12
13 #include "VisuGUI.h"
14 //#include "VisuGUI_Selection.h"
15
16 #include "VISU_Mesh_i.hh"
17 #include "VISU_Gen_i.hh"
18 #include "VISU_StreamLines_i.hh"
19 #include "VISU_StreamLinesPL.hxx"
20 #include "VISU_Actor.h"
21
22 #include "SalomeApp_Application.h"
23 #include "SalomeApp_SelectionMgr.h"
24
25 #include "SUIT_Desktop.h"
26 #include "SUIT_ResourceMgr.h"
27 #include "SUIT_MessageBox.h"
28
29 #include "SALOME_ListIO.hxx"
30
31 #include "SVTK_ViewWindow.h"
32
33 #include <limits.h>
34 #include <qlayout.h>
35 #include <qgroupbox.h>
36 #include <qcolordialog.h>
37 #include <qtabwidget.h>
38
39 #include <SALOMEDSClient_SObject.hxx>
40 #include <SALOMEDS_SObject.hxx>
41
42 using namespace std;
43
44 VisuGUI_StreamLinesDlg::VisuGUI_StreamLinesDlg (QWidget* parent)
45      : QDialog(parent, "VisuGUI_StreamLinesDlg", false,
46                WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
47 {
48   myPrs = NULL;
49   setCaption(tr("DLG_TITLE"));
50   setSizeGripEnabled(TRUE);
51
52   QVBoxLayout* aBoxLayout = new QVBoxLayout(this);
53   aBoxLayout->setSpacing( 6 );
54   aBoxLayout->setMargin( 11 );
55
56   QTabWidget* aTabBox = new QTabWidget(this);
57
58   QFrame* aTopBox = new QFrame(this);
59   aTopBox->setMargin( 11 );
60   QGridLayout* TopLayout = new QGridLayout( aTopBox );
61   TopLayout->setAlignment( Qt::AlignTop );
62   TopLayout->setSpacing( 8 );
63   TopLayout->setMargin( 11 );
64
65   // Source box
66   QGroupBox* aSourceBox = new QGroupBox (tr("SOURCE_GRP"), aTopBox);
67   aSourceBox->setColumnLayout(0, Qt::Vertical);
68   QGridLayout* aSrcLayout = new QGridLayout( aSourceBox->layout() );
69   aSrcLayout->setSpacing( 6 );
70   aSrcLayout->setMargin( 0 );
71
72   QLabel* aTypeLbl = new QLabel( tr( "LBL_SOURCE_TYPE" ), aSourceBox);
73   aSrcLayout->addWidget(aTypeLbl, 0, 0);
74
75   myUseSrcCombo = new QComboBox(aSourceBox);
76   const char* aChoise[] = { "None", "Entity", "Family", "Group", "Presentation", 0 };
77   myUseSrcCombo->insertStrList(aChoise);
78   aSrcLayout->addWidget(myUseSrcCombo, 0, 1);
79
80   mySrcCombo = new QComboBox(aSourceBox);
81   mySrcCombo->setEnabled((myUseSrcCombo->currentItem() == 0));
82
83   connect(myUseSrcCombo, SIGNAL(activated(int)), this, SLOT(onSourceTypeChange(int)));
84
85   // Find All prs obj
86 /*
87   SUIT_Study* aActiveStudy =  VisuGUI::GetActiveStudy();
88   SalomeApp_SelectionMgr* aSel = VisuGUI::application()->selectionMgr();
89   SALOME_ListIO selected; aSel->selectedObjects( selected );
90   if( selected.Extent() > 0 ) {
91     Handle(SALOME_InteractiveObject) aIO = selected.First();
92     if (aIO->hasEntry()){
93       SALOMEDSClient_SObject* aSObject = VisuGUI::GetStudyDocument()->FindObjectID(aIO->getEntry());
94       aSObject = aSObject->GetFather();
95       aSObject = aSObject->GetFather();
96       aSObject = aSObject->GetFather();
97       aSObject = aSObject->GetFather();
98       mySelectionObj = aSObject;
99       CORBA::Object_var anObject = VISU::ClientSObjectToObject( mySelectionObj );
100       VISU::Result_var aResult;
101       if (CORBA::is_nil(anObject)) {
102         mySelectionObj = mySelectionObj->GetFather();
103       }
104       SALOMEDSClient_ChildIterator* aIter = VisuGUI::GetStudyDocument()->NewChildIterator( mySelectionObj );
105
106       for (aIter->InitEx(true); aIter->More(); aIter->Next() ) {
107         SALOMEDSClient_SObject* aChildSObj = aIter->Value();
108         CORBA::Object_var aChildObject = VISU::ClientSObjectToObject( aChildSObj );
109
110         if(!CORBA::is_nil( aChildObject ) ) {
111           VISU::Prs3d_var aPrsObj = VISU::Prs3d::_narrow( aChildObject );
112           if( !CORBA::is_nil( aPrsObj ) ) { // if this is a Prs object
113             if ((aPrsObj->GetType() != VISU::TSTREAMLINES) &&
114                 (aPrsObj->GetType() != VISU::TMESH)) {
115               SALOMEDSClient_GenericAttribute* anAttr;
116               if ( aChildSObj->FindAttribute(anAttr, "AttributeName") ) {
117                 SALOMEDSClient_AttributeName* aName = dynamic_cast<SALOMEDSClient_AttributeName*>( anAttr );
118                 myPrsLst += QString(aName->Value());
119                 myPrsList.append(aPrsObj);
120                 continue;
121               }
122             }
123           }
124         }
125         // else { // This is not a Prs object
126         SALOMEDSClient_GenericAttribute* anAttr;
127         if (aChildSObj->FindAttribute(anAttr, "AttributeComment")) {
128           SALOMEDSClient_AttributeComment* aComment = dynamic_cast<SALOMEDSClient_AttributeComment*>( anAttr );
129           string aComm = aComment->Value();
130           QString strIn(aComm.c_str());
131           VISU::Storable::TRestoringMap aMap;
132           VISU::Storable::StrToMap(strIn,aMap);
133           bool isExist;
134           VISU::VISUType aType = (VISU::VISUType)VISU::Storable::FindValue(aMap,"myType",&isExist).toInt();
135           if (isExist) {
136             if ((aType == VISU::TFAMILY) || (aType == VISU::TGROUP) || (aType == VISU::TENTITY)) {
137               SALOMEDSClient_GenericAttribute* aNameAttr;
138               if ( aChildSObj->FindAttribute(aNameAttr, "AttributeName") ) {
139                 SALOMEDSClient_AttributeName* aName = dynamic_cast<SALOMEDSClient_AttributeName*>( aNameAttr );
140                 VISU::Prs3d_var aPrsObj = VISU::Prs3d::_narrow( aChildObject );
141                 switch(aType) {
142                 case VISU::TFAMILY:
143                   myFamilisLst += QString(aName->Value());
144                   myFamilyList.append(aPrsObj);
145                   break;
146                 case VISU::TGROUP:
147                   myGroupsLst += QString(aName->Value());
148                   myGroupList.append(aPrsObj);
149                   break;
150                 case VISU::TENTITY:
151                   myEntitiesLst += QString(aName->Value());
152                   myEntityList.append(aPrsObj);
153                   break;
154                 }
155               }
156             }
157           }
158         }
159       }
160     }
161   }
162 */
163   //  connect(myUseSrcChk, SIGNAL(toggled(bool)), mySrcCombo, SLOT(setEnabled(bool)));
164   aSrcLayout->addMultiCellWidget(mySrcCombo, 1, 1, 0, 1);
165
166   QLabel* aPercentLbl = new QLabel (tr("LBL_USED_POINTS"), aSourceBox);
167   aSrcLayout->addWidget(aPercentLbl, 2, 0);
168
169   myPntPercent = new QtxDblSpinBox( 0, 1, 0.1, aSourceBox );
170   aSrcLayout->addWidget(myPntPercent, 2, 1);
171
172   TopLayout->addMultiCellWidget(aSourceBox, 0, 0, 0, 1);
173
174   QLabel* aStepLenLbl = new QLabel (tr("LBL_STEP_LENGTH"), aTopBox);
175   TopLayout->addWidget(aStepLenLbl, 1, 0);
176   myStepLen = new QtxDblSpinBox( DBL_MIN, DBL_MAX, 0.1, aTopBox );
177   myStepLen->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
178   TopLayout->addWidget(myStepLen, 1, 1);
179   connect(myStepLen, SIGNAL(valueChanged(double)), this, SLOT(StepLengthChanged(double)));
180
181   QLabel* aIntegStepLenLbl = new QLabel (tr("LBL_INTEGRATION_STEP"), aTopBox);
182   TopLayout->addWidget(aIntegStepLenLbl, 2, 0);
183   myIntegStepLen = new QtxDblSpinBox( DBL_MIN, DBL_MAX, 0.1, aTopBox );
184   myIntegStepLen->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
185   TopLayout->addWidget(myIntegStepLen, 2, 1);
186   connect(myIntegStepLen, SIGNAL(valueChanged(double)), this, SLOT(IntegrationStepChanged(double)));
187
188   QLabel* aPropagationLbl = new QLabel (tr("LBL_PROPAGATION_TIME"), aTopBox);
189   TopLayout->addWidget(aPropagationLbl, 3, 0);
190   myPropTime = new QtxDblSpinBox( DBL_MIN, DBL_MAX, 1, aTopBox );
191   myPropTime->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
192   TopLayout->addWidget(myPropTime, 3, 1);
193   connect(myPropTime, SIGNAL(valueChanged(double)), this, SLOT(PropagationTimeChanged(double)));
194
195   QLabel* aDirLbl = new QLabel (tr("LBL_DIRECTION"),aTopBox);
196   TopLayout->addWidget(aDirLbl, 4, 0);
197   myDirCombo = new QComboBox(aTopBox);
198   myDirCombo->insertItem("Forward");
199   myDirCombo->insertItem("Backward");
200   myDirCombo->insertItem("Both");
201   TopLayout->addWidget(myDirCombo, 4, 1);
202
203   myUseScalar = new QCheckBox (tr("MAGNITUDE_COLORING_CHK"), aTopBox, "UseMagn");
204   connect( myUseScalar, SIGNAL( clicked() ), this, SLOT( enableSetColor() ) );
205   TopLayout->addWidget(myUseScalar, 5, 0);
206
207   SelColor = new QPushButton (tr("USE_COLOR_BTN"), aTopBox, "SelColor");
208   connect( SelColor,     SIGNAL( clicked() ), this, SLOT( setVColor() ) );
209   TopLayout->addWidget( SelColor, 5, 1);
210
211   aTabBox->addTab(aTopBox, "Stream Lines");
212   myScalarPane = new VisuGUI_ScalarBarPane(this, false);
213   myScalarPane->setMargin( 5 );
214   aTabBox->addTab(myScalarPane, "Scalar Bar");
215
216   aBoxLayout->addWidget(aTabBox);
217
218   QGroupBox* aGroupButtons = new QGroupBox( this, "GroupButtons" );
219   aGroupButtons->setColumnLayout(0, Qt::Vertical );
220   aGroupButtons->layout()->setSpacing( 0 );
221   aGroupButtons->layout()->setMargin( 0 );
222
223   QGridLayout* aGroupButtonsLayout = new QGridLayout( aGroupButtons->layout() );
224   aGroupButtonsLayout->setAlignment( Qt::AlignTop );
225   aGroupButtonsLayout->setSpacing( 6 );
226   aGroupButtonsLayout->setMargin( 11 );
227
228   QPushButton* aOkBtn = new QPushButton( tr( "&OK" ), aGroupButtons, "buttonOk" );
229   aOkBtn->setAutoDefault( TRUE );
230   aOkBtn->setDefault( TRUE );
231   aGroupButtonsLayout->addWidget( aOkBtn, 0, 0 );
232   aGroupButtonsLayout->addItem( new QSpacerItem( 5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum ), 0, 1 );
233
234   QPushButton* aCancelBtn = new QPushButton( tr( "&Cancel" ) , aGroupButtons, "buttonCancel" );
235   aCancelBtn->setAutoDefault( TRUE );
236   aGroupButtonsLayout->addWidget( aCancelBtn, 0, 2 );
237   connect( aOkBtn,     SIGNAL( clicked() ), this, SLOT( accept() ) );
238   connect( aCancelBtn, SIGNAL( clicked() ), this, SLOT( reject() ) );
239
240   aBoxLayout->addWidget(aGroupButtons);
241
242   enableSetColor();
243 }
244
245
246
247 void VisuGUI_StreamLinesDlg::initFromPrsObject (VISU::StreamLines_i* thePrs)
248 {
249   myScalarPane->initFromPrsObject(thePrs);
250
251   myPrs = thePrs;
252   static int aNbOfSteps = 30;
253   VISU_StreamLinesPL* aStreamLinesPL = thePrs->GetStreamLinesPL();
254   float aMin, aMax;
255   aMin = aStreamLinesPL->GetMinPropagationTime();
256   aMax = aStreamLinesPL->GetMaxPropagationTime();
257   myPropTime->setRange(aMin,aMax);
258   myPropTime->setValue(aStreamLinesPL->GetPropagationTime());
259   myPropTime->setLineStep((aMax-aMin)/aNbOfSteps);
260
261   aMin = aStreamLinesPL->GetMinStepLength();
262   aMax = aStreamLinesPL->GetMaxStepLength();
263   myStepLen->setRange(aMin,aMax);
264   myStepLen->setValue(aStreamLinesPL->GetStepLength());
265   myStepLen->setLineStep((aMax-aMin)/aNbOfSteps);
266
267   aMin = aStreamLinesPL->GetMinIntegrationStep();
268   aMax = aStreamLinesPL->GetMaxIntegrationStep();
269   myIntegStepLen->setRange(aMin,aMax);
270   myIntegStepLen->setValue(aStreamLinesPL->GetIntegrationStep());
271   myIntegStepLen->setLineStep((aMax-aMin)/aNbOfSteps);
272
273   switch (thePrs->GetDirection()) {
274   case VISU::StreamLines::FORWARD:
275     myDirCombo->setCurrentItem(0);
276     break;
277   case VISU::StreamLines::BACKWARD:
278     myDirCombo->setCurrentItem(1);
279     break;
280   case VISU::StreamLines::BOTH:
281     myDirCombo->setCurrentItem(2);
282   }
283   myUseScalar->setChecked(thePrs->IsColored());
284   myPntPercent->setValue(thePrs->GetUsedPoints());
285
286   mySrcCombo->setEnabled(false);
287   QString aSrcEntry = thePrs->GetSourceEntry();
288
289   SALOMEDS::Color anOldColor = thePrs->GetColor();
290   QColor aColor = QColor(int(255*anOldColor.R),int(255*anOldColor.G),int(255*anOldColor.B));
291   setColor(aColor);
292   enableSetColor();
293
294 #define INITPRS(PRSLIST, PRSNUM) \
295     for (int i = 0; i < PRSLIST.count(); i++) { \
296       VISU::Prs3d_i* aPrs = dynamic_cast<VISU::Prs3d_i*>(VISU::GetServant(PRSLIST[i]).in()); \
297       if (aPrs == NULL) continue; \
298       if (aSrcEntry == aPrs->GetEntry()) { \
299         onSourceTypeChange(PRSNUM); \
300         myUseSrcCombo->setCurrentItem(PRSNUM); \
301         mySrcCombo->setEnabled(true); \
302         mySrcCombo->setCurrentItem(i); \
303         return; \
304       } \
305     }
306
307   if (!aSrcEntry.isEmpty()) {
308     INITPRS(myEntityList, 1);
309     INITPRS(myFamilyList, 2);
310     INITPRS(myGroupList, 3);
311     INITPRS(myPrsList, 4);
312   }
313 #undef INITPRS
314 }
315
316 int VisuGUI_StreamLinesDlg::storeToPrsObject (VISU::StreamLines_i* thePrs)
317 {
318   bool isAccepted = myScalarPane->storeToPrsObject(thePrs);
319   if (isAccepted) {
320     thePrs->ShowColored(myUseScalar->isChecked());
321     if (!thePrs->IsColored()) {
322       SALOMEDS::Color aColor;
323       aColor.R = myColor.red()/255.;
324       aColor.G = myColor.green()/255.;
325       aColor.B = myColor.blue()/255.;
326       thePrs->SetColor(aColor);
327     }
328
329     VISU::StreamLines::Direction aDirection = VISU::StreamLines::BOTH;
330     switch (myDirCombo->currentItem()) {
331     case 0:
332       aDirection = VISU::StreamLines::FORWARD;
333       break;
334     case 1:
335       aDirection = VISU::StreamLines::BACKWARD;
336       break;
337     case 2:
338       aDirection = VISU::StreamLines::BOTH;
339     }
340
341     VISU::Prs3d_var aPrs;
342     int aSrcSelection = myUseSrcCombo->currentItem();
343     int aSrcItem = (mySrcCombo->count() > 0)? mySrcCombo->currentItem() : -1;
344     if ((aSrcSelection > 0) && (aSrcItem > -1)) {
345       VISU::VISUType aType;
346       QString aName;
347       switch (aSrcSelection) {
348       case 1: // Entity
349         aPrs = myEntityList[aSrcItem];
350         aType = VISU::TENTITY;
351         aName = myEntitiesLst[aSrcItem];
352         break;
353       case 2: // Family
354         aPrs = myFamilyList[aSrcItem];
355         aType = VISU::TFAMILY;
356         aName = myFamilisLst[aSrcItem];
357         break;
358       case 3: // Group
359         aPrs = myGroupList[aSrcItem];
360         aType = VISU::TGROUP;
361         aName = myGroupsLst[aSrcItem];
362         break;
363       case 4: // Presentation
364         aPrs = myPrsList[aSrcItem];
365         break;
366       }
367       if (CORBA::is_nil(aPrs) && aSrcSelection != 4) {
368         aPrs = createMesh(aType, aName);
369       }
370     }
371     isAccepted = thePrs->SetParams(myIntegStepLen->value(),
372                                    myPropTime->value(),
373                                    myStepLen->value(),
374                                    aPrs,
375                                    myPntPercent->value(),
376                                    aDirection);
377   }
378   //if (!isAccepted)
379   //  SUIT_MessageBox::warn1(VisuGUI::application()->desktop(), tr("WRN_VISU"),
380   //                         tr("ERR_CANT_BUILD_PRESENTATION"),
381   //                         tr("BUT_OK"));
382   return isAccepted;
383 }
384
385 /*!
386   Sets color
387 */
388 void VisuGUI_StreamLinesDlg::setColor( QColor color )
389 {
390   myColor = color;
391   SelColor->setPaletteBackgroundColor(myColor);
392 }
393
394
395 /*!
396   Called when "Select Color" buttonx clicked
397 */
398 void VisuGUI_StreamLinesDlg::setVColor()
399 {
400   QColor cnew = QColorDialog::getColor( myColor, this );
401   if ( cnew.isValid() )
402     setColor( cnew );
403 }
404
405
406 /*!
407   Enbled/disables magnitude coloring
408 */
409 void VisuGUI_StreamLinesDlg::enableMagnColor( bool enable )
410 {
411   myUseScalar->setEnabled( enable );
412   enableSetColor();
413 }
414
415 /*!
416   Called when "Magnitude Coloring" check box clicked
417 */
418 void VisuGUI_StreamLinesDlg::enableSetColor()
419 {
420   SelColor->setEnabled(!myUseScalar->isChecked() );
421 }
422
423 void VisuGUI_StreamLinesDlg::StepLengthChanged(double theValue){
424 }
425
426 void VisuGUI_StreamLinesDlg::IntegrationStepChanged(double theValue) {
427 }
428
429 void VisuGUI_StreamLinesDlg::PropagationTimeChanged(double theValue) {
430   myStepLen->setMaxValue(theValue);
431 }
432
433 void VisuGUI_StreamLinesDlg::onSourceTypeChange(int theIndex) {
434   mySrcCombo->clear();
435   if (theIndex == 0) {
436     mySrcCombo->setEnabled(false);
437     return;
438   } else
439     mySrcCombo->setEnabled(true);
440
441   switch(theIndex) {
442   case 1: // Entity
443     mySrcCombo->insertStringList(myEntitiesLst);
444     return;
445   case 2: // Family
446     mySrcCombo->insertStringList(myFamilisLst);
447     return;
448   case 3: // Group
449     mySrcCombo->insertStringList(myGroupsLst);
450     return;
451   case 4: // Presentation
452     mySrcCombo->insertStringList(myPrsLst);
453     return;
454   }
455 }
456
457
458 VISU::Mesh_ptr VisuGUI_StreamLinesDlg::createMesh (VISU::VISUType theType, QString theName)
459 {
460   return VISU::Mesh::_nil();
461 /*
462   CORBA::Object_var anObject = VISU::ClientSObjectToObject(mySelectionObj);
463   VISU::Result_var aResult;
464   if (!CORBA::is_nil(anObject)) {
465     aResult = VISU::Result::_narrow(anObject);
466   }
467   if (CORBA::is_nil(aResult)) {
468     SUIT_MessageBox::warn1(VisuGUI::application()->desktop(), tr("VISU_WARNING"),
469                            tr("WRN_NO_AVAILABLE_DATA"),
470                            tr("VISU_BUT_OK"));
471     return VISU::Mesh::_nil();
472   }
473   SALOMEDSClient_ChildIterator* aIter = VisuGUI::GetStudyDocument()->NewChildIterator( mySelectionObj );
474   VISU::Storable::TRestoringMap aMap;
475
476   for (aIter->InitEx(true); aIter->More(); aIter->Next() ) {
477     SALOMEDSClient_SObject* aChildSObj = aIter->Value();
478     SALOMEDSClient_GenericAttribute* anAttr;
479     if (aChildSObj->FindAttribute(anAttr, "AttributeComment")) {
480       SALOMEDSClient_AttributeComment* aComment = dynamic_cast<SALOMEDSClient_AttributeComment*>( anAttr );
481       CORBA::String_var aComm = aComment->Value().c_str();
482       QString strIn(aComm.in());
483       aMap.clear();
484       VISU::Storable::StrToMap(strIn,aMap);
485       bool isExist;
486       VISU::VISUType aType = (VISU::VISUType)VISU::Storable::FindValue(aMap,"myType",&isExist).toInt();
487       if (isExist) {
488         if (aType != theType) continue;
489
490         SALOMEDSClient_GenericAttribute* aNameAttr;
491         if ( aChildSObj->FindAttribute(aNameAttr, "AttributeName") ) {
492           SALOMEDSClient_AttributeName* aName = dynamic_cast<SALOMEDSClient_AttributeName*>(aNameAttr);
493           if (QString(aName->Value()) == theName) break; //use current map
494         }
495       }
496     }
497   }
498   VISU::Mesh_var aMesh;
499   QString aMeshName = VISU::Storable::FindValue(aMap,"myMeshName");
500   switch (theType) {
501   case VISU::TFAMILY:
502     {
503       VISU::Entity anEntity = (VISU::Entity)VISU::Storable::FindValue(aMap,"myEntityId").toInt();
504       aMesh = VisuGUI::GetVisuGen()->FamilyMeshOnEntity(aResult,aMeshName.latin1(),anEntity,theName.latin1());
505     }
506     break;
507   case VISU::TGROUP:
508     {
509       aMesh = VisuGUI::GetVisuGen()->GroupMesh(aResult,aMeshName.latin1(), theName.latin1());
510     }
511     break;
512   case VISU::TENTITY:
513     {
514       VISU::Entity anEntity = (VISU::Entity)VISU::Storable::FindValue(aMap,"myId").toInt();
515       aMesh = VisuGUI::GetVisuGen()->MeshOnEntity(aResult,aMeshName.latin1(),anEntity);
516     }
517     break;
518   }
519   if(!CORBA::is_nil(aMesh)){ // Create Actor
520     VISU::Mesh_i* pPresent = dynamic_cast<VISU::Mesh_i*>(VISU::GetServant(aMesh).in());
521     if(VTKViewer_ViewWindow* vf = VisuGUI::GetVtkViewWindow()){
522       try{
523         pPresent->SetPresentationType(VISU::POINT);
524         VISU_Actor *anActor = pPresent->CreateActor();
525         vf->AddActor(anActor);
526       }catch(...){
527         SUIT_MessageBox::warn1 ( VisuGUI::application()->desktop(), tr("VISU_WARNING"),
528                                 tr("ERR_CANT_CREATE_ACTOR"),
529                                 tr("VISU_BUT_OK") );
530       }
531     }
532   } else {
533     SUIT_MessageBox::warn1(VisuGUI::application()->desktop(), tr("VISU_WARNING"),
534                            tr("ERR_CANT_BUILD_PRESENTATION"),
535                            tr("VISU_BUT_OK"));
536   }
537   return aMesh._retn();
538 */
539 }
540
541 void VisuGUI_StreamLinesDlg::accept() {
542   if (myScalarPane->check())
543     QDialog::accept();
544 }