Beispiel #1
0
 def __init__(self, parent, notify=None):
     QObject.__init__(self, parent)
     self.count = 0
     self.last_saved = -1
     self.requests = LifoQueue()
     self.notify_requests = LifoQueue()
     self.notify_data = notify
     t = Thread(name='save-thread', target=self.run)
     t.daemon = True
     t.start()
     t = Thread(name='notify-thread', target=self.notify_calibre)
     t.daemon = True
     t.start()
     self.status_widget = w = SaveWidget(parent)
     self.start_save.connect(w.start, type=Qt.QueuedConnection)
     self.save_done.connect(w.stop, type=Qt.QueuedConnection)
Beispiel #2
0
 def __init__(self, parent):
     super(CoverDelegate, self).__init__(parent)
     self._animated_size = 1.0
     self.animation = QPropertyAnimation(self, b'animated_size', self)
     self.animation.setEasingCurve(QEasingCurve.OutInCirc)
     self.animation.setDuration(500)
     self.set_dimensions()
     self.cover_cache = CoverCache()
     self.render_queue = LifoQueue()
     self.animating = None
     self.highlight_color = QColor(Qt.white)
     self.rating_font = QFont(rating_font())