Channel widgets
API for all the GUI components that display channels and channel related objects.
- class glitter2.channel.channel_widgets.ChannelSettingsDropDown(channel, **kwargs)
Bases:
kivy.factory.FlatDropDown
Widget that shows a channel’s settings as a drop down.
- class glitter2.channel.channel_widgets.ChannelWidget(channel, image_display_manager, **kwargs)
Bases:
kivy.uix.boxlayout.BoxLayout
Widget that displays the channel in the list of channels in the GUI.
- class glitter2.channel.channel_widgets.EventChannelWidget(channel, image_display_manager, **kwargs)
Bases:
glitter2.channel.channel_widgets.ChannelWidget
The widget that displays the
glitter2.channel.EventChannel
.
- class glitter2.channel.channel_widgets.ImageDisplayWidgetManager(**kw)
Bases:
kivy.uix.relativelayout.RelativeLayout
Manages all the channels in the GUI and the display of the images.
- channel_controller: glitter2.channel.ChannelController = None
Set from kv automatically.
- create_channel_widget(channel: glitter2.channel.ChannelBase)
Called after the channel is ready.
- Parameters
channel –
- Returns
- class glitter2.channel.channel_widgets.PosChannelPainter(**kwargs)
Bases:
kivy.uix.widget.Widget
Widget that draws the time based position for
PosChannel
.- on_touch_down(touch)
Receive a touch down event.
- Parameters
- touch:
MotionEvent
class Touch received. The touch is in parent coordinates. See
relativelayout
for a discussion on coordinate systems.
- touch:
- Returns
bool If True, the dispatching of the touch event will stop. If False, the event will continue to be dispatched to the rest of the widget tree.
- on_touch_move(touch)
Receive a touch move event. The touch is in parent coordinates.
See
on_touch_down()
for more information.
- on_touch_up(touch)
Receive a touch up event. The touch is in parent coordinates.
See
on_touch_down()
for more information.
- class glitter2.channel.channel_widgets.PosChannelWidget(channel, image_display_manager, **kwargs)
Bases:
glitter2.channel.channel_widgets.ChannelWidget
The widget that displays the
glitter2.channel.PosChannel
.
- class glitter2.channel.channel_widgets.ShowMoreBehavior(**kwargs)
Bases:
object
Behavior that displays or hides the
more
widget whenshow_more
is set to True or False respectively.
- class glitter2.channel.channel_widgets.TrackPressingButtonBehavior
Bases:
object
A button that keeps track whether it’s currently being pressed.
- class glitter2.channel.channel_widgets.ZoneChannelWidget(channel, image_display_manager, **kwargs)
Bases:
glitter2.channel.channel_widgets.ChannelWidget
The widget that displays the
glitter2.channel.ZoneChannel
.
- class glitter2.channel.channel_widgets.ZonePainter(**kwargs)
Bases:
kivy_garden.painter.PaintCanvasBehavior
,kivy.uix.widget.Widget
Painter class for drawing zones in the GUI.
- add_shape(shape)
Add the shape to
shapes
and to the painter.- Parameters
shape –
PaintShape
instance to add.- Returns
A bool indicating whether the shape was successfully added.
- create_shape_with_touch(touch)
Called internally whenever the user has done something with a touch such that the controller wants to create a new
PaintShape
to be added to the painter.This should return a new
PaintShape
instance that will be added to the painter.- Parameters
touch – The touch that caused this call.
- Returns
A new
PaintShape
instance to be added.
- deselect_shape(shape)
De-selects the shape and removes it from
selected_shapes
.- Parameters
shape –
PaintShape
instance to de-select.- Returns
A bool indicating whether the shape was successfully de-selected.
- remove_shape(shape)
Removes the shape from the painter and from
shapes
.- Parameters
shape –
PaintShape
instance to remove.- Returns
A bool indicating whether the shape was successfully removed.
- select_shape(shape)
Selects the shape and adds it to
selected_shapes
.- Parameters
shape –
PaintShape
instance to select.- Returns
A bool indicating whether the shape was successfully selected.