#include <QtxDockAction.h>
#include <QtxDockWidget.h>
#include <QtxActionToolMgr.h>
+#include <QtxSearchTool.h>
#include <LogWindow.h>
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() ) );
// 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,
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" )
<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=""/>
<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>
</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 -->