From: mpa Date: Fri, 6 Jun 2014 12:08:47 +0000 (+0400) Subject: add documentation about dependency tree functionality X-Git-Tag: V7_5_0a1~50^2~18 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8dd08cf7fe70dc1117b7b75544eab22af5f4f9fc;p=modules%2Fgeom.git add documentation about dependency tree functionality --- diff --git a/doc/salome/gui/GEOM/images/dialog.png b/doc/salome/gui/GEOM/images/dialog.png old mode 100755 new mode 100644 index c46b6b571..7fa63d152 Binary files a/doc/salome/gui/GEOM/images/dialog.png and b/doc/salome/gui/GEOM/images/dialog.png differ diff --git a/doc/salome/gui/GEOM/images/ob_popup_menu.png b/doc/salome/gui/GEOM/images/ob_popup_menu.png index 1d9f0e321..1f5435a7a 100644 Binary files a/doc/salome/gui/GEOM/images/ob_popup_menu.png and b/doc/salome/gui/GEOM/images/ob_popup_menu.png differ diff --git a/doc/salome/gui/GEOM/images/tree_bidir_link.png b/doc/salome/gui/GEOM/images/tree_bidir_link.png new file mode 100644 index 000000000..1697ada69 Binary files /dev/null and b/doc/salome/gui/GEOM/images/tree_bidir_link.png differ diff --git a/doc/salome/gui/GEOM/images/tree_button_update.png b/doc/salome/gui/GEOM/images/tree_button_update.png new file mode 100644 index 000000000..190454b19 Binary files /dev/null and b/doc/salome/gui/GEOM/images/tree_button_update.png differ diff --git a/doc/salome/gui/GEOM/images/tree_cycldep_link.png b/doc/salome/gui/GEOM/images/tree_cycldep_link.png new file mode 100644 index 000000000..ea00164a1 Binary files /dev/null and b/doc/salome/gui/GEOM/images/tree_cycldep_link.png differ diff --git a/doc/salome/gui/GEOM/images/tree_default_node.png b/doc/salome/gui/GEOM/images/tree_default_node.png new file mode 100644 index 000000000..2a369dd3a Binary files /dev/null and b/doc/salome/gui/GEOM/images/tree_default_node.png differ diff --git a/doc/salome/gui/GEOM/images/tree_disp_ascendants.png b/doc/salome/gui/GEOM/images/tree_disp_ascendants.png new file mode 100644 index 000000000..9f7debc30 Binary files /dev/null and b/doc/salome/gui/GEOM/images/tree_disp_ascendants.png differ diff --git a/doc/salome/gui/GEOM/images/tree_disp_descendants.png b/doc/salome/gui/GEOM/images/tree_disp_descendants.png new file mode 100644 index 000000000..aaed30738 Binary files /dev/null and b/doc/salome/gui/GEOM/images/tree_disp_descendants.png differ diff --git a/doc/salome/gui/GEOM/images/tree_example.png b/doc/salome/gui/GEOM/images/tree_example.png new file mode 100644 index 000000000..e41c1b1f8 Binary files /dev/null and b/doc/salome/gui/GEOM/images/tree_example.png differ diff --git a/doc/salome/gui/GEOM/images/tree_hierarchy_type.png b/doc/salome/gui/GEOM/images/tree_hierarchy_type.png new file mode 100644 index 000000000..4e708fd6a Binary files /dev/null and b/doc/salome/gui/GEOM/images/tree_hierarchy_type.png differ diff --git a/doc/salome/gui/GEOM/images/tree_highlighted_node.png b/doc/salome/gui/GEOM/images/tree_highlighted_node.png new file mode 100644 index 000000000..6a6743020 Binary files /dev/null and b/doc/salome/gui/GEOM/images/tree_highlighted_node.png differ diff --git a/doc/salome/gui/GEOM/images/tree_main_node.png b/doc/salome/gui/GEOM/images/tree_main_node.png new file mode 100644 index 000000000..fc4009b66 Binary files /dev/null and b/doc/salome/gui/GEOM/images/tree_main_node.png differ diff --git a/doc/salome/gui/GEOM/images/tree_move_nodes.png b/doc/salome/gui/GEOM/images/tree_move_nodes.png new file mode 100644 index 000000000..d358c1f7c Binary files /dev/null and b/doc/salome/gui/GEOM/images/tree_move_nodes.png differ diff --git a/doc/salome/gui/GEOM/images/tree_popup_menu.png b/doc/salome/gui/GEOM/images/tree_popup_menu.png new file mode 100644 index 000000000..771ac85be Binary files /dev/null and b/doc/salome/gui/GEOM/images/tree_popup_menu.png differ diff --git a/doc/salome/gui/GEOM/images/tree_popup_menu2.png b/doc/salome/gui/GEOM/images/tree_popup_menu2.png new file mode 100644 index 000000000..f33e4f3cc Binary files /dev/null and b/doc/salome/gui/GEOM/images/tree_popup_menu2.png differ diff --git a/doc/salome/gui/GEOM/images/tree_selected_node.png b/doc/salome/gui/GEOM/images/tree_selected_node.png new file mode 100644 index 000000000..5f44ee521 Binary files /dev/null and b/doc/salome/gui/GEOM/images/tree_selected_node.png differ diff --git a/doc/salome/gui/GEOM/images/tree_selfdep_link.png b/doc/salome/gui/GEOM/images/tree_selfdep_link.png new file mode 100644 index 000000000..21121230b Binary files /dev/null and b/doc/salome/gui/GEOM/images/tree_selfdep_link.png differ diff --git a/doc/salome/gui/GEOM/images/tree_tool_bar.png b/doc/salome/gui/GEOM/images/tree_tool_bar.png new file mode 100644 index 000000000..eab734638 Binary files /dev/null and b/doc/salome/gui/GEOM/images/tree_tool_bar.png differ diff --git a/doc/salome/gui/GEOM/images/tree_unidir_link.png b/doc/salome/gui/GEOM/images/tree_unidir_link.png new file mode 100644 index 000000000..6afe3f35b Binary files /dev/null and b/doc/salome/gui/GEOM/images/tree_unidir_link.png differ diff --git a/doc/salome/gui/GEOM/images/tree_unpublished_node.png b/doc/salome/gui/GEOM/images/tree_unpublished_node.png new file mode 100644 index 000000000..95f9b1629 Binary files /dev/null and b/doc/salome/gui/GEOM/images/tree_unpublished_node.png differ diff --git a/doc/salome/gui/GEOM/images/tree_view_dump.png b/doc/salome/gui/GEOM/images/tree_view_dump.png new file mode 100644 index 000000000..b02616f29 Binary files /dev/null and b/doc/salome/gui/GEOM/images/tree_view_dump.png differ diff --git a/doc/salome/gui/GEOM/images/tree_view_fitall.png b/doc/salome/gui/GEOM/images/tree_view_fitall.png new file mode 100644 index 000000000..87e001dd8 Binary files /dev/null and b/doc/salome/gui/GEOM/images/tree_view_fitall.png differ diff --git a/doc/salome/gui/GEOM/images/tree_view_fitarea.png b/doc/salome/gui/GEOM/images/tree_view_fitarea.png new file mode 100644 index 000000000..e83d023a3 Binary files /dev/null and b/doc/salome/gui/GEOM/images/tree_view_fitarea.png differ diff --git a/doc/salome/gui/GEOM/images/tree_view_fitselect.png b/doc/salome/gui/GEOM/images/tree_view_fitselect.png new file mode 100755 index 000000000..e52598d7b Binary files /dev/null and b/doc/salome/gui/GEOM/images/tree_view_fitselect.png differ diff --git a/doc/salome/gui/GEOM/images/tree_view_glpan.png b/doc/salome/gui/GEOM/images/tree_view_glpan.png new file mode 100644 index 000000000..28ab547ea Binary files /dev/null and b/doc/salome/gui/GEOM/images/tree_view_glpan.png differ diff --git a/doc/salome/gui/GEOM/images/tree_view_pan.png b/doc/salome/gui/GEOM/images/tree_view_pan.png new file mode 100644 index 000000000..ec56cacc7 Binary files /dev/null and b/doc/salome/gui/GEOM/images/tree_view_pan.png differ diff --git a/doc/salome/gui/GEOM/images/tree_view_zoom.png b/doc/salome/gui/GEOM/images/tree_view_zoom.png new file mode 100644 index 000000000..386c966d1 Binary files /dev/null and b/doc/salome/gui/GEOM/images/tree_view_zoom.png differ diff --git a/doc/salome/gui/GEOM/input/arranging_study_objects_page.doc b/doc/salome/gui/GEOM/input/arranging_study_objects_page.doc index 8821198e3..fcf4b26cd 100644 --- a/doc/salome/gui/GEOM/input/arranging_study_objects_page.doc +++ b/doc/salome/gui/GEOM/input/arranging_study_objects_page.doc @@ -34,6 +34,9 @@ and then displays only the children of the selected object(s). unpublished objects are sorted by name in ascending order. It is possible to change the order (ascending / descending) by clicking the corresponding title bar of the objects list. + +
  • \subpage dependency_tree_page "Show dependency tree" - shows dependency tree of selected objects +in new 2D View Window.
  • Folders

    diff --git a/doc/salome/gui/GEOM/input/dependency_tree.doc b/doc/salome/gui/GEOM/input/dependency_tree.doc new file mode 100644 index 000000000..ec4aa11e3 --- /dev/null +++ b/doc/salome/gui/GEOM/input/dependency_tree.doc @@ -0,0 +1,205 @@ +/*! + +\page dependency_tree_page Dependency Tree + +\n In order to better understand the relations between the %GEOM +objects in a study the user has the possibility to display the +ascendants and descendant of an object in a family tree. + +User can build the dependency tree with new main objects by selecting +them in Object Browser, in OCC Viewer or in Dependency Tree Viewer +and calling corresponding popup menu. When invoked, this menu item +will open a 2D view window and display a dependency tree for the +selected object or objects (multiple selection is supported). + +\image html tree_example.png + +User can change all necessary parameters of Dependency Tree Viewer +in \ref pref_dependency_tree "Preferences". + +
    +\anchor dependency_tree_nodes

    Nodes

    + +Tree nodes in the Dependency Viewer are named according to the study +names of the corresponding objects. + +Non-published objects are shown in the tree as "unpublished" and are +colored in special for non-published objects color. + +The long name of the object is displayed in a shortened version; +full name of the object can be seen in the tool tip when the cursor +is on the node. + +Dependency Tree Viewer supports the following states of nodes: + +\image html tree_main_node.png + + +\image html tree_default_node.png + + +\image html tree_unpublished_node.png + + +\image html tree_highlighted_node.png + + +\image html tree_selected_node.png + + +
    +\anchor dependency_tree_links

    Links

    + +Dependency Tree Viewer shows oriented links between nodes to +represent dependency direction. Viewer supports the following states +of links: + +\image html tree_unidir_link.png + + +\image html tree_bidir_link.png + + +\image html tree_selfdep_link.png + + +\image html tree_cycldep_link.png + + +
    +\anchor dependency_tree_operations

    Operations

    + +The dependency tree of a chosen %GEOM object is displayed in +the dedicated 2D view window. +\n The functionalities of 2D viewer are available via its Viewer +Toolbar. + +Buttons marked with small downward triangles have extended +functionality which can be accessed by locking on them with left +mouse button. + +\image tree_tool_bar + +\image html tree_view_dump.png + +Dump View - exports an object from the viewer in bmp, png or +jpeg image format. + +\image html tree_view_fitall.png + +Fit all - scales the presentation so that it could fit within +the Viewer boundaries. + +\image html tree_view_fitarea.png + +Fit area - resizes the view to place in the visible area only +the contents of a frame drawn with pressed left mouse button. + +\image html tree_view_fitselect.png + +Fit selection - resizes the view to fit in the visible area +only currently selected objects. + +\image html tree_view_zoom.png + +Zoom - allows to zoom in and out. + +\image html tree_view_pan.png + +Panning - if the represented objects are greater that the +visible area and you don't wish to use Fit all functionality, +click on this button and you'll be able to drag the scene to see its +remote parts. + +\image html tree_view_glpan.png + +Global panning - allows to select a point to be the center of +the presentation showing all displayed objects in the visible ares. + +\image html tree_hierarchy_type.png + +Hierarchy depth - allows to change the number of hierarchy +levels to be shown in the dependency tree. + + +\image html tree_disp_ascendants.png + +Display ascendants - allows to customize the display +of ascendants. + +\image html tree_disp_descendants.png + +Display descendants - allows to customize the display +of descendants. + +\image html tree_move_nodes.png + +Move nodes - allows to customize the moving of nodes. + +\image html tree_button_update.png + +Update - allows to update a dependency tree model and a view. + +
    +\anchor dependency_tree_navigation

    Navigation

    + +Dependency Tree 2D Viewer supports the following navigation mode: + +Rectangle selection in this mode is performed by the left mouse +button; multiple selection is available when \b Shift button +is pressed. + +Also, holding \b Ctrl key with pressed mouse buttons performs +the following view transformations: + + +
    +\anchor dependency_tree_popup_menu

    Popup Menu

    + +After the object has appeared in the Dependency Tree 2D Viewer, +you can select it with left mouse click to change its presentation +parameters and access to other useful options by right-clicking on +the selected object. + +\image html tree_popup_menu.png + + + +Some functionalities are available through right-clicking on +the viewer background: + +\image html tree_popup_menu2.png + +Dependency Tree 2D Viewer background can be customized using the +"Change background" popup menu command that opens standard +"Select Color" dialog box: + +\image html selectcolor.png + +*/ diff --git a/doc/salome/gui/GEOM/input/geometry_preferences.doc b/doc/salome/gui/GEOM/input/geometry_preferences.doc index f06e510bb..ca4375244 100644 --- a/doc/salome/gui/GEOM/input/geometry_preferences.doc +++ b/doc/salome/gui/GEOM/input/geometry_preferences.doc @@ -2,6 +2,8 @@ \page geometry_preferences_page Geometry preferences +\anchor pref_settings

    Settings

    + In the \b Geometry module you can set preferences for visualisation of geometrical figures, which can be used in later sessions with this module. There is also a special group of preferences controlling input @@ -128,6 +130,8 @@ system immediately after the module activation. +\anchor pref_dependency_tree

    Dependency Tree

    + Also you can set preferences for visualisation of Dependency Tree in 2D Viewer. \image html pref_dep_tree.png diff --git a/doc/salome/gui/GEOM/input/viewing_geom_obj.doc b/doc/salome/gui/GEOM/input/viewing_geom_obj.doc index 38246c570..56b74c093 100644 --- a/doc/salome/gui/GEOM/input/viewing_geom_obj.doc +++ b/doc/salome/gui/GEOM/input/viewing_geom_obj.doc @@ -21,6 +21,7 @@ other useful options by right-clicking on the selected object. object.
  • Delete - irreversibly deletes the selected object from the viewer and from the Object Browser.
  • +
  • Create Group - allows to create group.
  • \subpage display_mode_page "Display Mode" - allows to select between Wireframe and Shading presentation.
  • \subpage bring_to_front_page "Bring To Front" - allows to bring to @@ -63,6 +64,8 @@ geometrical object. TUI Command: sg.DisplayOnly(ID)
  • Show all dimensions - shows all of the persistent dimensions created for the selected geometrical object.
  • Hide all dimensions - hides all of the persistent dimensions created for the selected geometrical object.
  • +
  • \subpage dependency_tree_page "Show dependency tree" - shows dependency tree of selected objects +in new 2D View Window.
  • Dump view - exports an object from the viewer in bmp, png, jpg or jpeg image format.
  • Change background - allows to redefine the background diff --git a/src/DependencyTree/DependencyTree_View.cxx b/src/DependencyTree/DependencyTree_View.cxx index 3f1c51bfa..24d9abae3 100644 --- a/src/DependencyTree/DependencyTree_View.cxx +++ b/src/DependencyTree/DependencyTree_View.cxx @@ -430,8 +430,8 @@ void DependencyTree_View::onPreferenceChanged( const QString& section, const QSt //================================================================================= void DependencyTree_View::onRenameObject( const QString& theEntry ) { - DependencyTree_Object* object = getObjectByEntry( theEntry.toStdString() ); - object->updateName(); + if( DependencyTree_Object* object = getObjectByEntry( theEntry.toStdString() ) ) + object->updateName(); } //================================================================================= @@ -682,21 +682,30 @@ void DependencyTree_View::clearView( bool isClearModel ) { EntryObjectMap::const_iterator objectIter; for( objectIter = myTreeMap.begin(); objectIter != myTreeMap.end(); objectIter++ ) { - DependencyTree_Object* object = objectIter->second; - if( object ) + if( DependencyTree_Object* object = objectIter->second ) if( isItemAdded( object ) ) removeItem( object ); } ArrowsInfo::const_iterator arrowIter; for( arrowIter = myArrows.begin(); arrowIter != myArrows.end(); arrowIter++ ) { - DependencyTree_Arrow* object = arrowIter->second; - if( object ) - if( isItemAdded( object ) ) - removeItem( object ); + if( DependencyTree_Arrow* arrow = arrowIter->second ) + if( isItemAdded( arrow ) ) + removeItem( arrow ); } if( isClearModel ) { + EntryObjectMap::const_iterator objectIter; + for( objectIter = myTreeMap.begin(); objectIter != myTreeMap.end(); objectIter++ ) { + if( DependencyTree_Object* object = objectIter->second ) + delete object; + } + + ArrowsInfo::const_iterator arrowIter; + for( arrowIter = myArrows.begin(); arrowIter != myArrows.end(); arrowIter++ ) { + if( DependencyTree_Arrow* arrow = arrowIter->second ) + delete arrow; + } myTreeMap.clear(); myArrows.clear(); myTreeModel.clear(); diff --git a/src/DependencyTree/resources/tree_view_dump.png b/src/DependencyTree/resources/tree_view_dump.png new file mode 100644 index 000000000..b02616f29 Binary files /dev/null and b/src/DependencyTree/resources/tree_view_dump.png differ diff --git a/src/DependencyTree/resources/tree_view_fitall.png b/src/DependencyTree/resources/tree_view_fitall.png new file mode 100644 index 000000000..386c966d1 Binary files /dev/null and b/src/DependencyTree/resources/tree_view_fitall.png differ diff --git a/src/DependencyTree/resources/tree_view_fitarea.png b/src/DependencyTree/resources/tree_view_fitarea.png new file mode 100644 index 000000000..e83d023a3 Binary files /dev/null and b/src/DependencyTree/resources/tree_view_fitarea.png differ diff --git a/src/DependencyTree/resources/tree_view_fitselect.png b/src/DependencyTree/resources/tree_view_fitselect.png new file mode 100755 index 000000000..e52598d7b Binary files /dev/null and b/src/DependencyTree/resources/tree_view_fitselect.png differ diff --git a/src/DependencyTree/resources/tree_view_glpan.png b/src/DependencyTree/resources/tree_view_glpan.png new file mode 100644 index 000000000..28ab547ea Binary files /dev/null and b/src/DependencyTree/resources/tree_view_glpan.png differ diff --git a/src/DependencyTree/resources/tree_view_pan.png b/src/DependencyTree/resources/tree_view_pan.png new file mode 100644 index 000000000..ec56cacc7 Binary files /dev/null and b/src/DependencyTree/resources/tree_view_pan.png differ diff --git a/src/DependencyTree/resources/tree_view_reset.png b/src/DependencyTree/resources/tree_view_reset.png new file mode 100644 index 000000000..66f81e604 Binary files /dev/null and b/src/DependencyTree/resources/tree_view_reset.png differ diff --git a/src/DependencyTree/resources/tree_view_zoom.png b/src/DependencyTree/resources/tree_view_zoom.png new file mode 100644 index 000000000..386c966d1 Binary files /dev/null and b/src/DependencyTree/resources/tree_view_zoom.png differ