justbytes_gui._gadgets module

Hierarchy of gadgets.

class justbytes_gui._gadgets.ChoiceEntry(master, value, label_text, choices)

Bases: justbytes_gui._gadgets.Entry

Entry for ChoiceSelector.

get()
set(value)
widget

top-level widget

class justbytes_gui._gadgets.Entry

Bases: object

Top level class for gadgets.

get()

Get the value.

Returns:the current value for the widget, converted to the type
Return type:object
Raises ValueError:
 
classmethod getWidget(master, selector, value, label_text)

Recursive dispatch for appropriate widget.

Parameters:
  • master (Widget) – the widget to which new widget belongs
  • selector (WidgetSelector) – the selector info
  • value (object) – the value the selected widget represents
  • label_text (str) – how to label the value
Returns:

a gadget for the value

Return type:

Entry

set(value)

Set the value.

Parameters:value (object) – the value to set
widget

A decorator indicating abstract properties.

Requires that the metaclass is ABCMeta or derived from it. A class that has a metaclass derived from ABCMeta cannot be instantiated unless all of its abstract properties are overridden. The abstract properties can be called using any of the normal ‘super’ call mechanisms.

Usage:

class C:

__metaclass__ = ABCMeta @abstractproperty def my_abstract_property(self):

...

This defines a read-only property; you can also define a read-write abstract property using the ‘long’ form of property declaration:

class C:
__metaclass__ = ABCMeta def getx(self): ... def setx(self, value): ... x = abstractproperty(getx, setx)
class justbytes_gui._gadgets.JustEntry(master, value, label_text, python_type)

Bases: justbytes_gui._gadgets.Entry

Entry for JustSelector.

get()
set(value)
widget

top-level widget

class justbytes_gui._gadgets.MaybeEntry(master, value, label_text, selector)

Bases: justbytes_gui._gadgets.Entry

Entry for maybe situation.

get()
set(value)
widget

top-level widget

Previous topic

justbytes_gui._frame module

Next topic

justbytes_gui._selectors module

This Page