QColor col = resMgr->colorValue( "Geometry", "shading_color", QColor( 255, 0, 0 ) );
myShadingColor = SalomeApp_Tools::color( col );
+ myDisplayMode = resMgr->integerValue("Geometry", "display_mode", 0);
+
myColor = -1;
// This color is used for shape displaying. If it is equal -1 then
// default color is used.
AISShape->SetInfiniteState( myShape.Infinite() || myShape.ShapeType() == TopAbs_VERTEX );
// Setup shape properties here ..., e.g. display mode, color, transparency, etc
+ AISShape->SetDisplayMode( myDisplayMode );
AISShape->SetShadingColor( myShadingColor );
+
if ( HasColor() )
{
AISShape->SetColor( (Quantity_NameOfColor)GetColor() );
vtkActor* anActor = (vtkActor*)theActors->GetNextActor();
vtkProperty* aProp = 0;
-
+
if ( HasColor() || HasWidth() )
{
aProp = vtkProperty::New();
SalomeApp_Preferences::Color, "Geometry", "shading_color" );
int step = addPreference( tr( "PREF_STEP_VALUE" ), genGroup,
SalomeApp_Preferences::IntSpin, "Geometry", "SettingsGeomStep" );
+ int dispmode = addPreference( tr( "PREF_DISPLAY_MODE" ), genGroup,
+ SalomeApp_Preferences::Selector, "Geometry", "display_mode" );
setPreferenceProperty( genGroup, "columns", 1 );
setPreferenceProperty( step, "min", 0.001 );
setPreferenceProperty( step, "max", 10000 );
setPreferenceProperty( step, "precision", 3 );
+
+ // Set property for default display mode
+ QStringList aModesList;
+ aModesList.append( tr("MEN_WIREFRAME") );
+ aModesList.append( tr("MEN_SHADING") );
+
+ QValueList<QVariant> anIndexesList;
+ anIndexesList.append(0);
+ anIndexesList.append(1);
+
+ setPreferenceProperty( dispmode, "strings", aModesList );
+ setPreferenceProperty( dispmode, "indexes", anIndexesList );
}
void GeometryGUI::preferencesChanged( const QString& section, const QString& param )