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