def _on_clip_state_changed(self):
     ClipSlotComponent._on_clip_state_changed(self)
     if self.has_clip():
         if not self._clip_slot.clip.color_has_listener(self._on_color_changed):
             self._clip_slot.clip.add_color_listener(self._on_color_changed)
         if not self._clip_slot.clip.name_has_listener(self._on_name_changed):
             self._clip_slot.clip.add_name_listener(self._on_name_changed)
     self._send_state()
 def disconnect(self):
     if self._clip_slot != None and self.has_clip():
         self._clip_slot.clip.remove_name_listener(self._on_name_changed)
         self._clip_slot.clip.remove_color_listener(self._on_color_changed)
     ClipSlotComponent.disconnect(self)
     self._on_load_state_changed()
     self._on_name_changed()
     self._on_color_changed()
     self._serato_interface = None
Пример #3
0
 def _on_clip_state_changed(self):
     ClipSlotComponent._on_clip_state_changed(self)
     if self.has_clip():
         if not self._clip_slot.clip.color_has_listener(
                 self._on_color_changed):
             self._clip_slot.clip.add_color_listener(self._on_color_changed)
         if not self._clip_slot.clip.name_has_listener(
                 self._on_name_changed):
             self._clip_slot.clip.add_name_listener(self._on_name_changed)
     self._send_state()
 def set_clip_slot(self, clip_slot):
     if self._clip_slot != None and self.has_clip():
         self._clip_slot.clip.remove_name_listener(self._on_name_changed)
         self._clip_slot.clip.remove_color_listener(self._on_color_changed)
     ClipSlotComponent.set_clip_slot(self, clip_slot)
     if self._clip_slot != None and self.has_clip():
         self._clip_slot.clip.add_name_listener(self._on_name_changed)
         self._clip_slot.clip.add_color_listener(self._on_color_changed)
     self._on_load_state_changed()
     self._on_name_changed()
     self._on_color_changed()
     self.update()
        def _set_clip_slot(self, clip_slot):
            if clip_slot != self._clip_slot:
                if self._clip_slot is not None:
                    try:
                        self._clip_slot.remove_has_stop_button_listener(self._send_state)
                        if self.has_clip():
                            self._clip_slot.clip.remove_color_listener(self._on_color_changed)
                            self._clip_slot.clip.remove_name_listener(self._on_name_changed)
                    except:
                        pass

                ClipSlotComponent.set_clip_slot(self, clip_slot)
                if self._clip_slot is not None:
                    self._clip_slot.add_has_stop_button_listener(self._send_state)
                    if self.has_clip():
                        self._clip_slot.clip.add_color_listener(self._on_color_changed)
                        self._clip_slot.clip.add_name_listener(self._on_name_changed)
Пример #6
0
    def set_clip_slot(self, clip_slot):
        if clip_slot != self._clip_slot:
            if self._clip_slot is not None:
                try:
                    self._clip_slot.remove_has_stop_button_listener(
                        self._send_state)
                    if self.has_clip():
                        self._clip_slot.clip.remove_color_listener(
                            self._on_color_changed)
                        self._clip_slot.clip.remove_name_listener(
                            self._on_name_changed)
                except:
                    pass

            ClipSlotComponent.set_clip_slot(self, clip_slot)
            if self._clip_slot is not None:
                self._clip_slot.add_has_stop_button_listener(self._send_state)
                if self.has_clip():
                    self._clip_slot.clip.add_color_listener(
                        self._on_color_changed)
                    self._clip_slot.clip.add_name_listener(
                        self._on_name_changed)
 def __init__(self, session):
     self._session = session
     self._last_beat = -1
     ClipSlotComponent.__init__(self)
     self.song().add_current_song_time_listener(self._on_song_time_changed)
     self.song().add_is_playing_listener(self._on_playing_status_changed)
Пример #8
0
 def __init__(self):
     ClipSlotComponent.__init__(self)
     self._noclip_value = 4
     self.set_allow_update(True)
     self._highlight_clip_button = None
Пример #9
0
 def __init__(self):
     ClipSlotComponent.__init__(self)
     self._noclip_value = 4
     self.set_allow_update(True)
Пример #10
0
 def __init__(self):
     ClipSlotComponent.__init__(self)
     self.color = [-1,-1,-1]
     return None
 def _update_clip_property_slots(self):
     clip = self._clip_slot.clip if self._clip_slot else None
     self._on_name_changed.subject = clip
     ClipSlotComponent._update_clip_property_slots(self)
 def __init__(self, tid, sid):
     ClipSlotComponent.__init__(self)
     self._tid = tid
     self._sid = sid
Пример #13
0
 def disconnect(self):
     self.song().remove_current_song_time_listener(
         self._on_song_time_changed)
     self.song().remove_is_playing_listener(self._on_playing_status_changed)
     self.set_launch_button(None)
     ClipSlotComponent.disconnect(self)
Пример #14
0
 def __init__(self, session):
     self._session = session
     self._last_beat = -1
     ClipSlotComponent.__init__(self)
     self.song().add_current_song_time_listener(self._on_song_time_changed)
     self.song().add_is_playing_listener(self._on_playing_status_changed)
 def disconnect(self):
     self.song().remove_current_song_time_listener(self._on_song_time_changed) 
     self.song().remove_is_playing_listener(self._on_playing_status_changed) 
     self.set_launch_button(None)
     ClipSlotComponent.disconnect(self)
 def __init__(self):
     ClipSlotComponent.__init__(self)
     self._scene_index = -1
     self._track_index = -1
     self._serato_interface = None
 def _update_clip_property_slots(self):
     clip = self._clip_slot.clip if self._clip_slot else None
     self._on_name_changed.subject = clip
     ClipSlotComponent._update_clip_property_slots(self)
     return
Пример #18
0
 def __init__(self, tid, sid):
     ClipSlotComponent.__init__(self)
     self._tid = tid
     self._sid = sid
Пример #19
0
 def __init__(self):
     ClipSlotComponent.__init__(self)
     self._noclip_value = 4
     self.set_allow_update(True)