Beispiel #1
0
    def setupUi(self,):
        self.slider.setMaximum(self.npoints-1)
        conecta(self.slider, QtCore.SIGNAL("valueChanged(int)"), self.updateFromSlider)
        self._d = []
        for f, i in zip([self.atras, self.adelante], [-1, 1]):
            self._d.append(partial(self.estadoAnimacion,i))
            conecta(f, QtCore.SIGNAL("clicked()"), self._d[-1])

        def changeText(btn,text):
            btn.setText(text)
#        conecta(self.adelante, QtCore.SIGNAL("clicked()"), partial(changeText,self.adelante,"||"))
#        conecta(self.adelante, QtCore.SIGNAL("clicked()"), partial(changeText,self.atras,"<"))
#        conecta(self.atras, QtCore.SIGNAL("clicked()"), partial(changeText,self.atras,"||"))
#        conecta(self.atras, QtCore.SIGNAL("clicked()"), partial(changeText,self.adelante,"<"))

        conecta(self.timeline, QtCore.SIGNAL("finished()"), partial(changeText,self.adelante,">"))
        conecta(self.timeline, QtCore.SIGNAL("finished()"), partial(changeText,self.atras,"<"))
Beispiel #2
0
 def setupUi(self,):
     self.nombre.setTitle(self.name + ": %.3f" % self.intervalo.t)
     self.slider.setMaximum(self.intervalo.npoints-1)
     self.slider.setValue(self.intervalo.n)
     conecta(self.slider, QtCore.SIGNAL("valueChanged(int)"), self.updateFromSlider)
     self._d = []
     for f, i in zip([self.atras, self.pausa, self.adelante], [-1, 0, 1]):
         self._d.append(partial(self.estadoAnimacion,i))
         conecta(f, QtCore.SIGNAL("clicked()"), self._d[-1])
Beispiel #3
0
 def setupUi(self, ):
     self.nombre.setTitle(self.name + ": %.3f" % self.intervalo.t)
     self.slider.setMaximum(self.intervalo.npoints - 1)
     self.slider.setValue(self.intervalo.n)
     conecta(self.slider, QtCore.SIGNAL("valueChanged(int)"),
             self.updateFromSlider)
     self._d = []
     for f, i in zip([self.atras, self.pausa, self.adelante], [-1, 0, 1]):
         self._d.append(partial(self.estadoAnimacion, i))
         conecta(f, QtCore.SIGNAL("clicked()"), self._d[-1])
Beispiel #4
0
    def updateRange(self, rangep):
        ## rangep = (vmin, vmax, vini)
        self.timeline = QtCore.QTimeLine(self.timeline.duration())
        self.range = rangep + type(rangep)([self.npoints])
        self.vmin, self.vmax, self.vini, self.npoints = self.range
        self.funcTrans = partial(segment, self.vmin, self.vmax)
        self.timeline.setFrameRange(0, self.npoints-1)
        curTime = float(self.vini - self.vmin) /(self.vmax - self.vmin) * self.timeline.duration()
        self.timeline.setCurrentTime(curTime)
        ## ============================
        conecta(self.timeline, QtCore.SIGNAL("valueChanged(qreal)"), lambda t: self.func(self.funcTrans(t)))
        conecta(self.timeline, QtCore.SIGNAL("valueChanged(qreal)"), lambda t: self.updateLabel(self.funcTrans(t)))
        conecta(self.timeline, QtCore.SIGNAL("frameChanged(int)"), self.updateSlider)
        ## ============================
#        self.nombre.setTitle(self.name + ": %.3f" % self.vini)
        hasattr(self, 'nombre') and self.nombre.setText(self.name + ": %.3f" % self.vini)
        self.slider.setValue(self.timeline.currentFrame())
Beispiel #5
0
 def make_curva(c):
     return partial(par_parab, c)
Beispiel #6
0
 def make_tang(c):
     return partial(esfera_v, c)
Beispiel #7
0
 def make_curva(c):
     return partial(par_esfera, c)
Beispiel #8
0
 def make_curva(c):
     return partial(par_curva, c)
Beispiel #9
0
 def make_circulo(t):
     return partial(par_esfera, t)
Beispiel #10
0
 def make_tang(c):
     return partial(toro_v, c)
Beispiel #11
0
 def make_tang(c):
     return partial(par_tang,c)
Beispiel #12
0
 def make_curva(c):
     return partial(par_parab,c)
Beispiel #13
0
 def make_tang(c):
     return partial(esfera_v, c)
Beispiel #14
0
 def make_curva(c):
     return partial(par_esfera, c)
Beispiel #15
0
 def make_curva(c):
     return partial(par_curva,c)
Beispiel #16
0
 def make_tang(c):
     return partial(par_tang, c)
Beispiel #17
0
 def make_curva(c):
     return partial(toroParam1, c)
Beispiel #18
0
 def make_curva(c):
     return partial(toroParam1,c)
Beispiel #19
0
 def make_circulo(t):
     return partial(par_esfera, t)
Beispiel #20
0
 def make_tang(c):
     return partial(toro_v,c)