From: vsv Date: Wed, 6 Apr 2016 14:10:43 +0000 (+0300) Subject: Issue #1306: Provide selection preferences in SHAPER module X-Git-Tag: V_2.3.0~289 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=316a0aecb30bd5ff5e4baf844b1e8a9ea791331d;p=modules%2Fshaper.git Issue #1306: Provide selection preferences in SHAPER module --- diff --git a/src/SHAPERGUI/SHAPERGUI.cpp b/src/SHAPERGUI/SHAPERGUI.cpp index 7bf260cdb..587069d6c 100644 --- a/src/SHAPERGUI/SHAPERGUI.cpp +++ b/src/SHAPERGUI/SHAPERGUI.cpp @@ -608,6 +608,28 @@ void SHAPERGUI::createPreferences() return; SHAPERGUI_PrefMgr aMgr(pref, aModName); ModuleBase_Preferences::createEditContent(&aMgr, catId); + + int viewTab = pref->addItem(tr("Viewer"), catId); + // Create other parameters group in viewer tab + int otherGroup = pref->addItem(tr("Other parameters"), viewTab); + int selId = pref->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 anIndexesList; + anIndexesList.append(TopAbs_VERTEX); + anIndexesList.append(TopAbs_EDGE); + anIndexesList.append(TopAbs_FACE); + anIndexesList.append(-1); + + pref->setItemProperty( "strings", aSelectionList, selId ); + pref->setItemProperty( "indexes", anIndexesList, selId ); + pref->retrieve(); } diff --git a/src/SHAPERGUI/resources/LightApp.xml.in b/src/SHAPERGUI/resources/LightApp.xml.in index 2869cf359..e3ae4cd56 100644 --- a/src/SHAPERGUI/resources/LightApp.xml.in +++ b/src/SHAPERGUI/resources/LightApp.xml.in @@ -35,4 +35,8 @@ +
+ + +
diff --git a/src/SHAPERGUI/resources/SalomeApp.xml.in b/src/SHAPERGUI/resources/SalomeApp.xml.in index ef7b146bd..4b0a00121 100644 --- a/src/SHAPERGUI/resources/SalomeApp.xml.in +++ b/src/SHAPERGUI/resources/SalomeApp.xml.in @@ -40,4 +40,8 @@ +
+ + +