Skip to content

Commit 72234eb

Browse files
committed
doc formatting tweaks.
1 parent fae527e commit 72234eb

File tree

7 files changed

+26
-40
lines changed

7 files changed

+26
-40
lines changed

NodeGraphQt/base/graph.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class NodeGraph(QtCore.QObject):
2626
"""
2727
The ``NodeGraph`` class is the main controller for managing all nodes.
2828
29-
Inherited from: ``PySide2.QtCore.QObject``
29+
Inherited from: :class:`PySide2.QtCore.QObject`
3030
3131
.. image:: _images/graph.png
3232
:width: 60%
@@ -86,6 +86,7 @@ class NodeGraph(QtCore.QObject):
8686
Signal is triggered when data has been dropped to the graph.
8787
8888
:parameters: :class:`PySide2.QtCore.QMimeData`, :class:`PySide2.QtCore.QPoint`
89+
:emits: mime data, node graph position
8990
"""
9091

9192
def __init__(self, parent=None):
@@ -309,7 +310,7 @@ def viewer(self):
309310
310311
See Also:
311312
:attr:`NodeGraph.widget` for adding the node graph into a
312-
QtWidgets.QLayout.
313+
:class:`PySide2.QtWidgets.QLayout`.
313314
314315
Returns:
315316
NodeGraphQt.widgets.viewer.NodeViewer: viewer interface.
@@ -468,7 +469,7 @@ def get_context_menu(self, menu):
468469
menu (str): menu name.
469470
470471
Returns:
471-
NodeGraphMenu or NodesMenu: context menu object.
472+
NodeGraphQt.NodeGraphMenu or NodeGraphQt.NodesMenu: context menu object.
472473
"""
473474
menus = self._viewer.context_menus()
474475
if menus.get(menu):

docs/examples/ex_index.rst

Lines changed: 0 additions & 14 deletions
This file was deleted.

docs/examples/ex_node.rst

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Creating Nodes
55
**************
66

77
| Creating is done simply by calling the :func:`NodeGraphQt.NodeGraph.create_node` function.
8-
| (`see example below` ``line22``)
8+
| (`see example below` ``line: 22``)
99
1010
.. code-block:: python
1111
:linenos:
@@ -66,16 +66,16 @@ connecting nodes with the port objects:
6666
# make the connection.
6767
port_a.connect_to(port_b)
6868
69+
`more on ports and connections.`
6970

70-
more on ports and connections:
71-
- :func:`NodeGraphQt.BaseNode.input`,
72-
- :func:`NodeGraphQt.BaseNode.output`
73-
- :func:`NodeGraphQt.BaseNode.set_input`,
74-
- :func:`NodeGraphQt.BaseNode.set_output`,
75-
- :func:`NodeGraphQt.BaseNode.inputs`,
76-
- :func:`NodeGraphQt.BaseNode.outputs`
77-
- :func:`NodeGraphQt.Port.connect_to`,
78-
- :func:`NodeGraphQt.Port.disconnect_from`
71+
- :func:`NodeGraphQt.BaseNode.input`
72+
- :func:`NodeGraphQt.BaseNode.output`
73+
- :func:`NodeGraphQt.BaseNode.set_input`
74+
- :func:`NodeGraphQt.BaseNode.set_output`
75+
- :func:`NodeGraphQt.BaseNode.inputs`
76+
- :func:`NodeGraphQt.BaseNode.outputs`
77+
- :func:`NodeGraphQt.Port.connect_to`
78+
- :func:`NodeGraphQt.Port.disconnect_from`
7979

8080

8181
Widget Example
@@ -133,6 +133,7 @@ Here's an example where we subclass the ``NodeGraph`` and connect it up to a
133133
134134
app.exec_()
135135
136-
more on the properties bin and node_double_clicked signal:
136+
`more on the properties bin and node_double_clicked signal`
137+
137138
- :class:`NodeGraphQt.PropertiesBinWidget`
138139
- :attr:`NodeGraphQt.NodeGraph.node_double_clicked`

docs/examples/ex_overview.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Graph Overview
2-
##############
1+
NodeGraph Overview
2+
##################
33

44
User interface overview for the node graph.
55

@@ -68,6 +68,7 @@ Here's a basic example snippet for creating two nodes and connecting them togeth
6868
from NodeGraphQt import NodeGraph, BaseNode, setup_context_menu
6969
7070
71+
# create a node class object inherited from BaseNode.
7172
class FooNode(BaseNode):
7273
7374
# unique node identifier domain.

docs/examples/ex_toc.rst

Lines changed: 0 additions & 9 deletions
This file was deleted.

docs/graph.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
NodeGraph
22
#########
33

4+
`See` :ref:`Basic Example` `from the NodeGraph overview.`
5+
6+
----
7+
48
.. autoclass:: NodeGraphQt.NodeGraph
59
:members:
610
:exclude-members: model, widget

docs/index.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,6 @@ GitHub Project: https://github.com/jchanvfx/NodeGraphQt
2626
:name: examplestoc
2727
:maxdepth: 3
2828

29-
examples/ex_toc
29+
examples/ex_overview
30+
examples/ex_node
31+
examples/ex_menu

0 commit comments

Comments
 (0)