def __init__(self, parent=None, front_color=None, background_color=None, *args): QtWidgets.QLabel.__init__(self, parent, *args) if front_color is None: front_color = (255, 255, 255) if background_color is None: background_color = (0, 0, 0) self._alpha = 255 self.__style() self.front_color = QtGui.QColor(front_color[0], front_color[1], front_color[2]) self.background_color = QtGui.QColor(background_color[0], background_color[1], background_color[2]) self._message_display_timer = QtCore.QTimer(self) self._message_display_timer.timeout.connect(self.display) self._message_fadeout_timer = QtCore.QTimer(self) self._message_fadeout_timer.timeout.connect(self.fadeout)
def reset(self): if not self._timer: self._timer = QtCore.QTimer(self.parent()) self._timer.setSingleShot(False) self._timer.timeout.connect(self._frame_changed) if not self._paused: self._frame = 0 self._timer.stop()
def __init__(self, parent=None, fps=24, timer=5, *args): QtWidgets.QLabel.__init__(self, parent, *args) self.__style() self._fps = fps self.timer = timer * 100 self._filename = None self._image_sequence = ImageSequence(self._fps) self._image_sequence.frame_changed.connect(self._frame_changed) self.player_install = False self.player_install_timer = QtCore.QTimer(self.parent()) self.player_install_timer.setSingleShot(False) self.player_install_timer.timeout.connect(self.__start)