myView->setAppropriate( myColumnIds[id], on );
}
-void OB_Browser::updateTree( SUIT_DataObject* o )
+void OB_Browser::updateTree( SUIT_DataObject* obj )
{
- updateTree( o ? o : getRootObject(), false );
-}
-
-void OB_Browser::updateTree( SUIT_DataObject* obj, const bool notify )
-{
- if ( !obj )
+ if ( !obj && !(obj = getRootObject()) )
return;
DataObjectKey curKey;
SUIT_DataObject* curObj = storeState( selObjs, openObjs, selKeys, openKeys, curKey );
- if ( notify )
- {
- bool upd = isAutoUpdate();
- setAutoUpdate( false );
- emit aboutRefresh();
- setAutoUpdate( upd );
- }
-
createConnections( obj );
updateView( obj );
expand( listViewItem( itr.current() ) );
}
-void OB_Browser::onRefresh()
-{
- updateTree( getRootObject(), true );
-}
-
void OB_Browser::onColumnVisible( int id )
{
setColumnShown( id, !isColumnVisible( id ) );
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 )
virtual void contextMenuPopup( QPopupMenu* );
signals:
- void aboutRefresh();
void selectionChanged();
void dropped( DataObjectList, SUIT_DataObject*, int );
private slots:
void onExpand();
- void onRefresh();
void onColumnVisible( int );
void onDestroyed( SUIT_DataObject* );
void onDropped( QPtrList<QListViewItem>, QListViewItem*, int );
void removeObject( SUIT_DataObject*, const bool = true );
void updateText( QListViewItem* );
- void updateTree( SUIT_DataObject*, const bool );
DataObjectKey objectKey( QListViewItem* ) const;
DataObjectKey objectKey( SUIT_DataObject* ) const;