eye.widgets.helpers module

class eye.widgets.helpers.CategoryMixin(**kwargs)[source]

Bases: object

Mixin class to support object categories.

This class should be inherited by classes of objects which should have categories.

add_category(c)[source]

Add a category to the object.

categories()[source]

Return categories of the object.

remove_category(c)[source]

Remove a category from an object.

class eye.widgets.helpers.CentralWidgetMixin(**kwargs)[source]

Bases: WidgetMixin

changeEvent(ev)[source]

Overrides a Qt method.

give_focus(reason=<Mock object>)[source]
windowModifiedChanged = Signal(bool)
class eye.widgets.helpers.WidgetMixin(**kwargs)[source]

Bases: CategoryMixin

give_focus(reason=<Mock object>)[source]
eye.widgets.helpers.accept_if(ev, cond)[source]

Accept an event if a condition is True, else ignore it.

Parameters:
  • ev (QEvent) – the event to accept or ignore

  • cond – the condition determining whether the event should be accepted or ignored

Returns:

whether the event was accepted or not

eye.widgets.helpers.parent_tab_widget(widget)[source]