widgets.graph_view_widget
¶
Contains the TreeViewForm class.
author: |
|
---|---|
date: | 26.11.2018 |
Module Contents¶
-
class
widgets.graph_view_widget.
GraphViewForm
(project, db_maps, read_only=False)[source]¶ Bases:
widgets.data_store_widget.DataStoreForm
A widget to show the graph view.
-
project
¶ The project instance that owns this form
Type: SpineToolboxProject
-
db_maps
¶ named DiffDatabaseMapping instances
Type: dict
-
read_only
¶ Whether or not the form should be editable
Type: bool
-
init_parameter_definition_models
(self)[source]¶ Initialize parameter (definition) models from source database.
-
create_add_more_actions
(self)[source]¶ Create and ‘Add more’ action and button for the Item Palette views.
-
restore_dock_widgets
(self)[source]¶ Dock all floating and or hidden QDockWidgets back to the window at ‘factory’ positions.
-
_handle_zoom_widget_action_hovered
(self)[source]¶ Called when the zoom widget action is hovered. Hide the ‘Dock widgets’ submenu in case it’s being shown. This is the default behavior for hovering ‘normal’ ‘QAction’s, but for some reason it’s not the case for hovering ‘QWidgetAction’s.
Called when a menu from the menubar is about to show.
-
_handle_item_palette_dock_location_changed
(self, area)[source]¶ Called when the item palette dock widget location changes. Adjust splitter orientation accordingly.
-
static
shortest_path_matrix
(object_name_list, src_ind_list, dst_ind_list, spread)[source]¶ Return the shortest-path matrix.
-
static
vertex_coordinates
(matrix, heavy_positions=None, iterations=10, weight_exp=-2, initial_diameter=1000)[source]¶ Return x and y coordinates for each vertex in the graph, computed using VSGD-MS.
-
_handle_scene_changed
(self, region)[source]¶ Handle scene changed. Show usage message if no items other than the bg.
-
relationship_items
(self, object_name_list, object_class_name_list, extent, spread, label_color, object_class_id_list=None, relationship_class_id=None)[source]¶ Lists of object and arc items that form a relationship.
-
add_relationship_template
(self, scene, x, y, object_items, arc_items, dimension_at_origin=None)[source]¶ Add relationship parts into the scene to form a ‘relationship template’.
-
update_object
(self, object_item, name)[source]¶ Try and update object given an object item and a name.
-
add_relationship
(self, template_id, object_items)[source]¶ Try and add relationship given a template id and a list of object items.
Show context menu for graphics view.
Show hidden items.
Show context menu for object_item.
-