@@ -265,8 +265,8 @@ def viewer(self):
265
265
Returns the view interface used by the node graph.
266
266
267
267
Warnings:
268
- Methods in the `NodeViewer` are used internally
269
- by `NodeGraphQt` components.
268
+ Methods in the `` NodeViewer` ` are used internally
269
+ by `` NodeGraphQt` ` components.
270
270
271
271
See Also:
272
272
:attr:`NodeGraph.widget` for adding the node graph into a
@@ -279,7 +279,7 @@ def viewer(self):
279
279
280
280
def scene (self ):
281
281
"""
282
- Return the scene object.
282
+ Returns the ``QGraphicsScene`` object used in the node graph .
283
283
284
284
Returns:
285
285
NodeGraphQt.widgets.scene.NodeScene: node scene.
@@ -421,9 +421,9 @@ def get_context_menu(self, menu):
421
421
"""
422
422
Returns the context menu specified by the name.
423
423
424
- Menu types :
425
- "graph" - context menu from the node graph.
426
- "nodes" - context menu for the nodes.
424
+ Menu Types :
425
+ - `` "graph"`` context menu from the node graph.
426
+ - `` "nodes"`` context menu for the nodes.
427
427
428
428
Args:
429
429
menu (str): menu name.
@@ -466,13 +466,13 @@ def acyclic(self):
466
466
Returns true if the current node graph is acyclic.
467
467
468
468
Returns:
469
- bool: true if acyclic (default: True).
469
+ bool: true if acyclic (default: `` True`` ).
470
470
"""
471
471
return self ._model .acyclic
472
472
473
473
def set_acyclic (self , mode = False ):
474
474
"""
475
- Enable the node graph to be a acyclic graph. (default= False)
475
+ Enable the node graph to be a acyclic graph. (default: `` False`` )
476
476
477
477
Args:
478
478
mode (bool): true to enable acyclic.
@@ -520,10 +520,10 @@ def reset_zoom(self):
520
520
521
521
def set_zoom (self , zoom = 0 ):
522
522
"""
523
- Set the zoom factor of the Node Graph the default is 0.0
523
+ Set the zoom factor of the Node Graph the default is `` 0.0``
524
524
525
525
Args:
526
- zoom (float): zoom factor (max zoom out -0.9 / max zoom in 2.0)
526
+ zoom (float): zoom factor (max zoom out `` -0.9`` / max zoom in `` 2.0`` )
527
527
"""
528
528
self ._viewer .set_zoom (zoom )
529
529
@@ -586,9 +586,9 @@ def create_node(self, node_type, name=None, selected=True, color=None,
586
586
node_type (str): node instance type.
587
587
name (str): set name of the node.
588
588
selected (bool): set created node to be selected.
589
- color (tuple or str): node color (255, 255, 255) or ' #FFFFFF' .
590
- text_color (tuple or str): node text color (255, 255, 255) or ' #FFFFFF' .
591
- pos (list[int, int]): initial x, y position for the node (default: (0, 0)).
589
+ color (tuple or str): node color `` (255, 255, 255)`` or ``" #FFFFFF"`` .
590
+ text_color (tuple or str): text color `` (255, 255, 255)`` or ``" #FFFFFF"`` .
591
+ pos (list[int, int]): initial x, y position for the node (default: `` (0, 0)`` ).
592
592
593
593
Returns:
594
594
NodeGraphQt.BaseNode: the created instance of the node.
@@ -734,7 +734,7 @@ def get_node_by_id(self, node_id=None):
734
734
Returns the node from the node id string.
735
735
736
736
Args:
737
- node_id (str): node id (:meth :`NodeObject.id`)
737
+ node_id (str): node id (:attr :`NodeObject.id`)
738
738
739
739
Returns:
740
740
NodeGraphQt.NodeObject: node object.
@@ -1053,7 +1053,7 @@ def disable_nodes(self, nodes, mode=None):
1053
1053
1054
1054
def question_dialog (self , text , title = 'Node Graph' ):
1055
1055
"""
1056
- Prompts a question open dialog with "Yes" and "No" buttons in
1056
+ Prompts a question open dialog with `` "Yes"`` and `` "No"`` buttons in
1057
1057
the node graph.
1058
1058
1059
1059
Note:
@@ -1093,7 +1093,7 @@ def load_dialog(self, current_dir=None, ext=None):
1093
1093
1094
1094
Args:
1095
1095
current_dir (str): path to a directory.
1096
- ext (str): custom file type extension (default: json)
1096
+ ext (str): custom file type extension (default: ``" json"`` )
1097
1097
1098
1098
Returns:
1099
1099
str: selected file path.
@@ -1110,7 +1110,7 @@ def save_dialog(self, current_dir=None, ext=None):
1110
1110
1111
1111
Args:
1112
1112
current_dir (str): path to a directory.
1113
- ext (str): custom file type extension (default: json)
1113
+ ext (str): custom file type extension (default: ``" json"`` )
1114
1114
1115
1115
Returns:
1116
1116
str: selected file path.
0 commit comments