]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
IPAL19246
authorvsr <vsr@opencascade.com>
Thu, 27 Mar 2008 09:08:52 +0000 (09:08 +0000)
committervsr <vsr@opencascade.com>
Thu, 27 Mar 2008 09:08:52 +0000 (09:08 +0000)
src/LightApp/LightApp_Application.cxx
src/LightApp/resources/LightApp.xml
src/LightApp/resources/LightApp_msg_en.ts
src/SalomeApp/resources/SalomeApp.xml

index edf7a391bba30f87c5f5ed713501ced35f51a54b..f7ddaf83b81cd004a2eefa70b456cd6f53531d51 100644 (file)
@@ -69,6 +69,7 @@
 #include <QtxDockAction.h>
 #include <QtxDockWidget.h>
 #include <QtxActionToolMgr.h>
+#include <QtxSearchTool.h>
 
 #include <LogWindow.h>
 
@@ -1599,11 +1600,17 @@ SUIT_Study* LightApp_Application::createNewStudy()
 QWidget* LightApp_Application::createWindow( const int flag )
 {
   QWidget* wid = 0;
+
+  SUIT_ResourceMgr* resMgr = resourceMgr();
+
   if ( flag == WT_ObjectBrowser )
   {
     SUIT_DataBrowser* ob = new SUIT_DataBrowser( new LightApp_DataObject(), desktop() );
     ob->setSortMenuEnabled( true );
     ob->setAutoUpdate( true );
+    if ( resMgr->hasValue( "ObjectBrowser", "auto_hide_search_tool" ) )
+      ob->searchTool()->enableAutoHide( resMgr->booleanValue( "ObjectBrowser", "auto_hide_search_tool" ) );
+
     //ob->setAutoOpenLevel( 1 ); // commented by ASV as a fix to bug IPAL10107
     ob->setWindowTitle( tr( "OBJECT_BROWSER" ) );
     connect( ob, SIGNAL( requestUpdate() ), this, SLOT( onRefresh() ) );
@@ -1906,6 +1913,10 @@ void LightApp_Application::createPreferences( LightApp_Preferences* pref )
 //                    LightApp_Preferences::Color, "SUPERVGraph", "Ctrl" );
 
   int obTab = pref->addPreference( tr( "PREF_TAB_OBJBROWSER" ), salomeCat );
+  int stGroup = pref->addPreference( tr( "PREF_OBJ_BROWSER_SEARCH_TOOL" ), obTab );
+  pref->addPreference( tr( "PREF_AUTO_HIDE_SEARCH_TOOL" ), stGroup, LightApp_Preferences::Bool,
+                      "ObjectBrowser", "auto_hide_search_tool" );
+
   int objSetGroup = pref->addPreference( tr( "PREF_OBJ_BROWSER_SETTINGS" ), obTab );
   pref->setItemProperty( "columns", 2, objSetGroup );
   pref->addPreference( tr( "PREF_AUTO_SIZE_FIRST" ), objSetGroup, LightApp_Preferences::Bool,
@@ -2068,6 +2079,10 @@ void LightApp_Application::preferencesChanged( const QString& sec, const QString
            ob->listView()->adjustColumn( i );
            updateObjectBrowser( false );*/
     }
+    else if ( param == "auto_hide_search_tool" )
+    {
+      objectBrowser()->searchTool()->enableAutoHide( resMgr->booleanValue( "ObjectBrowser", "auto_hide_search_tool" ) );
+    }
   }
 
   if( sec=="Study" )
index bca753a0150dcc2244f4b524d18482c83ad9c58a..73a095e368d5264c2fc053b03e9cf60f64f4697c 100644 (file)
     <parameter name="font"                value="Helvetic,12" />
     <parameter name="additional_families" value="Helvetic;Helvetica;Helvetica[Adobe];Times;Times[Adobe];Sans Serif;Serif;Monospace;Lucida"/>
   </section>
+  <section name="ObjectBrowser" >
+    <!-- Object Browser preferences -->
+    <parameter name="auto_hide_search_tool" value="true" />
+  </section>
   <section name="FileDlg">
     <!-- "Open/Save File" dialog box preferences-->
     <parameter name="QuickDirList" value=""/>
index dade1cf5d728998a4736abbd6b48dbeb206d5933..e1cd3741524875c8b6f66ef8549a2ffe74140b9a 100644 (file)
@@ -137,6 +137,14 @@ CEA/DEN, CEDRAT, EDF R&amp;D, LEG, PRINCIPIA R&amp;D, BUREAU VERITAS</translatio
         <source>PREF_SPLINE</source>
         <translation>Spline</translation>
     </message>
+    <message>
+        <source>PREF_OBJ_BROWSER_SEARCH_TOOL</source>
+        <translation>Search Tool</translation>
+    </message>
+    <message>
+        <source>PREF_AUTO_HIDE_SEARCH_TOOL</source>
+        <translation>Enable auto-hiding</translation>
+    </message>
     <message>
         <source>PREF_OBJ_BROWSER_SETTINGS</source>
         <translation>Object browser settings</translation>
index 9e8e02f2a11b7acf775d301965dce4301dce4b33..c85f4fd8522fdece19c8bae6d9d28d052ff2193f 100644 (file)
  </section>
   <section name="ObjectBrowser" >
     <!-- Object Browser preferences -->
-    <parameter name="auto_size"           value="false" />
-    <parameter name="auto_size_first"     value="true"  />
-    <parameter name="visibility_column_0" value="true"  />
-    <parameter name="visibility_column_1" value="false" />
-    <parameter name="visibility_column_2" value="false" />
-    <parameter name="visibility_column_3" value="false" />
+    <parameter name="auto_hide_search_tool" value="true" />
+    <parameter name="auto_size"             value="false" />
+    <parameter name="auto_size_first"       value="true"  />
+    <parameter name="visibility_column_0"   value="true"  />
+    <parameter name="visibility_column_1"   value="false" />
+    <parameter name="visibility_column_2"   value="false" />
+    <parameter name="visibility_column_3"   value="false" />
   </section>
   <section name="PyConsole">
     <!-- Python console preferences -->