Exemplo n.º 1
0
    def changeTime(self):
        if self.isLoaded:

            self.ui.maxframe.setText(str(int(mxs.currentTime)))
            self.ui.refframe.setText(
                str(int(mxs.currentTime) - self.time_shift))

            try:
                self.pixmap = self.images[int(mxs.currentTime) -
                                          self.time_shift].scaled(
                                              self.width, self.height,
                                              QtCore.Qt.KeepAspectRatio,
                                              QtCore.Qt.FastTransformation)
                self.ui.viewer.setPixmap(self.pixmap)
                self.ui.viewer.repaint()
                self.ui.maxframe.setText(str(int(mxs.currentTime)))
                self.ui.refframe.setText(
                    str(int(mxs.currentTime) - self.time_shift))
                self.out_of_range = False
                self.last_valid_frame = int(mxs.currentTime) - self.time_shift
            except:
                out = True
                is_playing = mxs.isAnimPlaying()
                if self.isLoaded and not self.ui.btn_loop.isChecked():
                    self.status_2()

                if self.isLoaded:

                    if self.ui.btn_loop.isChecked():
                        mxs.stopAnimation()
                        mxs.sliderTime = self.time_shift
                        if is_playing and out:
                            mxs.playAnimation()
                self.out_of_range = True
Exemplo n.º 2
0
 def endFrame(self):
     # mxs.execute("max time end")
     mxs.stopAnimation()
     mxs.sliderTime = self.time_shift + (self.last_frame - 1)
     self.ui.btn_play.setIcon(self.play_icon)
     self.ui.btn_play.setChecked(False)
     self.ui.sb_time_shift.setEnabled(True)
Exemplo n.º 3
0
 def startFrame(self):
     # mxs.execute("max time start")
     mxs.stopAnimation()
     mxs.sliderTime = self.time_shift
     self.ui.btn_play.setIcon(self.play_icon)
     self.ui.btn_play.setChecked(False)
     self.ui.sb_time_shift.setEnabled(True)
Exemplo n.º 4
0
    def playFrame(self):
        if mxs.isAnimPlaying():
            self.ui.sb_time_shift.setEnabled(True)
            mxs.stopAnimation()

        elif not mxs.isAnimPlaying():
            self.ui.sb_time_shift.setEnabled(False)
            mxs.playAnimation()
Exemplo n.º 5
0
 def previousFrame(self):
     mxs.stopAnimation()
     self.ui.btn_play.setChecked(False)
     mxs.sliderTime -= 1
     self.ui.sb_time_shift.setEnabled(True)