#include <LogWindow.h>
#include <OB_Browser.h>
#include <OB_ListView.h>
+#include <OB_ObjSearch.h>
#ifdef WIN32
#define DEFAULT_BROWSER "start iexplore.exe"
if ( flag == WT_ObjectBrowser )
{
OB_Browser* ob = new OB_Browser( desktop() );
+ ob->setSearch( new OB_ObjSearch( ob ) );
ob->setAutoUpdate( true );
//ob->setAutoOpenLevel( 1 ); // commented by ASV as a fix to bug IPAL10107
ob->setCaption( tr( "OBJECT_BROWSER" ) );
thePopup->insertSeparator();
thePopup->insertItem( tr( "MEN_REFRESH" ), this, SLOT( onRefresh() ) );
+ if ( getenv( "GUI_FIND_OB" ) )
+ thePopup->insertItem( tr( "MEN_FIND" ), this, SLOT( onFind() ) );
}
/*!
}
return CAM_Application::event( e );
}
+
+void LightApp_Application::onFind()
+{
+ objectBrowser()->enableSearch( true );
+}
+
private slots:
void onSelection();
void onRefresh();
+ void onFind();
void onPreferences();
void onMRUActivated( QString );
void onPreferenceChanged( QString&, QString&, QString& );
msgid "LightApp_Application::MEN_REFRESH"
msgstr "Refresh"
+msgid "LightApp_Application::MEN_FIND"
+msgstr "Find"
+
msgid "LightApp_Application::PREF_GROUP_SUPERV"
msgstr "Graph Supervisor"
#include "OB_Filter.h"
#include "OB_ListItem.h"
#include "OB_ListView.h"
+#include "OB_FindDlg.h"
#include <SUIT_DataObjectIterator.h>
#include <SUIT_TreeSync.h>
myView->installEventFilter( this );
myView->viewport()->installEventFilter( this );
+ myFindDlg = new OB_FindDlg( this );
+ myFindDlg->hide();
+
QVBoxLayout* main = new QVBoxLayout( this );
- main->addWidget( myView );
+ main->addWidget( myView, 1 );
+ main->addWidget( myFindDlg, 0 );
myShowToolTips = true;
myTooltip = new ToolTip( this, myView->viewport() );
listView()->ensureItemVisible( item );
}
+OB_ObjSearch* OB_Browser::getSearch() const
+{
+ return myFindDlg->getSearch();
+}
+
+void OB_Browser::setSearch( OB_ObjSearch* s )
+{
+ myFindDlg->setSearch( s );
+}
+
+void OB_Browser::enableSearch( const bool on )
+{
+ myFindDlg->setShown( on );
+}
class OB_Filter;
class OB_ListView;
class OB_ListItem;
+class OB_FindDlg;
+class OB_ObjSearch;
/*!
\class OB_Browser
void ensureItemVisible( const SUIT_DataObject* );
+ OB_ObjSearch* getSearch() const;
+ void setSearch( OB_ObjSearch* );
+ void enableSearch( const bool );
+
signals:
void selectionChanged();
void doubleClicked( SUIT_DataObject* );
friend class OB_Browser::ToolTip;
unsigned long myModifiedTime;
+
+ OB_FindDlg* myFindDlg;
};
#endif
-#include <OB_FindDlg.h>
-#include <OB_ObjSearch.h>
+#include "OB_FindDlg.h"
+#include "OB_ObjSearch.h"
#include <OB_Browser.h>
#include <OB_ListItem.h>
#ifndef OBJECT_BROWSER_OBJECT_SEARCH_HEADER
#define OBJECT_BROWSER_OBJECT_SEARCH_HEADER
+#include <ob.h>
#include <qstring.h>
class OB_ListItem;
class OB_Browser;
class SUIT_DataObject;
-class OB_ObjSearch
+class OB_EXPORT OB_ObjSearch
{
public:
OB_ObjSearch( OB_Browser* );
msgid "MEN_EXPAND_ALL"
msgstr "Expand All"
+msgid "OB_FindDlg::FIND"
+msgstr "Find"
+
+msgid "OB_FindDlg::CLOSE"
+msgstr "Close"
+
+msgid "OB_FindDlg::CASE_SENSITIVE"
+msgstr "Case sensitive"
+
+msgid "OB_FindDlg::IS_REG_EXP"
+msgstr "Regular expression"
+
+msgid "OB_FindDlg::NOT_FOUND"
+msgstr "There is no object is found"