myPreferences->setItemProperty("image_formats", aImgFiles, bgId);
// Create other parameters group in viewer tab
- int otherGroup = myPreferences->addItem(tr("Other parameters"), viewTab);
- int selId = myPreferences->addItem(tr("Default selection type"), otherGroup,
- SUIT_PreferenceMgr::Selector,
- ModuleBase_Preferences::VIEWER_SECTION, "selection");
- QStringList aSelectionList;
- aSelectionList.append( tr("Vertices") );
- aSelectionList.append( tr("Edges") );
- aSelectionList.append( tr("Faces") );
- aSelectionList.append( tr("Results") );
-
- QList<QVariant> anIndexesList;
- anIndexesList.append(TopAbs_VERTEX);
- anIndexesList.append(TopAbs_EDGE);
- anIndexesList.append(TopAbs_FACE);
- anIndexesList.append(-1);
-
- myPreferences->setItemProperty( "strings", aSelectionList, selId );
- myPreferences->setItemProperty( "indexes", anIndexesList, selId );
+ int otherGroup = myPreferences->addItem(tr("Default selection"), viewTab);
+ myPreferences->addItem(tr("Faces"), otherGroup,
+ SUIT_PreferenceMgr::Bool,
+ ModuleBase_Preferences::VIEWER_SECTION, "face-selection");
+ myPreferences->addItem(tr("Edges"), otherGroup,
+ SUIT_PreferenceMgr::Bool,
+ ModuleBase_Preferences::VIEWER_SECTION, "edge-selection");
+ myPreferences->addItem(tr("Vertices"), otherGroup,
+ SUIT_PreferenceMgr::Bool,
+ ModuleBase_Preferences::VIEWER_SECTION, "vertex-selection");
+ //QStringList aSelectionList;
+ //aSelectionList.append( tr("Vertices") );
+ //aSelectionList.append( tr("Edges") );
+ //aSelectionList.append( tr("Faces") );
+ //aSelectionList.append( tr("Results") );
+
+ //QList<QVariant> anIndexesList;
+ //anIndexesList.append(TopAbs_VERTEX);
+ //anIndexesList.append(TopAbs_EDGE);
+ //anIndexesList.append(TopAbs_FACE);
+ //anIndexesList.append(-1);
+
+ //myPreferences->setItemProperty( "strings", aSelectionList, selId );
+ //myPreferences->setItemProperty( "indexes", anIndexesList, selId );
}
void ModuleBase_PreferencesDlg::createMenuPage(int thePageId)
QLocale::setDefault( QLocale::system() );
#endif
- myViewerSelMode << TopAbs_FACE << TopAbs_EDGE << TopAbs_VERTEX;
-
myDataModelXMLReader = new Config_DataModelReader();
myDataModelXMLReader->readAll();
Config_PropManager::registerProp("Visualization", "result_part_color", "Part color",
Config_Prop::Color, ModelAPI_ResultPart::DEFAULT_COLOR());
- //myViewerSelMode =
- // ModuleBase_Preferences::resourceMgr()->integerValue("Viewer", "selection", TopAbs_FACE);
+ if (ModuleBase_Preferences::resourceMgr()->booleanValue("Viewer", "face-selection", true))
+ myViewerSelMode.append(TopAbs_FACE);
+ if (ModuleBase_Preferences::resourceMgr()->booleanValue("Viewer", "edge-selection", true))
+ myViewerSelMode.append(TopAbs_EDGE);
+ if (ModuleBase_Preferences::resourceMgr()->booleanValue("Viewer", "vertex-selection", true))
+ myViewerSelMode.append(TopAbs_VERTEX);
}
//******************************************************