def set_clip_launch_buttons(self, buttons):
        raise not buttons or buttons.width() == self._num_tracks and buttons.height() == self._num_scenes or AssertionError
        if buttons:
            for button, (x, y) in buttons.iterbuttons():
                scene = self.scene(y)
                slot = scene.clip_slot(x)
                slot.set_launch_button(button)

        else:
            for x, y in product(xrange(self._num_tracks), xrange(self._num_scenes)):
                scene = self.scene(y)
                slot = scene.clip_slot(x)
                slot.set_launch_button(None)
    def set_clip_launch_buttons(self, buttons):
        raise not buttons or buttons.width() == self._num_tracks and buttons.height() == self._num_scenes or AssertionError
        if buttons:
            for button, (x, y) in buttons.iterbuttons():
                scene = self.scene(y)
                slot = scene.clip_slot(x)
                slot.set_launch_button(button)

        else:
            for x, y in product(xrange(self._num_tracks), xrange(self._num_scenes)):
                scene = self.scene(y)
                slot = scene.clip_slot(x)
                slot.set_launch_button(None)
 def iterbuttons(self):
     for j, i in product(xrange(self.height()), xrange(self.width())):
         button = self.get_button(i, j)
         yield (button, (i, j))
 def __iter__(self):
     for j, i in product(xrange(self.height()), xrange(self.width())):
         button = self.get_button(i, j)
         yield button
Exemplo n.º 5
0
 def iterbuttons(self):
     for i, j in product(xrange(self.width()), xrange(self.height())):
         button = self.get_button(i, j)
         yield (button, (i, j))
Exemplo n.º 6
0
 def __iter__(self):
     for i, j in product(xrange(self.width()), xrange(self.height())):
         button = self.get_button(i, j)
         yield button