From: sln Date: Tue, 9 Dec 2008 12:29:38 +0000 (+0000) Subject: 0013557: field values display X-Git-Tag: Phase8_Part1_16122008~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1f01527aa933791712017b9f89f6d746e809bf07;p=modules%2Fvisu.git 0013557: field values display Now you can display values applied to the cells or nodes of 3D presentation intended for visualization of calculation data. VisuGUI_Selection provides new method isValuesLabeled() for this functionality. --- diff --git a/src/VISUGUI/VisuGUI_Selection.cxx b/src/VISUGUI/VisuGUI_Selection.cxx index e2ceec1f..23544b40 100644 --- a/src/VISUGUI/VisuGUI_Selection.cxx +++ b/src/VISUGUI/VisuGUI_Selection.cxx @@ -69,6 +69,7 @@ QVariant VisuGUI_Selection::parameter( const int ind, const QString& p ) const else if ( p == "mediumResolution" ) val = QVariant( mediumResolution( ind ) ); else if ( p == "lowResolution" ) val = QVariant( lowResolution( ind ) ); else if ( p == "resolutionState" ) val = QVariant( resolutionState( ind ) ); + else if ( p == "isValuesLabeled" ) val = QVariant( isValuesLabeled( ind ) ); } return val; @@ -575,3 +576,22 @@ bool VisuGUI_Selection::isVisuComponent( const int ind ) const return dynamic_cast( VISU::GetServant( anObj ).in() ); } + +//---------------------------------------------------------------------------- +struct TIsValuesLabeled : TViewFunctor +{ + QString + virtual + get(VISU::Prs3d_i* thePrs3d, + SVTK_ViewWindow* theViewWindow, + VISU_Actor* theActor) + { + return theActor && theActor->GetValuesLabeled() ? "true" : "false"; + } +}; + +QString VisuGUI_Selection::isValuesLabeled( const int ind ) const +{ + return TPopupDispatcher()(myModule, entry(ind)); +} + diff --git a/src/VISUGUI/VisuGUI_Selection.h b/src/VISUGUI/VisuGUI_Selection.h index 184547e3..2dcaf666 100644 --- a/src/VISUGUI/VisuGUI_Selection.h +++ b/src/VISUGUI/VisuGUI_Selection.h @@ -61,6 +61,7 @@ private: QString isShading( const int ) const; QString isScalarMapAct( const int ) const; bool isVisuComponent( const int ) const; + QString isValuesLabeled( const int ) const; QString fullResolution( const int ) const; QString mediumResolution( const int ) const;