+
+/*!
+ \brief Switch read only mode for the Object Browser.
+ \param theIsReadOnly if true - read only mode will be turned on
+*/
+void HYDROGUI_DataBrowser::setReadOnly( const bool theIsReadOnly )
+{
+ //TODO: to be reimplemented
+
+ // Enable/disable edit triggers
+ foreach ( QTreeView* aView, findChildren<QTreeView*>() ) {
+ aView->setDragEnabled ( !theIsReadOnly );
+ aView->setEditTriggers ( theIsReadOnly ?
+ QAbstractItemView::NoEditTriggers :
+ QAbstractItemView::DoubleClicked );
+ }
+
+ // Enable/disable rename shortcut
+ QList<QShortcut*> aShortcuts = findChildren<QShortcut*>();
+ QShortcut* aShortcut;
+ foreach( aShortcut, aShortcuts ) {
+ if ( aShortcut->key() == QKeySequence( shortcutKey( RenameShortcut ) ) ) {
+ aShortcut->setEnabled( !theIsReadOnly );
+ }
+ }
+}
+
+void HYDROGUI_DataBrowser::createPopupMenu( QMenu* theMenu )
+{
+ theMenu->clear();
+ theMenu->addAction( tr( "ZONE_TO_NEW_REGION" ), this, SIGNAL( newRegion() ) );
+}