How to use the phylib.utils.unconnect function in phylib

To help you get started, we’ve selected a few phylib examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cortex-lab / phy / phy / apps / base.py View on Github external
def on_close_view(sender, view_):
            """Unconnect all events when closing the view."""
            if view_ == view:
                unconnect(view.on_select)
                unconnect(on_table_sort)
                unconnect(on_table_filter)
                unconnect(on_color_scheme_changed)
                unconnect(on_cluster)
                unconnect(on_add_view)
                unconnect(on_ready)
github cortex-lab / phy / phy / apps / base.py View on Github external
def on_close_view(sender, view_):
            if view == view_:
                unconnect(on_toggle_spike_reorder)
                unconnect(on_selected_channel_changed)
                unconnect(on_select)
                unconnect(on_time_range_selected)
github cortex-lab / phy / phy / apps / base.py View on Github external
def on_close(sender):
            unconnect(on_add_view, self)
            unconnect(on_view_ready, self)
            unconnect(on_add_view_, self)
            unconnect(on_select_more, self)
            # Show save prompt if an action was done.
            do_prompt_save = kwargs.get('do_prompt_save', True)
            if do_prompt_save and self.supervisor.is_dirty():  # pragma: no cover
                r = _prompt_save()
                if r == 'save':
                    self.supervisor.save()
                elif r == 'cancel':
                    # Prevent closing of the GUI by returning False.
                    return False
                # Otherwise (r is 'close') we do nothing and close as usual.
github cortex-lab / phy / phy / apps / base.py View on Github external
def on_close_view(sender, view_):
            if view == view_:
                unconnect(on_selected_feature_changed)
                unconnect(on_select)
github cortex-lab / phy / phy / apps / base.py View on Github external
def on_close_view(sender, view_):
            """Unconnect all events when closing the view."""
            if view_ == view:
                unconnect(view.on_select)
                unconnect(on_table_sort)
                unconnect(on_table_filter)
                unconnect(on_color_scheme_changed)
                unconnect(on_cluster)
                unconnect(on_add_view)
                unconnect(on_ready)
github cortex-lab / phy / phy / apps / base.py View on Github external
def on_close_view(sender, view_):
            """Unconnect all events when closing the view."""
            if view_ == view:
                unconnect(view.on_select)
                unconnect(on_table_sort)
                unconnect(on_table_filter)
                unconnect(on_color_scheme_changed)
                unconnect(on_cluster)
                unconnect(on_add_view)
                unconnect(on_ready)
github cortex-lab / phy / phy / apps / base.py View on Github external
def on_close_view(sender, view_):
            if view == view_:
                unconnect(on_toggle_spike_reorder)
                unconnect(on_selected_channel_changed)
                unconnect(on_select)
                unconnect(on_time_range_selected)
github cortex-lab / phy / phy / cluster / views / base.py View on Github external
def close(self):
        """Close the view."""
        if hasattr(self, 'dock'):
            return self.dock.close()
        self.canvas.close()
        self._closed = True
        unconnect(self)
        gc.collect(0)
github cortex-lab / phy / phy / apps / base.py View on Github external
def on_close_view(sender, view_):
            """Unconnect all events when closing the view."""
            if view_ == view:
                unconnect(view.on_select)
                unconnect(on_table_sort)
                unconnect(on_table_filter)
                unconnect(on_color_scheme_changed)
                unconnect(on_cluster)
                unconnect(on_add_view)
                unconnect(on_ready)