-
- if ( QAD_CONFIG->getSetting( "SMESH:ScalarBarLabelBold" ) == "true" )
- aScalarBarLabelProp->BoldOn();
- else
- aScalarBarLabelProp->BoldOff();
-
- if ( QAD_CONFIG->getSetting( "SMESH:ScalarBarLabelItalic" ) == "true" )
- aScalarBarLabelProp->ItalicOn();
- else
- aScalarBarLabelProp->ItalicOff();
-
- if ( QAD_CONFIG->getSetting( "SMESH:ScalarBarLabelShadow" ) == "true" )
- aScalarBarLabelProp->ShadowOn();
- else
- aScalarBarLabelProp->ShadowOff();
-
- myScalarBarActor->SetLabelTextProperty( aScalarBarLabelProp );
- aScalarBarLabelProp->Delete();
-
- if ( QAD_CONFIG->getSetting("SMESH:ScalarBarOrientation") == "Horizontal" )
- myScalarBarActor->SetOrientationToHorizontal();
- else
- myScalarBarActor->SetOrientationToVertical();
-
- float aXVal = QAD_CONFIG->getSetting("SMESH:ScalarBarOrientation") == "Horizontal" ? 0.20 : 0.01;
- if ( QAD_CONFIG->hasSetting( "SMESH:ScalarBarXPosition" ) )
- aXVal = QAD_CONFIG->getSetting( "SMESH:ScalarBarXPosition" ).toFloat();
- float aYVal = QAD_CONFIG->getSetting("SMESH:ScalarBarOrientation") == "Horizontal" ? 0.01 : 0.1;
- if ( QAD_CONFIG->hasSetting( "SMESH:ScalarBarYPosition" ) )
- aYVal = QAD_CONFIG->getSetting( "SMESH:ScalarBarYPosition" ).toFloat();
- myScalarBarActor->SetPosition( aXVal, aYVal );
-
- float aWVal = QAD_CONFIG->getSetting("SMESH:ScalarBarOrientation") == "Horizontal" ? 0.60 : 0.10;
- if ( QAD_CONFIG->hasSetting( "SMESH:ScalarBarWidth" ) )
- aWVal = QAD_CONFIG->getSetting( "SMESH:ScalarBarWidth" ).toFloat();
- myScalarBarActor->SetWidth( aWVal );
-
- float aHVal = QAD_CONFIG->getSetting("SMESH:ScalarBarOrientation") == "Horizontal" ? 0.12 : 0.80;
- if ( QAD_CONFIG->hasSetting( "SMESH:ScalarBarHeight" ) )
- aHVal = QAD_CONFIG->getSetting( "SMESH:ScalarBarHeight" ).toFloat();
- myScalarBarActor->SetHeight( aHVal );
-
- int anIntVal = 5;
- if ( QAD_CONFIG->hasSetting( "SMESH:ScalarBarNbOfLabels" ) )
- anIntVal = QAD_CONFIG->getSetting("SMESH:ScalarBarNbOfLabels").toInt();
- myScalarBarActor->SetNumberOfLabels(anIntVal == 0? 5: anIntVal);
-
- anIntVal = 64;
- if ( QAD_CONFIG->hasSetting( "SMESH:ScalarBarNbOfColors" ) )
- anIntVal = QAD_CONFIG->getSetting("SMESH:ScalarBarNbOfColors").toInt();
- myScalarBarActor->SetMaximumNumberOfColors(anIntVal == 0? 64: anIntVal);
-
-
- //Definition of points numbering pipeline
- //---------------------------------------
- myPointsNumDataSet = vtkUnstructuredGrid::New();
-
- myPtsMaskPoints = vtkMaskPoints::New();
- myPtsMaskPoints->SetInput(myPointsNumDataSet);
- myPtsMaskPoints->SetOnRatio(1);
-
- myPtsSelectVisiblePoints = vtkSelectVisiblePoints::New();
- myPtsSelectVisiblePoints->SetInput(myPtsMaskPoints->GetOutput());
- myPtsSelectVisiblePoints->SelectInvisibleOff();
- myPtsSelectVisiblePoints->SetTolerance(0.1);
-
- myPtsLabeledDataMapper = vtkLabeledDataMapper::New();
- myPtsLabeledDataMapper->SetInput(myPtsSelectVisiblePoints->GetOutput());
- myPtsLabeledDataMapper->SetLabelFormat("%g");
- myPtsLabeledDataMapper->SetLabelModeToLabelScalars();
-
- vtkTextProperty* aPtsTextProp = vtkTextProperty::New();
- aPtsTextProp->SetFontFamilyToTimes();
- static int aPointsFontSize = 10;
- aPtsTextProp->SetFontSize(aPointsFontSize);
- aPtsTextProp->SetBold(1);
- aPtsTextProp->SetItalic(0);
- aPtsTextProp->SetShadow(0);
- myPtsLabeledDataMapper->SetLabelTextProperty(aPtsTextProp);
- aPtsTextProp->Delete();