1 from ConditionalWidget import *
9 def getePixmap(self, parent):
10 #pixmap = ePixmap(parent)
11 #pixmap.setPixmapFromFile(self.filename)
12 return ePixmap(parent)
14 def createWidget(self, parent):
15 return self.getePixmap(parent)
17 def removeWidget(self, w):
21 self.instance.move(ePoint(int(x), int(y)))
23 class PixmapConditional(ConditionalWidget, Pixmap):
24 def __init__(self, withTimer = True):
25 ConditionalWidget.__init__(self)
28 class MovingPixmap(Pixmap):
34 # TODO: get real values
38 self.moveTimer = eTimer()
39 self.moveTimer.timeout.get().append(self.doMove)
41 def moveTo(self, x, y, time = 20):
45 self.stepX = (self.destX - self.x) / float(time)
46 self.stepY = (self.destY - self.y) / float(time)
48 def startMoving(self):
51 self.moveTimer.start(10)
57 self.move(int(self.x), int(self.y))