Exemplo n.º 1
0
    def __init__(self, qSplitter, newSizes):

        QtCore.QVariantAnimation.__init__(self, None)

        self.__splitter = qSplitter
        self.sizes = zip(qSplitter.sizes(), newSizes)
        self.setStartValue(0.0)
        self.setEndValue(1.0)
        self.setEasingCurve(QtCore.QEasingCurve(QtCore.QEasingCurve.OutCubic))
Exemplo n.º 2
0
    def anim_into_place(self, end_pos):
        if self.get_is_animating():
            return
        if end_pos == self.pos():
            return
        self.view._animating.append(self)
        if self.view.do_animations:
            self.setup_in_anim()
        else:
            self.setPos(end_pos)
            self.in_anim_group.finished.emit()
            return

        self.opacity_anim.setStartValue(0)
        self.opacity_anim.setEndValue(1)
        self.opacity_anim.setDuration(80)

        curve = QtCore.QEasingCurve(QtCore.QEasingCurve.OutBack)
        curve.setAmplitude(.8)
        self.pos_anim.setEasingCurve(curve)

        self.pos_anim.setDuration(100)
        self.pos_anim.setEndValue(end_pos)
        self.in_anim_group.start()