Salome HOME
Fix compilation on Linux
[modules/shaper.git] / src / ModuleBase / ModuleBase_Preferences.cpp
index 1cd5e702f07e0c517ccde10f55606aa749fa74e3..bef2ab96f7df7b062fce99f8c2810c8c584471af 100644 (file)
@@ -9,6 +9,8 @@
 
 #include <Config_PropManager.h>
 
+#include <TopAbs_ShapeEnum.hxx>
+
 #include <SUIT_ResourceMgr.h>
 #include <SUIT_PreferenceMgr.h>
 #include <Qtx.h>
@@ -26,7 +28,7 @@ SUIT_ResourceMgr* ModuleBase_Preferences::myResourceMgr = 0;
 SUIT_ResourceMgr* ModuleBase_Preferences::resourceMgr()
 {
   if (!myResourceMgr) {
-    myResourceMgr = new SUIT_ResourceMgr("NewGeom");
+    myResourceMgr = new SUIT_ResourceMgr("SHAPER");
     myResourceMgr->setCurrentFormat("xml");
   }
   return myResourceMgr;
@@ -287,6 +289,26 @@ void ModuleBase_PreferencesDlg::createViewerPage(int thePageId)
   myPreferences->setItemProperty("texture_stretch_enabled", true, bgId);
   myPreferences->setItemProperty("custom_enabled", false, bgId);
   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 );
 }
 
 void ModuleBase_PreferencesDlg::createMenuPage(int thePageId)
@@ -301,6 +323,10 @@ void ModuleBase_PreferencesDlg::createMenuPage(int thePageId)
                                        "rows_number");
   myPreferences->setItemProperty("min", 1, aRowsNb);
   myPreferences->setItemProperty("max", 6, aRowsNb);
+
+  myPreferences->addItem(tr("Show Status Bar"), aSizeGroup,
+                         SUIT_PreferenceMgr::Bool, ModuleBase_Preferences::MENU_SECTION,
+                         "status_bar");
 }
 
 void ModuleBase_PreferencesDlg::accept()