From 6d6bec24d8165192dcb867d3086223840533f11f Mon Sep 17 00:00:00 2001 From: stv Date: Tue, 31 May 2005 09:18:12 +0000 Subject: [PATCH] Popup item "Refresh" --- src/ObjBrowser/OB_Browser.cxx | 9 +++++++++ src/ObjBrowser/OB_Browser.h | 1 + src/ObjBrowser/resources/OB_msg_en.po | 3 +++ 3 files changed, 13 insertions(+) diff --git a/src/ObjBrowser/OB_Browser.cxx b/src/ObjBrowser/OB_Browser.cxx index 9570aa963..3866f6c7e 100755 --- a/src/ObjBrowser/OB_Browser.cxx +++ b/src/ObjBrowser/OB_Browser.cxx @@ -759,6 +759,11 @@ void OB_Browser::onExpand() expand( listViewItem( itr.current() ) ); } +void OB_Browser::onRefresh() +{ + updateTree(); +} + void OB_Browser::onDestroyed( SUIT_DataObject* obj ) { if ( !obj ) @@ -848,7 +853,11 @@ void OB_Browser::contextMenuPopup( QPopupMenu* menu ) closed = hasClosed( listViewItem( itr.current() ) ); if ( closed ) + { menu->insertItem( tr( "MEN_EXPAND_ALL" ), this, SLOT( onExpand() ) ); + menu->insertSeparator(); + } + menu->insertItem( tr( "MEN_REFRESH" ), this, SLOT( onRefresh() ) ); } void OB_Browser::expand( QListViewItem* item ) diff --git a/src/ObjBrowser/OB_Browser.h b/src/ObjBrowser/OB_Browser.h index 7222ec114..37df3ff2a 100755 --- a/src/ObjBrowser/OB_Browser.h +++ b/src/ObjBrowser/OB_Browser.h @@ -84,6 +84,7 @@ signals: private slots: void onExpand(); + void onRefresh(); void onDestroyed( SUIT_DataObject* ); void onDropped( QPtrList, QListViewItem*, int ); diff --git a/src/ObjBrowser/resources/OB_msg_en.po b/src/ObjBrowser/resources/OB_msg_en.po index 8f725025c..914fab95d 100755 --- a/src/ObjBrowser/resources/OB_msg_en.po +++ b/src/ObjBrowser/resources/OB_msg_en.po @@ -11,3 +11,6 @@ msgstr "" msgid "MEN_EXPAND_ALL" msgstr "Expand All" + +msgid "MEN_REFRESH" +msgstr "Refresh" -- 2.39.2