From 316a0aecb30bd5ff5e4baf844b1e8a9ea791331d Mon Sep 17 00:00:00 2001 From: vsv Date: Wed, 6 Apr 2016 17:10:43 +0300 Subject: [PATCH] Issue #1306: Provide selection preferences in SHAPER module --- src/SHAPERGUI/SHAPERGUI.cpp | 22 ++++++++++++++++++++++ src/SHAPERGUI/resources/LightApp.xml.in | 4 ++++ src/SHAPERGUI/resources/SalomeApp.xml.in | 4 ++++ 3 files changed, 30 insertions(+) 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 @@ +
+ + +
-- 2.39.2