+ def getClockPixmap(self, refstr, beginTime, duration, eventId):
+ pre_clock = 1
+ post_clock = 2
+ clock_type = 0
+ endTime = beginTime + duration
+ for x in self.timer.timer_list:
+ if x.service_ref.ref.toString() == refstr:
+ if x.eit == eventId:
+ return self.clock_pixmap
+ beg = x.begin
+ end = x.end
+ if beginTime > beg and beginTime < end and endTime > end:
+ clock_type |= pre_clock
+ elif beginTime < beg and endTime > beg and endTime < end:
+ clock_type |= post_clock
+ if clock_type == 0:
+ return self.clock_add_pixmap
+ elif clock_type == pre_clock:
+ return self.clock_pre_pixmap
+ elif clock_type == post_clock:
+ return self.clock_post_pixmap
+ else:
+ return self.clock_prepost_pixmap
+
+ def getPixmapForEntry(self, service, eventId, beginTime, duration):
+ rec=beginTime and (self.timer.isInTimer(eventId, beginTime, duration, service))
+ if rec:
+ clock_pic = self.getClockPixmap(service, beginTime, duration, eventId)
+ else:
+ clock_pic = None
+ return (clock_pic, rec)
+