Skip to content

Commit

Permalink
doc updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jchanvfx committed Oct 18, 2022
1 parent fab1232 commit 060e61b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
18 changes: 13 additions & 5 deletions docs/examples/ex_menu.rst
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
Menu Overview
#############

Examples for customizing context menus in NodeGraphQt.
.. currentmodule:: NodeGraphQt

| Examples for customizing context menus in NodeGraphQt.
Default Context Menu
********************

The ``NodeGraphQt.NodeGraph`` has a default context menu with a few essential
menu commands built when initialized it can be accessed with the
:meth:`NodeGraph.context_menu` function.
The ``NodeGraphQt.NodeGraph`` has a context menu can be accessed with
:meth:`NodeGraph.context_menu`.


It can also be populated it with a config file in ``JSON`` format by using
:meth:`NodeGraph.set_context_menu_from_file`.

.. image:: ../_images/menu_hotkeys.png
:width: 300px

| Here's a link to the example config file with a few essential menu commands.
| https://github.com/jchanvfx/NodeGraphQt/blob/master/examples/hotkeys/hotkeys.json
Adding to the Graph Menu
************************

Expand Down Expand Up @@ -49,7 +57,7 @@ Adding to the Nodes Menu
Aside from the main context menu, the NodeGraph also has a nodes menu where you
can override context menus on a per node type basis.

Below is an example for overriding a context menu for the node type ``"com.chantasticvfx.FooNode"``
| Below is an example for overriding a context menu for the node type ``"com.chantasticvfx.FooNode"``
.. code-block:: python
:linenos:
Expand Down
10 changes: 8 additions & 2 deletions docs/menu.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@ Menus

.. currentmodule:: NodeGraphQt

.. seealso::

Context menus can also be set from a config file or a dictionary with:
:meth:`NodeGraph.set_context_menu_from_file`, :meth:`NodeGraph.set_context_menu`


Graph Menu
**********

The context menu triggered from the node graph.
| The context menu triggered from the node graph.
.. autoclass:: NodeGraphMenu
:members:
Expand All @@ -16,7 +22,7 @@ The context menu triggered from the node graph.
Nodes Menu
**********

The context menu triggered from a node.
| The context menu triggered from a node.
.. autoclass:: NodesMenu
:members:
Expand Down

0 comments on commit 060e61b

Please sign in to comment.