1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // VISU VISUGUI : GUI of VISU component
23 // File : VisuGUI_Selection.cxx
24 // Author : Sergey Anikin
27 #include "VisuGUI_Selection.h"
29 #include "VisuGUI_ViewTools.h"
30 #include "VisuGUI_Tools.h"
32 #include "VISU_Result_i.hh"
33 #include "VISU_Gen_i.hh"
35 #include "VISU_Actor.h"
36 #include "VISU_ScalarMapAct.h"
37 #include "VISU_GaussPtsAct.h"
39 #include "SalomeApp_Study.h"
40 #include "LightApp_Study.h"
41 #include "LightApp_Displayer.h"
45 //////////////////////////////////////////////////
46 // Class: VisuGUI_Selection
47 //////////////////////////////////////////////////
50 //---------------------------------------------------------------
51 QVariant VisuGUI_Selection::parameter( const int ind, const QString& p ) const
53 QVariant val( LightApp_Selection::parameter( ind, p ) );
54 if ( !val.isValid() ) {
55 if ( p == "type" ) val = QVariant( type( ind ) );
56 else if ( p == "nbComponents" ) val = QVariant( nbComponents( ind ) );
57 else if ( p == "medEntity" ) val = QVariant( medEntity( ind ) );
58 else if ( p == "medSource" ) val = QVariant( medSource( ind ) );
59 else if ( p == "representation" ) val = QVariant( representation( ind ) );
60 else if ( p == "nbTimeStamps" ) val = QVariant( nbTimeStamps( ind ) );
61 else if ( p == "nbChildren" ) val = QVariant( nbChildren( ind ) );
62 else if ( p == "nbNamedChildren") val = QVariant( nbNamedChildren( ind ) );
63 else if ( p == "isVisible" ) val = QVariant( isVisible( ind ) );
64 else if ( p == "isShrunk" ) val = QVariant( isShrunk( ind ) );
65 else if ( p == "hasActor" ) val = QVariant( hasActor( ind ) );
66 else if ( p == "isShading" ) val = QVariant( isShading( ind ) );
67 else if ( p == "isScalarMapAct" ) val = QVariant( isScalarMapAct( ind ) );
68 else if ( p == "isGaussPtsAct" ) val = QVariant( isGaussPtsAct( ind ) );
69 else if ( p == "isVisuComponent") val = QVariant( isVisuComponent( ind ) );
70 else if ( p == "fullResolution" ) val = QVariant( fullResolution( ind ) );
71 else if ( p == "mediumResolution" ) val = QVariant( mediumResolution( ind ) );
72 else if ( p == "lowResolution" ) val = QVariant( lowResolution( ind ) );
73 else if ( p == "resolutionState" ) val = QVariant( resolutionState( ind ) );
74 else if ( p == "isThereAreVisibleCurves" ) val = QVariant( findDisplayedCurves( ind, false ) );
75 else if ( p == "isThereAreHiddenCurves" ) val = QVariant( findDisplayedCurves( ind, true ) );
76 else if ( p == "hasCurves" ) val = QVariant( hasCurves( ind ) );
77 else if ( p == "isPlot2dViewer" ) val = QVariant( Plot2dViewerType( ind ) );
78 else if ( p == "isValuesLabeled" ) val = QVariant( isValuesLabeled( ind ) );
79 else if ( p == "isScalarBarVisible" ) val = QVariant( isScalarBarVisible( ind ) );
80 else if ( p == "quadratic2DMode" ) val = QVariant( quadratic2DMode(ind) );
87 //---------------------------------------------------------------
88 // Macro for converting VISU enumeration items into corresponding strings
89 #define ENUM2STRING( x, y ) \
94 QString VisuGUI_Selection::type( const int ind ) const
97 SalomeApp_Study* aStudy = GetStudy();
101 VISU::TObjectInfo anObjectInfo = VISU::GetObjectByEntry(aStudy, (const char*)entry( ind ).toLatin1());
102 VISU::Storable::TRestoringMap aMap = VISU::Storable::GetStorableMap(anObjectInfo.mySObject);
104 VISU::Base_i* aBase = anObjectInfo.myBase;
106 VISU::VISUType aType = aBase->GetType();
107 if(aType == VISU::TCOLOREDPRS3DHOLDER){
108 CORBA::Object_var anObject = ClientSObjectToObject(anObjectInfo.mySObject);
109 VISU::ColoredPrs3dHolder_var aHolder = VISU::ColoredPrs3dHolder::_narrow(anObject);
110 aType = aHolder->GetPrsType();
113 ENUM2STRING( aResStr, VISU::TVISUGEN );
114 ENUM2STRING( aResStr, VISU::TRESULT );
115 ENUM2STRING( aResStr, VISU::TTABLE );
116 ENUM2STRING( aResStr, VISU::TCURVE );
117 ENUM2STRING( aResStr, VISU::TCONTAINER );
118 ENUM2STRING( aResStr, VISU::TMESH );
119 ENUM2STRING( aResStr, VISU::TSCALARMAP );
120 ENUM2STRING( aResStr, VISU::TISOSURFACES );
121 ENUM2STRING( aResStr, VISU::TDEFORMEDSHAPE );
122 ENUM2STRING( aResStr, VISU::TSCALARMAPONDEFORMEDSHAPE );
123 ENUM2STRING( aResStr, VISU::TCUTPLANES );
124 ENUM2STRING( aResStr, VISU::TCUTLINES );
125 ENUM2STRING( aResStr, VISU::TCUTSEGMENT );
126 ENUM2STRING( aResStr, VISU::TVECTORS );
127 ENUM2STRING( aResStr, VISU::TSTREAMLINES );
128 ENUM2STRING( aResStr, VISU::TPLOT3D );
129 ENUM2STRING( aResStr, VISU::TANIMATION );
130 ENUM2STRING( aResStr, VISU::TPOINTMAP3D );
134 if(aResStr.isNull()){
135 VISU::VISUType aType = VISU::Storable::RestoringMap2Type(aMap);
137 ENUM2STRING( aResStr, VISU::TENTITY );
138 ENUM2STRING( aResStr, VISU::TFAMILY );
139 ENUM2STRING( aResStr, VISU::TGROUP );
140 ENUM2STRING( aResStr, VISU::TVIEW3D );
141 ENUM2STRING( aResStr, VISU::TFIELD );
142 ENUM2STRING( aResStr, VISU::TTIMESTAMP );
146 if(aResStr.isNull()){
148 QString aVal = VISU::Storable::FindValue(aMap, "myComment", &anIsExist);
149 if ( anIsExist && aVal != "MESH" )
150 aResStr = "VISU::T" + aVal;
157 //---------------------------------------------------------------
158 QString VisuGUI_Selection::nbComponents( const int ind ) const
161 SalomeApp_Study* aStudy = GetStudy();
165 VISU::TObjectInfo anObjectInfo = VISU::GetObjectByEntry(aStudy, (const char*)entry( ind ).toLatin1());
166 VISU::Storable::TRestoringMap aMap = VISU::Storable::GetStorableMap(anObjectInfo.mySObject);
169 QString aVal = VISU::Storable::FindValue(aMap,"myNumComponent",&isExist);
176 //---------------------------------------------------------------
177 QString VisuGUI_Selection::resolutions( const int ind ) const
180 SalomeApp_Study* aStudy = GetStudy();
184 VISU::TObjectInfo anObjectInfo = VISU::GetObjectByEntry(aStudy, entry( ind ).toLatin1().data());
185 VISU::Storable::TRestoringMap aMap = VISU::Storable::GetStorableMap(anObjectInfo.mySObject);
188 QString aVal = VISU::Storable::FindValue(aMap,"myResolutions",&isExist);
196 //---------------------------------------------------------------
197 QString VisuGUI_Selection::resolution( const int ind, char theResoltuion ) const
201 QString aResolutions = resolutions( ind );
202 if(aResolutions.isEmpty())
205 if(aResolutions.indexOf(theResoltuion) != -1)
214 //---------------------------------------------------------------
215 QString VisuGUI_Selection::fullResolution( const int ind ) const
217 return resolution( ind, 'F');
221 //---------------------------------------------------------------
222 QString VisuGUI_Selection::mediumResolution( const int ind ) const
224 return resolution( ind, 'M');
228 //---------------------------------------------------------------
229 QString VisuGUI_Selection::lowResolution( const int ind ) const
231 return resolution( ind, 'L');
235 //---------------------------------------------------------------
236 QString VisuGUI_Selection::resolutionState( const int ind ) const
239 SalomeApp_Study* aStudy = GetStudy();
243 VISU::TObjectInfo anObjectInfo = VISU::GetObjectByEntry(aStudy, entry( ind ).toLatin1().data());
244 VISU::Storable::TRestoringMap aMap = VISU::Storable::GetStorableMap(anObjectInfo.mySObject);
247 QString aVal = VISU::Storable::FindValue(aMap,"myState",&isExist);
249 if ( aVal.toInt() == VISU::Result::FULL )
251 if ( aVal.toInt() == VISU::Result::MEDIUM )
253 if ( aVal.toInt() == VISU::Result::LOW )
255 if ( aVal.toInt() == VISU::Result::HIDDEN )
263 //---------------------------------------------------------------
264 QString VisuGUI_Selection::medEntity( const int ind ) const
266 SalomeApp_Study* aStudy = GetStudy();
270 VISU::TObjectInfo anObjectInfo = VISU::GetObjectByEntry(aStudy, (const char*)entry( ind ).toLatin1());
271 VISU::Storable::TRestoringMap aMap = VISU::Storable::GetStorableMap(anObjectInfo.mySObject);
274 QString aVal = VISU::Storable::FindValue(aMap,"myEntityId",&isExist);
276 using namespace VISU;
277 TEntity anEntityId = TEntity(aVal.toInt());
280 return "NODE_ENTITY";
282 return "EDGE_ENTITY";
284 return "FACE_ENTITY";
286 return "CELL_ENTITY";
294 QString VisuGUI_Selection::medSource( const int ind ) const
296 _PTR(Study) aStudyDS = GetStudy()->studyDS();
297 if(_PTR(SObject) aSObject = aStudyDS->FindObjectID((const char*)entry(ind).toLatin1())){
298 VISU::Result_var aRes;
299 if(VISU::Result_i* aResult = CheckResult(myModule,aSObject,aRes)){
300 using namespace VISU;
301 Result_i::ECreationId aCreationId = aResult->GetCreationId();
303 case Result_i::eImportFile :
304 return "eImportFile";
305 case Result_i::eCopyAndImportFile :
306 return "eCopyAndImportFile";
307 case Result_i::eImportMed :
309 case Result_i::eImportMedField :
310 return "eImportMedField";
319 QString VisuGUI_Selection::nbTimeStamps( const int ind ) const
322 SalomeApp_Study* aStudy = GetStudy();
326 VISU::TObjectInfo anObjectInfo = VISU::GetObjectByEntry(aStudy, (const char*)entry( ind ).toLatin1());
327 VISU::Storable::TRestoringMap aMap = VISU::Storable::GetStorableMap(anObjectInfo.mySObject);
330 const QString& aVal = VISU::Storable::FindValue(aMap,"myNbTimeStamps",&isExist);
337 //----------------------------------------------------------------------------
338 template<class TPopupFunctor>
339 struct TPopupDispatcher
342 operator()(const SalomeApp_Module* theModule,
343 const QString& theEntry)
345 if(SUIT_ViewManager* aViewManager = theModule->getApp()->activeViewManager()){
346 QString aType = aViewManager->getType();
347 TPopupFunctor aFunctor;
348 if(aType == SVTK_Viewer::Type())
349 return aFunctor.template Get<SVTK_Viewer>(theModule, theEntry);
350 //else if(aType == VVTK_Viewer::Type())
351 //return aFunctor.template Get<VVTK_Viewer>(theModule, theEntry);
358 //----------------------------------------------------------------------------
359 template<class TViewer>
361 GetPrs3dSelectionInfo(const SalomeApp_Module* theModule,
362 const QString& theEntry,
363 VISU::Prs3d_i*& thePrs3d,
364 SVTK_ViewWindow*& theViewWindow,
365 VISU_Actor*& thenActor)
367 VISU::TObjectInfo anObjectInfo = VISU::GetObjectByEntry(GetAppStudy(theModule), (const char*)theEntry.toLatin1());
368 thePrs3d = GetPrs3dFromBase(anObjectInfo.myBase);
372 typedef typename TViewer::TViewWindow TViewWindow;
373 theViewWindow = GetActiveViewWindow<TViewWindow>(theModule);
377 thenActor = FindActor(theViewWindow, thePrs3d);
385 //----------------------------------------------------------------------------
388 template<class TViewer>
390 Get(const SalomeApp_Module* theModule,
391 const QString& theEntry)
393 VISU_Actor* anActor = NULL;
394 VISU::Prs3d_i* aPrs3d = NULL;
395 VISU_ActorBase* anActorBase = NULL;
396 VISU::PointMap3d_i* aPointMap3d = NULL;
397 SVTK_ViewWindow* aViewWindow = NULL;
398 if(GetPrs3dSelectionInfo<TViewer>(theModule, theEntry, aPrs3d, aViewWindow, anActor))
399 return get(aPrs3d, aViewWindow, anActor);
401 aViewWindow = GetActiveViewWindow<SVTK_ViewWindow>(theModule);
402 VISU::TSelectionInfo aSelectionInfo = VISU::GetSelectedObjects(theModule);
403 if ( aSelectionInfo.empty() )
405 VISU::TSelectionItem aSelectionItem = aSelectionInfo.front();
406 aPointMap3d = dynamic_cast<VISU::PointMap3d_i*>(aSelectionItem.myObjectInfo.myBase);
407 anActorBase = VISU::FindActorBase(aViewWindow, aPointMap3d);
408 return getPointMap(aPointMap3d, aViewWindow, anActorBase);
414 get(VISU::Prs3d_i* thePrs3d,
415 SVTK_ViewWindow* theViewWindow,
416 VISU_Actor* theActor)
423 getPointMap(VISU::PointMap3d_i* thePrs3d,
424 SVTK_ViewWindow* theViewWindow,
425 VISU_ActorBase* theActor)
432 //----------------------------------------------------------------------------
433 struct TGetRepesentationFunctor: TViewFunctor
437 get(VISU::Prs3d_i* thePrs3d,
438 SVTK_ViewWindow* theViewWindow,
439 VISU_Actor* theActor)
442 switch (theActor->GetRepresentation()) {
443 ENUM2STRING( aResStr, VISU::POINT );
444 ENUM2STRING( aResStr, VISU::WIREFRAME );
445 ENUM2STRING( aResStr, VISU::SHADED );
446 ENUM2STRING( aResStr, VISU::INSIDEFRAME );
447 ENUM2STRING( aResStr, VISU::SURFACEFRAME );
448 ENUM2STRING( aResStr, VISU::FEATURE_EDGES );
455 getPointMap(VISU::PointMap3d_i* thePrs3d,
456 SVTK_ViewWindow* theViewWindow,
457 VISU_ActorBase* theActorBase)
459 QString aResStr = "";
461 switch (theActorBase->GetRepresentation()) {
462 ENUM2STRING( aResStr, VISU::WIREFRAME ); // = 1
463 ENUM2STRING( aResStr, VISU::SHADED ); // = 2
470 QString VisuGUI_Selection::representation( const int ind ) const
472 return TPopupDispatcher<TGetRepesentationFunctor>()(myModule, entry(ind));
475 //----------------------------------------------------------------------------
476 SalomeApp_Study* VisuGUI_Selection::GetStudy() const
479 LightApp_Study* aLightStudy = const_cast<LightApp_Study*>( study() );
480 return dynamic_cast<SalomeApp_Study*>( aLightStudy );
483 //----------------------------------------------------------------------------
484 int VisuGUI_Selection::nbChild( const int ind, const bool named ) const
487 SalomeApp_Study* aSStudy = GetStudy();
490 _PTR(Study) aStudy = GetCStudy( aSStudy );
492 _PTR(SObject) SO = aStudy->FindObjectID( (const char*)entry( ind ).toLatin1() );
494 for ( _PTR(ChildIterator) Iter = aStudy->NewChildIterator( SO ); Iter->More(); Iter->Next() ) {
496 if ( !Iter->Value()->ReferencedObject( refSO ) && ( !named || Iter->Value()->GetName().size() ) )
504 //----------------------------------------------------------------------------
505 int VisuGUI_Selection::nbChildren( const int ind ) const
507 return nbChild( ind, false );
510 //----------------------------------------------------------------------------
511 int VisuGUI_Selection::nbNamedChildren( const int ind ) const
513 return nbChild( ind, true );
517 //----------------------------------------------------------------------------
518 struct TIsVisibleFunctor: TViewFunctor
522 get(VISU::Prs3d_i* thePrs3d,
523 SVTK_ViewWindow* theViewWindow,
524 VISU_Actor* theActor)
526 return theActor->GetVisibility() ? "true" : "false";
530 QString VisuGUI_Selection::isVisible( const int ind ) const
532 return TPopupDispatcher<TIsVisibleFunctor>()(myModule, entry(ind));
536 //----------------------------------------------------------------------------
537 struct TIsShrunkFunctor: TViewFunctor
541 get(VISU::Prs3d_i* thePrs3d,
542 SVTK_ViewWindow* theViewWindow,
543 VISU_Actor* theActor)
545 return theActor->IsShrunk() ? "1" : "0";
550 getPointMap(VISU::PointMap3d_i* thePointMap,
551 SVTK_ViewWindow* theViewWindow,
552 VISU_ActorBase* theActorBase)
555 return theActorBase->IsShrunk() ? "1" : "0";
560 QString VisuGUI_Selection::isShrunk( const int ind ) const
562 return TPopupDispatcher<TIsShrunkFunctor>()(myModule, entry(ind));
566 //----------------------------------------------------------------------------
567 bool VisuGUI_Selection::hasActor( const int ind ) const
569 return !representation( ind ).isEmpty();
573 //----------------------------------------------------------------------------
574 struct TIsShadingFunctor: TViewFunctor
578 get(VISU::Prs3d_i* thePrs3d,
579 SVTK_ViewWindow* theViewWindow,
580 VISU_Actor* theActor)
582 if(VISU_ScalarMapAct* anActor = dynamic_cast<VISU_ScalarMapAct*>(theActor))
583 return anActor->IsShading() ? "1" : "0";
588 QString VisuGUI_Selection::isShading( const int ind ) const
590 return TPopupDispatcher<TIsShadingFunctor>()(myModule, entry(ind));
594 //----------------------------------------------------------------------------
595 struct TIsScalarMapActFunctor: TViewFunctor
599 get(VISU::Prs3d_i* thePrs3d,
600 SVTK_ViewWindow* theViewWindow,
601 VISU_Actor* theActor)
603 return dynamic_cast<VISU_ScalarMapAct*>(theActor)? "1" : "0";
608 //---------------------------------------------------------------
609 QString VisuGUI_Selection::isScalarMapAct( const int ind ) const
611 return TPopupDispatcher<TIsScalarMapActFunctor>()(myModule, entry(ind));
614 //----------------------------------------------------------------------------
615 struct TIsGaussPtsActFunctor: TViewFunctor
619 get(VISU::Prs3d_i* thePrs3d,
620 SVTK_ViewWindow* theViewWindow,
621 VISU_Actor* theActor)
623 return dynamic_cast<VISU_GaussPtsAct*>(theActor)? "1" : "0";
628 //---------------------------------------------------------------
629 QString VisuGUI_Selection::isGaussPtsAct( const int ind ) const
631 return TPopupDispatcher<TIsGaussPtsActFunctor>()(myModule, entry(ind));
634 //----------------------------------------------------------------------------
635 bool VisuGUI_Selection::isVisuComponent( const int ind ) const
637 SalomeApp_Study* study = GetStudy();
641 _PTR(SObject) obj = study->studyDS()->FindObjectID( (const char*)entry( ind ).toLatin1() );
644 CORBA::Object_var anObj = VISU::ClientSObjectToObject( obj );
645 if( CORBA::is_nil( anObj ) )
648 return dynamic_cast<VISU::VISU_Gen_i*>( VISU::GetServant( anObj ).in() );
651 //---------------------------------------------------------------------------
652 bool VisuGUI_Selection::findDisplayedCurves( const int ind, bool findHidden ) const
654 // findHidden == false - find at least one Visible curve in the childs of ind
655 // findHidden == true - find at least one Hidden curve in the childs of ind
656 SalomeApp_Study* aSStudy = GetStudy();
661 _PTR(Study) aStudy = GetCStudy( aSStudy );
663 _PTR(SObject) SO = aStudy->FindObjectID( (const char*) entry( ind ).toLatin1() );
665 for ( _PTR(ChildIterator) Iter = aStudy->NewChildIterator( SO ); Iter->More(); Iter->Next() ) {
667 if ( Iter->Value()->ReferencedObject(refSO) )
668 entryId = refSO->GetID().c_str();
670 entryId = Iter->Value()->GetID().c_str();
672 LightApp_Displayer* displayer = LightApp_Displayer::FindDisplayer( myModule->moduleName(), false );
673 if ( displayer->IsDisplayed( entryId ) && findHidden == false )
675 else if ( !displayer->IsDisplayed( entryId ) && findHidden == true )
683 //---------------------------------------------------------------------------
684 bool VisuGUI_Selection::hasCurves( const int ind ) const
686 SalomeApp_Study* aSStudy = GetStudy();
691 _PTR(Study) aStudy = GetCStudy( aSStudy );
693 _PTR(SObject) SO = aStudy->FindObjectID( (const char*) entry( ind ).toLatin1() );
695 for ( _PTR(ChildIterator) Iter = aStudy->NewChildIterator( SO ); Iter->More(); Iter->Next() ) {
697 if ( Iter->Value()->ReferencedObject(refSO) ) {
698 // reference on curve
701 refSO = Iter->Value();
703 CORBA::Object_var aCORBAObject = VISU::ClientSObjectToObject(refSO);
704 if(!CORBA::is_nil(aCORBAObject)){
705 PortableServer::ServantBase_var aServant = VISU::GetServant(aCORBAObject);
706 if(dynamic_cast<VISU::Curve_i*>(aServant.in()))
715 //---------------------------------------------------------------------------
716 bool VisuGUI_Selection::Plot2dViewerType( const int ind ) const
719 SUIT_Session* session = SUIT_Session::session();
720 if( SUIT_Application* app = session->activeApplication() )
721 if( LightApp_Application* sApp = dynamic_cast<LightApp_Application*>( app ) )
722 if( SUIT_ViewManager* vman = sApp->activeViewManager() )
723 if( SUIT_ViewModel* vmod = vman->getViewModel() ) {
724 viewerType = vmod->getType();
725 if (viewerType ==SPlot2d_Viewer::Type())
731 //----------------------------------------------------------------------------
732 struct TIsValuesLabeled : TViewFunctor
736 get(VISU::Prs3d_i* thePrs3d,
737 SVTK_ViewWindow* theViewWindow,
738 VISU_Actor* theActor)
740 return theActor && theActor->GetValuesLabeled() ? "true" : "false";
744 QString VisuGUI_Selection::isValuesLabeled( const int ind ) const
746 return TPopupDispatcher<TIsValuesLabeled>()(myModule, entry(ind));
749 //----------------------------------------------------------------------------
750 struct TIsScalarBarVisibleFunctor: TViewFunctor
754 get(VISU::Prs3d_i* thePrs3d,
755 SVTK_ViewWindow* theViewWindow,
756 VISU_Actor* theActor)
758 if(VISU_ScalarMapAct* anActor = dynamic_cast<VISU_ScalarMapAct*>(theActor))
759 return anActor->GetBarVisibility() ? "true" : "false";
760 else if ( VISU_GaussPtsAct* anActor = dynamic_cast<VISU_GaussPtsAct*>(theActor))
761 return anActor->GetBarVisibility() ? "true" : "false";
766 bool VisuGUI_Selection::isScalarBarVisible( const int ind ) const
768 return TPopupDispatcher<TIsScalarBarVisibleFunctor>()(myModule, entry(ind)) == "true";
771 struct TGetQuadratic2DRepresentation: TViewFunctor
773 QString virtual get (VISU::Prs3d_i* thePrs3d,
774 SVTK_ViewWindow* theViewWindow,
775 VISU_Actor* theActor)
777 if(theActor->GetQuadratic2DRepresentation() == VISU_Actor::eLines)
778 return "VISU::LINES";
779 else if (theActor->GetQuadratic2DRepresentation() == VISU_Actor::eArcs)
787 QString VisuGUI_Selection::quadratic2DMode( const int ind) const
789 return TPopupDispatcher<TGetQuadratic2DRepresentation>()(myModule, entry(ind));