src/eric7/EricWidgets/EricAnimatedLabel.py

branch
eric7
changeset 9413
80c06d472826
parent 9221
bf71ee032bb4
child 9473
3f23dbf37dbe
equal deleted inserted replaced
9412:45e7bb09c120 9413:80c06d472826
9 9
10 from PyQt6.QtCore import pyqtSlot, QTimer 10 from PyQt6.QtCore import pyqtSlot, QTimer
11 from PyQt6.QtGui import QPixmap 11 from PyQt6.QtGui import QPixmap
12 from PyQt6.QtWidgets import QLabel 12 from PyQt6.QtWidgets import QLabel
13 13
14 import UI.PixmapCache 14 from eric7.EricGui import EricPixmapCache
15 15
16 16
17 class EricAnimatedLabel(QLabel): 17 class EricAnimatedLabel(QLabel):
18 """ 18 """
19 Class implementing a label widget showing an animated pixmap. 19 Class implementing a label widget showing an animated pixmap.
52 @param animationFile path to the file containing the animation data 52 @param animationFile path to the file containing the animation data
53 @type str 53 @type str
54 """ 54 """
55 self.__animationFile = animationFile 55 self.__animationFile = animationFile
56 56
57 pixmap = UI.PixmapCache.getPixmap(animationFile) 57 pixmap = EricPixmapCache.getPixmap(animationFile)
58 if not pixmap.isNull(): 58 if not pixmap.isNull():
59 self.__pixmap = pixmap 59 self.__pixmap = pixmap
60 self.__pixmapHeight = pixmap.height() 60 self.__pixmapHeight = pixmap.height()
61 self.__frames = pixmap.width() // pixmap.height() 61 self.__frames = pixmap.width() // pixmap.height()
62 # assume quadratic animation frames 62 # assume quadratic animation frames

eric ide

mercurial