class openalea.oalab.control.widget.AbstractControlWidget[source]

Bases: openalea.grapheditor.observer.AbstractListener

Use this class to create a new user control. For Qt control, you may prefer AbstractQtControlWidget or OpenAleaControlWidget

apply(control)[source]
autoapply(control, auto=True)[source]
autoread(control, auto=True)[source]
notify(sender, event)[source]
read(control)[source]
reset(value=None, *kargs)[source]
set(control, autoread=True, autoapply=True)[source]
setValue(value)[source]
value()[source]
class openalea.oalab.control.widget.AbstractQtControlWidget[source]

Bases: openalea.oalab.control.widget.AbstractControlWidget

Use this class if you want to create a Qt control widget from a classic Qt widget.

A classic Qt widget is a widget with:
  • a method to get widget value (like value(), text(), isChecked(), ...)
  • a method to set widget value (like setValue(value), setText(text), ...)
  • a signal emit when value changes (valueChanged, toggled, ...)
To Create you control widget, just define, if not exists:
  • reset(value, **constraints)
  • setValue(value)
  • value(interface=None)

You must also define in __init__, what signal you want to use to track data changes:

autoapply(control, auto=True)[source]
reset(value=None, *kargs)[source]
setValue(value)[source]
value()[source]
class openalea.oalab.control.widget.OpenAleaControlWidget[source]

Bases: openalea.oalab.control.widget.AbstractControlWidget

Use this class if you want to create a Qt control widget from a visualea Node/Interface widget.

autoapply(control, auto=True)[source]
classmethod get_label(node, parameter_str)[source]
get_state()[source]
get_value()[source]
internal_data()[source]

return a dict: minimal

read(control)[source]
reset(value=None, *kargs, **kwds)[source]
setValue(value)[source]
set_value(newval)[source]
unvalidate()[source]

Method called when data changes. We use this method to auto apply change if mode is enabled.

value(interface=None)[source]

Previous topic

<no title>

Next topic

openalea.oalab.editor package

This Page