def __init__(self):
"""
Initialise class
"""
QtWidgets.QWidget.__init__(self)
self.setupUi(self)
output.PPTevents.updateSlide = self.powerpointSlides.setCurrentRow
self.contentControls.setCurrentIndex(0)
# TODO not implemented
"""
self.mediaProgressSeek.setMouseTracking(True)
self.mediaProgressSeek.leaveEvent=self.seekMouse
self.mediaProgressSeek.mouseMoveEvent=self.seekMouse
self.mediaProgressSeek.mouseReleaseEvent=lambda e: output.seek(e.x()/self.mediaProgressSeek.width())
"""
# Update video scrubber position
class ProgressBarUpdater(QtCore.QThread):
tick = QtCore.pyqtSignal(int)
def run(self):
while True:
self.sleep(1)
self.tick.emit(oncue.lib.utils.confine(int(output.VLCposition() * 1000), 0, 1000))
self.mediaProgressBarThread = ProgressBarUpdater()
self.mediaProgressBarThread.tick.connect(
lambda value: self.mediaProgressBar.setValue(value) or self.mediaProgressBar.repaint())
评论列表
文章目录