@@ -30,8 +30,13 @@ def add_node_widget(self, widget):
3030
3131class NodeBaseWidget (QtWidgets .QGraphicsProxyWidget ):
3232 """
33- NodeBaseWidget is the main base class for all node widgets that is
34- embedded in a :class:`NodeGraphQt.BaseNode` object.
33+ This is the main wrapper class that allows a widget to be
34+ added in a :class:`NodeGraphQt.BaseNode`.
35+
36+ If you want to add your own custom widget into a node you'll need
37+ to subclass ``NodeBaseWidget`` for an example have a look at the source
38+ code for the ``NodeComboBox``
39+ `here <https://github.com/jchanvfx/NodeGraphQt/blob/master/NodeGraphQt/widgets/node_widgets.py#L149>`_.
3540 """
3641
3742 value_changed = QtCore .Signal (str , object )
@@ -61,6 +66,10 @@ def widget(self):
6166 """
6267 Returns the embedded QWidget used in the node.
6368
69+ Note:
70+ To add your own custom widget in a :class:`NodeGraphQt.BaseNode`
71+ you must re-implement this function.
72+
6473 Returns:
6574 QtWidgets.QWidget: nested QWidget
6675 """
@@ -71,6 +80,10 @@ def value(self):
7180 """
7281 Returns the widgets current value.
7382
83+ Note:
84+ You must re-implement this function to get the value from your
85+ custom widget.
86+
7487 Returns:
7588 str: current property value.
7689 """
@@ -81,6 +94,9 @@ def value(self, text):
8194 """
8295 Sets the widgets current value.
8396
97+ Note:
98+ You must re-implement this function to update your custom widget.
99+
84100 Args:
85101 text (str): new text value.
86102 """
@@ -148,11 +164,12 @@ def get_icon(self, name):
148164
149165class NodeComboBox (NodeBaseWidget ):
150166 """
151- NodeComboBox widget is subclassed from :class:`NodeBaseWidget`,
152- this widget is displayed as a ``QComboBox`` embedded in a node.
167+ Displays as a ``QComboBox`` in a node.
168+
169+ **Inherited from:** :class:`NodeBaseWidget`
153170
154171 .. note::
155- `To embed a ``QComboBox`` in a node see func:`
172+ `To embed a` ``QComboBox`` ` in a node see func:`
156173 :meth:`NodeGraphQt.BaseNode.add_combo_menu`
157174 """
158175
@@ -221,11 +238,12 @@ def clear(self):
221238
222239class NodeLineEdit (NodeBaseWidget ):
223240 """
224- NodeLineEdit widget is subclassed from :class:`NodeBaseWidget`,
225- this widget is displayed as a ``QLineEdit`` embedded in a node.
241+ Displays as a ``QLineEdit`` in a node.
242+
243+ **Inherited from:** :class:`NodeBaseWidget`
226244
227245 .. note::
228- `To embed a ``QLineEdit`` in a node see func:`
246+ `To embed a` ``QLineEdit`` ` in a node see func:`
229247 :meth:`NodeGraphQt.BaseNode.add_text_input`
230248 """
231249
@@ -269,15 +287,16 @@ def value(self, text=''):
269287
270288class NodeFloatEdit (NodeBaseWidget ):
271289 """
272- NodeFloatEdit widget is subclassed from :class:`NodeBaseWidget`,
273- this widget is displayed as a ``QLineEdit`` embedded in a node.
290+ Displays as a ``QLineEdit`` in a node.
291+
292+ **Inherited from:** :class:`NodeBaseWidget`
274293
275294 .. note::
276- `To embed a ``QLineEdit`` in a node see func:`
295+ `To embed a` ``QLineEdit`` ` in a node see func:`
277296 :meth:`NodeGraphQt.BaseNode.add_float_input`
278297 """
279298
280- def __init__ (self , parent = None , name = '' , label = '' , value = 0.0 ):
299+ def __init__ (self , parent = None , name = '' , label = '' , value = 0.0 ):
281300 super (NodeFloatEdit , self ).__init__ (parent , name , label )
282301 self ._ledit = _ValueEdit ()
283302 self ._ledit .setStyleSheet (STYLE_QLINEEDIT )
@@ -317,11 +336,12 @@ def value(self, value):
317336
318337class NodeIntEdit (NodeFloatEdit ):
319338 """
320- NodeIntEdit widget is subclassed from :class:`NodeFloatEdit`,
321- this widget is displayed as a ``QLineEdit`` embedded in a node.
339+ Displays as a ``QLineEdit`` in a node.
340+
341+ **Inherited from:** :class:`NodeBaseWidget`
322342
323343 .. note::
324- `To embed a ``QLineEdit`` in a node see func:`
344+ `To embed a` ``QLineEdit`` ` in a node see func:`
325345 :meth:`NodeGraphQt.BaseNode.add_int_input`
326346 """
327347
@@ -333,11 +353,12 @@ def __init__(self, parent=None, name='', label='', value=0):
333353
334354class NodeCheckBox (NodeBaseWidget ):
335355 """
336- NodeCheckBox widget is subclassed from :class:`NodeBaseWidget`,
337- this widget is displayed as a ``QCheckBox`` embedded in a node.
356+ Displays as a ``QCheckBox`` in a node.
357+
358+ **Inherited from:** :class:`NodeBaseWidget`
338359
339360 .. note::
340- `To embed a ``QCheckBox`` in a node see func:`
361+ `To embed a` ``QCheckBox`` ` in a node see func:`
341362 :meth:`NodeGraphQt.BaseNode.add_checkbox`
342363 """
343364
@@ -385,12 +406,13 @@ def value(self, state=False):
385406
386407class NodeFilePath (NodeLineEdit ):
387408 """
388- NodeFilePath widget is subclassed from :class:`NodeLineEdit`,
389- this widget is displayed as a ``QLineEdit`` embedded in a node.
409+ Displays as a ``QLineEdit`` in a node.
410+
411+ **Inherited from:** :class:`NodeBaseWidget`
390412
391413 .. note::
392- ` To embed a ``QLineEdit`` in a node see func:`
393- :meth:`NodeGraphQt.BaseNode.add_float_input `
414+ To embed a ``QLineEdit`` in a node see:
415+ :meth:`NodeGraphQt.BaseNode.add_file_input `
394416 """
395417
396418 def __init__ (self , parent = None , name = '' , label = '' , text = '' , ext = '*' ):
0 commit comments