Ejemplo n.º 1
0
 def anim_popup_bar(popup_bar):
     anim = QtCore.QPropertyAnimation(
         popup_bar, 
         'maximumHeight'
     )
     anim.setStartValue(0)
     anim.setEndValue(46)
     anim.setDuration(400)
     anim.start()
     anim_popup_bar.anim = anim
Ejemplo n.º 2
0
 def animate_popup(self, start=0, end=46):
     """
     FIXME: This works in the prototype, but
     not here yet. Perhaps because it's called
     via a few signals, or something to do with
     the parent object being the tabeditor while
     the class is instantiated on the tabeditor's
     parent class, pythoneditor.
     """
     anim = QtCore.QPropertyAnimation(self.popup_bar, 'maximumHeight')
     self._anim = anim
     anim.setStartValue(start)
     anim.setEndValue(end)
     anim.setDuration(400)
     anim.start()
Ejemplo n.º 3
0
            anim_popup_bar.anim = anim

        anim_popup_bar(popup_bar)
    
tabs = _ide.python_editor.tabeditor
def test_A():
    A = PopupBarTest(tabs)
    for i in range(1):
        A.show_popup_signal.emit()
        #A.show_popup_bar()
    
#test_A()
QtCore.QTimer.singleShot(300, test_A)
#&&

anim2 = QtCore.QPropertyAnimation(popup_bar, 'maximumHeight')
#anim2.setStartValue(popup_bar.maximumHeight())
anim2.setStartValue(46)
anim2.setEndValue(0)
anim2.setDuration(500)
from functools import partial
start = partial(QtCore.QTimer.singleShot, 1200, anim2.start)
anim.finished.connect(start)

#anim2.finished.connect(popup_bar.deleteLater)

#&&

anim = QtCore.QPropertyAnimation(popup_bar, 'size')
anim.setStartValue(QtCore.QSize(958, 0))
anim.setEndValue(QtCore.QSize(958, 46))