@@ -28,7 +28,8 @@ def add_node_widget(self, widget):
28
28
29
29
class NodeBaseWidget (QtWidgets .QGraphicsProxyWidget ):
30
30
"""
31
- Base Node Widget.
31
+ NodeBaseWidget is the main base class for all node widgets that is
32
+ embedded in a :class:`NodeGraphQt.BaseNode` object.
32
33
"""
33
34
34
35
value_changed = QtCore .Signal (str , object )
@@ -136,8 +137,12 @@ def name(self):
136
137
137
138
class NodeComboBox (NodeBaseWidget ):
138
139
"""
139
- ComboBox Node Widget inherits from:
140
- :class:`NodeGraphQt.widgets.node_widgets.NodeBaseWidget`
140
+ NodeComboBox widget is subclassed from :class:`NodeBaseWidget`,
141
+ this widget is displayed as a ``QComboBox`` embedded in a node.
142
+
143
+ .. note::
144
+ `To embed a ``QComboBox`` in a node see func:`
145
+ :meth:`NodeGraphQt.BaseNode.add_combo_menu`
141
146
"""
142
147
143
148
def __init__ (self , parent = None , name = '' , label = '' , items = None ):
@@ -167,10 +172,10 @@ def widget(self):
167
172
@property
168
173
def value (self ):
169
174
"""
170
- Returns the QComboBox current text.
175
+ Returns the widget current text.
171
176
172
177
Returns:
173
- str: current property value .
178
+ str: current text .
174
179
"""
175
180
return str (self ._combo .currentText ())
176
181
@@ -201,8 +206,12 @@ def clear(self):
201
206
202
207
class NodeLineEdit (NodeBaseWidget ):
203
208
"""
204
- LineEdit Node Widget inherits from:
205
- :class:`NodeGraphQt.widgets.node_widgets.NodeBaseWidget`
209
+ NodeLineEdit widget is subclassed from :class:`NodeBaseWidget`,
210
+ this widget is displayed as a ``QLineEdit`` embedded in a node.
211
+
212
+ .. note::
213
+ `To embed a ``QLineEdit`` in a node see func:`
214
+ :meth:`NodeGraphQt.BaseNode.add_text_input`
206
215
"""
207
216
208
217
def __init__ (self , parent = None , name = '' , label = '' , text = '' ):
@@ -229,10 +238,10 @@ def widget(self):
229
238
@property
230
239
def value (self ):
231
240
"""
232
- Returns the QLineEdit current text.
241
+ Returns the widgets current text.
233
242
234
243
Returns:
235
- str: current property value .
244
+ str: current text .
236
245
"""
237
246
return str (self ._ledit .text ())
238
247
@@ -245,8 +254,12 @@ def value(self, text=''):
245
254
246
255
class NodeCheckBox (NodeBaseWidget ):
247
256
"""
248
- CheckBox Node Widget inherits from:
249
- :class:`NodeGraphQt.widgets.node_widgets.NodeBaseWidget`
257
+ NodeCheckBox widget is subclassed from :class:`NodeBaseWidget`,
258
+ this widget is displayed as a ``QCheckBox`` embedded in a node.
259
+
260
+ .. note::
261
+ `To embed a ``QCheckBox`` in a node see func:`
262
+ :meth:`NodeGraphQt.BaseNode.add_checkbox`
250
263
"""
251
264
252
265
def __init__ (self , parent = None , name = '' , label = '' , text = '' , state = False ):
@@ -279,10 +292,10 @@ def widget(self):
279
292
@property
280
293
def value (self ):
281
294
"""
282
- Returns the QCheckBox checked state.
295
+ Returns the widget checked state.
283
296
284
297
Returns:
285
- bool: current property value .
298
+ bool: checked state .
286
299
"""
287
300
return self ._cbox .isChecked ()
288
301
0 commit comments