def attach(self, gui):
        """Attach the view to the GUI."""
        super(WaveformView, self).attach(gui)
        self.actions.add(self.toggle_waveform_overlap)
        self.actions.add(self.toggle_show_labels)
        self.actions.separator()

        # Box scaling.
        self.actions.add(self.widen)
        self.actions.add(self.narrow)
        self.actions.separator()
        self.actions.add(self.increase)
        self.actions.add(self.decrease)
        self.actions.separator()

        # Probe scaling.
        self.actions.add(self.extend_horizontally)
        self.actions.add(self.shrink_horizontally)
        self.actions.separator()
        self.actions.add(self.extend_vertically)
        self.actions.add(self.shrink_vertically)

        # We forward the event from VisPy to the phy GUI.
        @self.connect
        def on_channel_click(e):
            gui.emit('channel_click',
                     channel_id=e.channel_id,
                     key=e.key,
                     button=e.button,
                     )
def attach ( self , gui ) : super ( WaveformView , self ) . attach ( gui ) self . actions . add ( self . toggle_waveform_overlap ) self . actions . add ( self . toggle_show_labels ) self . actions . separator ( ) self . actions . add ( self . widen ) self . actions . add ( self . narrow ) self . actions . separator ( ) self . actions . add ( self . increase ) self . actions . add ( self . decrease ) self . actions . separator ( ) self . actions . add ( self . extend_horizontally ) self . actions . add ( self . shrink_horizontally ) self . actions . separator ( ) self . actions . add ( self . extend_vertically ) self . actions . add ( self . shrink_vertically ) @ self . connect def on_channel_click ( e ) : gui . emit ( 'channel_click' , channel_id = e . channel_id , key = e . key , button = e . button , )
Attach the view to the GUI.