mirror of
https://github.com/LC044/WeChatMsg
synced 2024-11-15 14:24:12 +08:00
299 lines
21 KiB
Python
299 lines
21 KiB
Python
#!/usr/bin/env python
|
|
# -*- coding: utf-8 -*-
|
|
|
|
"""
|
|
Created on 2019年7月26日
|
|
@author: Irony
|
|
@site: https://pyqt5.com https://github.com/892768447
|
|
@email: 892768447@qq.com
|
|
@file: CustomWidgets.CAvatar
|
|
@description: 头像
|
|
"""
|
|
import os
|
|
|
|
from PyQt5.QtCore import QUrl, QRectF, Qt, QSize, QTimer, QPropertyAnimation, \
|
|
QPointF, pyqtProperty
|
|
from PyQt5.QtGui import QPixmap, QColor, QPainter, QPainterPath, QMovie
|
|
from PyQt5.QtNetwork import QNetworkAccessManager, QNetworkDiskCache, \
|
|
QNetworkRequest
|
|
from PyQt5.QtWidgets import QWidget, qApp
|
|
|
|
__Author__ = 'Irony'
|
|
__Copyright__ = 'Copyright (c) 2019 Irony'
|
|
__Version__ = 1.0
|
|
|
|
|
|
class CAvatar(QWidget):
|
|
Circle = 0 # 圆圈
|
|
Rectangle = 1 # 圆角矩形
|
|
SizeLarge = QSize(128, 128)
|
|
SizeMedium = QSize(64, 64)
|
|
SizeSmall = QSize(32, 32)
|
|
StartAngle = 0 # 起始旋转角度
|
|
EndAngle = 360 # 结束旋转角度
|
|
|
|
def __init__(self, *args, shape=0, url='', img_bytes=None, cacheDir=False, size=QSize(64, 64), animation=False,
|
|
**kwargs):
|
|
super(CAvatar, self).__init__(*args, **kwargs)
|
|
self.url = ''
|
|
self._angle = 0 # 角度
|
|
self.pradius = 0 # 加载进度条半径
|
|
self.animation = animation # 是否使用动画
|
|
self._movie = None # 动态图
|
|
self._pixmap = QPixmap() # 图片对象
|
|
self.pixmap = QPixmap() # 被绘制的对象
|
|
self.isGif = url.endswith('.gif')
|
|
# 进度动画定时器
|
|
self.loadingTimer = QTimer(self, timeout=self.onLoading)
|
|
# 旋转动画
|
|
self.rotateAnimation = QPropertyAnimation(
|
|
self, b'angle', self, loopCount=1)
|
|
self.setShape(shape)
|
|
self.setCacheDir(cacheDir)
|
|
self.setSize(size)
|
|
if img_bytes:
|
|
self.setBytes(img_bytes)
|
|
else:
|
|
self.setUrl(url)
|
|
|
|
def paintEvent(self, event):
|
|
super(CAvatar, self).paintEvent(event)
|
|
# 画笔
|
|
painter = QPainter(self)
|
|
painter.setRenderHint(QPainter.Antialiasing, True)
|
|
painter.setRenderHint(QPainter.HighQualityAntialiasing, True)
|
|
painter.setRenderHint(QPainter.SmoothPixmapTransform, True)
|
|
# 绘制
|
|
path = QPainterPath()
|
|
diameter = min(self.width(), self.height())
|
|
if self.shape == self.Circle:
|
|
radius = int(diameter / 2)
|
|
elif self.shape == self.Rectangle:
|
|
radius = 4
|
|
halfW = self.width() / 2
|
|
halfH = self.height() / 2
|
|
painter.translate(halfW, halfH)
|
|
path.addRoundedRect(
|
|
QRectF(-halfW, -halfH, diameter, diameter), radius, radius)
|
|
painter.setClipPath(path)
|
|
# 如果是动画效果
|
|
if self.rotateAnimation.state() == QPropertyAnimation.Running:
|
|
painter.rotate(self._angle) # 旋转
|
|
painter.drawPixmap(
|
|
QPointF(-self.pixmap.width() / 2, -self.pixmap.height() // 2), self.pixmap)
|
|
else:
|
|
painter.drawPixmap(-int(halfW), -int(halfH), self.pixmap)
|
|
# 如果在加载
|
|
if self.loadingTimer.isActive():
|
|
diameter = 2 * self.pradius
|
|
painter.setBrush(
|
|
QColor(45, 140, 240, int((1 - self.pradius / 10) * 255)))
|
|
painter.setPen(Qt.NoPen)
|
|
painter.drawRoundedRect(
|
|
QRectF(-self.pradius, -self.pradius, diameter, diameter), self.pradius, self.pradius)
|
|
|
|
def enterEvent(self, event):
|
|
"""鼠标进入动画
|
|
:param event:
|
|
"""
|
|
if not (self.animation and not self.isGif):
|
|
return
|
|
self.rotateAnimation.stop()
|
|
cv = self.rotateAnimation.currentValue() or self.StartAngle
|
|
self.rotateAnimation.setDuration(
|
|
540 if cv == 0 else int(cv / self.EndAngle * 540))
|
|
self.rotateAnimation.setStartValue(cv)
|
|
self.rotateAnimation.setEndValue(self.EndAngle)
|
|
self.rotateAnimation.start()
|
|
|
|
def leaveEvent(self, event):
|
|
"""鼠标离开动画
|
|
:param event:
|
|
"""
|
|
if not (self.animation and not self.isGif):
|
|
return
|
|
self.rotateAnimation.stop()
|
|
cv = self.rotateAnimation.currentValue() or self.EndAngle
|
|
self.rotateAnimation.setDuration(int(cv / self.EndAngle * 540))
|
|
self.rotateAnimation.setStartValue(cv)
|
|
self.rotateAnimation.setEndValue(self.StartAngle)
|
|
self.rotateAnimation.start()
|
|
|
|
def onLoading(self):
|
|
"""更新进度动画
|
|
"""
|
|
if self.loadingTimer.isActive():
|
|
if self.pradius > 9:
|
|
self.pradius = 0
|
|
self.pradius += 1
|
|
else:
|
|
self.pradius = 0
|
|
self.update()
|
|
|
|
def onFinished(self):
|
|
"""图片下载完成
|
|
"""
|
|
self.loadingTimer.stop()
|
|
self.pradius = 0
|
|
reply = self.sender()
|
|
|
|
if self.isGif:
|
|
self._movie = QMovie(reply, b'gif', self)
|
|
if self._movie.isValid():
|
|
self._movie.frameChanged.connect(self._resizeGifPixmap)
|
|
self._movie.start()
|
|
else:
|
|
data = reply.readAll().data()
|
|
reply.deleteLater()
|
|
del reply
|
|
self._pixmap.loadFromData(data)
|
|
if self._pixmap.isNull():
|
|
self._pixmap = QPixmap(self.size())
|
|
self._pixmap.fill(QColor(204, 204, 204))
|
|
self._resizePixmap()
|
|
|
|
def onError(self, code):
|
|
"""下载出错了
|
|
:param code:
|
|
"""
|
|
self._pixmap = QPixmap(self.size())
|
|
self._pixmap.fill(QColor(204, 204, 204))
|
|
self._resizePixmap()
|
|
|
|
def refresh(self):
|
|
"""强制刷新
|
|
"""
|
|
self._get(self.url)
|
|
|
|
def isLoading(self):
|
|
"""判断是否正在加载
|
|
"""
|
|
return self.loadingTimer.isActive()
|
|
|
|
def setShape(self, shape):
|
|
"""设置形状
|
|
:param shape: 0=圆形, 1=圆角矩形
|
|
"""
|
|
self.shape = shape
|
|
|
|
def setBytes(self, img_bytes):
|
|
self._pixmap = QPixmap()
|
|
if img_bytes[:4] == b'\x89PNG':
|
|
self._pixmap.loadFromData(img_bytes, format='PNG')
|
|
else:
|
|
self._pixmap.loadFromData(img_bytes, format='jfif')
|
|
self._resizePixmap()
|
|
|
|
def setUrl(self, url):
|
|
"""设置url,可以是本地路径,也可以是网络地址
|
|
:param url:
|
|
"""
|
|
return
|
|
self.url = url
|
|
self._get(url)
|
|
|
|
def setCacheDir(self, cacheDir=''):
|
|
"""设置本地缓存路径
|
|
:param cacheDir:
|
|
"""
|
|
self.cacheDir = cacheDir
|
|
self._initNetWork()
|
|
|
|
def setSize(self, size):
|
|
"""设置固定尺寸
|
|
:param size:
|
|
"""
|
|
if not isinstance(size, QSize):
|
|
size = self.SizeMedium
|
|
self.setMinimumSize(size)
|
|
self.setMaximumSize(size)
|
|
self._resizePixmap()
|
|
|
|
@pyqtProperty(int)
|
|
def angle(self):
|
|
return self._angle
|
|
|
|
@angle.setter
|
|
def angle(self, value):
|
|
self._angle = value
|
|
self.update()
|
|
|
|
def _resizePixmap(self):
|
|
"""缩放图片
|
|
"""
|
|
if not self._pixmap.isNull():
|
|
self.pixmap = self._pixmap.scaled(
|
|
self.width(), self.height(), Qt.IgnoreAspectRatio, Qt.SmoothTransformation)
|
|
self.update()
|
|
|
|
def _resizeGifPixmap(self, _):
|
|
"""缩放动画图片
|
|
"""
|
|
if self._movie:
|
|
self.pixmap = self._movie.currentPixmap().scaled(
|
|
self.width(), self.height(), Qt.IgnoreAspectRatio, Qt.SmoothTransformation)
|
|
self.update()
|
|
|
|
def _initNetWork(self):
|
|
"""初始化异步网络库
|
|
"""
|
|
if not hasattr(qApp, '_network'):
|
|
network = QNetworkAccessManager(self.window())
|
|
setattr(qApp, '_network', network)
|
|
# 是否需要设置缓存
|
|
if self.cacheDir and not qApp._network.cache():
|
|
cache = QNetworkDiskCache(self.window())
|
|
cache.setCacheDirectory(self.cacheDir)
|
|
qApp._network.setCache(cache)
|
|
|
|
def _get(self, url):
|
|
"""设置图片或者请求网络图片
|
|
:param url:
|
|
"""
|
|
if not url:
|
|
self.onError('')
|
|
return
|
|
if url.startswith('http') and not self.loadingTimer.isActive():
|
|
url = QUrl(url)
|
|
request = QNetworkRequest(url)
|
|
# request.setHeader(QNetworkRequest.UserAgentHeader, b'CAvatar')
|
|
# request.setRawHeader(b'Author', b'Irony')
|
|
request.setAttribute(
|
|
QNetworkRequest.FollowRedirectsAttribute, True)
|
|
if qApp._network.cache():
|
|
request.setAttribute(
|
|
QNetworkRequest.CacheLoadControlAttribute, QNetworkRequest.PreferNetwork)
|
|
request.setAttribute(
|
|
QNetworkRequest.CacheSaveControlAttribute, True)
|
|
reply = qApp._network.get(request)
|
|
self.pradius = 0
|
|
self.loadingTimer.start(50) # 显示进度动画
|
|
reply.finished.connect(self.onFinished)
|
|
reply.error.connect(self.onError)
|
|
return
|
|
self.pradius = 0
|
|
if os.path.exists(url) and os.path.isfile(url):
|
|
if self.isGif:
|
|
self._movie = QMovie(url, parent=self)
|
|
if self._movie.isValid():
|
|
self._movie.frameChanged.connect(self._resizeGifPixmap)
|
|
self._movie.start()
|
|
else:
|
|
self._pixmap = QPixmap(url)
|
|
self._resizePixmap()
|
|
else:
|
|
self.onError('')
|
|
|
|
|
|
if __name__ == '__main__':
|
|
import sys
|
|
from PyQt5.QtWidgets import QApplication
|
|
|
|
app = QApplication(sys.argv)
|
|
w = CAvatar(
|
|
img_bytes=b'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x84\x00\x00\x00\x84\x08\x00\x00\x00\x00t/\xdc{\x00\x00\x00\x04gAMA\x00\x00\xb1\x8f\x0b\xfca\x05\x00\x00\x00 cHRM\x00\x00z&\x00\x00\x80\x84\x00\x00\xfa\x00\x00\x00\x80\xe8\x00\x00u0\x00\x00\xea`\x00\x00:\x98\x00\x00\x17p\x9c\xbaQ<\x00\x00\x00\x02bKGD\x00\xff\x87\x8f\xcc\xbf\x00\x00\x0e\x8fIDATx\xda\xed\x9b[\x8c]\xd7Y\xc7\xbf\xff\xb7\xd6\xde\xfb\x9c3w\xdf&\xbe\xdf\x9d\xa4\xbe\xc4\x89krmI\xdc\x06\xa5i\xa0$\x95\xa0\x95\x02U\x0bBH(\\\xfa\x80\x10<\xf0\xd6\x07\xfa\x80D\x1e\xa0P\xa2\x02-\xa1)%j\x13\xd2\xe6~O\x9a\xc4J\x9a\xc4\x8e\xeb\xcb8\xf8\x9eq\xec\x8c\xe7~\xf6\xdek}\x7f\x1e\xce\x8c\xc7g<c\x8f\x8dP\x04:K\x9a\x87\xd93k\xed\xdf\xf9\xd6w\xfff0&\x1f\xff\xd2\x8f\x1b\xa0\x05\xd1\x82hA\xb4 Z\x10-\x88\x16D\x0b\xa2\x05\xd1\x82hA\xb4 Z\x10-\x88\x16D\x0b\xe2\xe3\x06hA\\.\x04\xe6\xf0\x1c""\x049\xf5\x90\x14\x10 \x85\x8d\xef.\x05\x02"\x94\xcbZJU\x9b8\x81\x02\x08\x1d\xa9J\x15\x11\xcc\xf0Q\xfc\xecG]&\x81\x88P h\x9c\x00\x8a\x88\xd0DL@\n\x00\x9b;\x04\x84\x00\xe2eb\x14\xe2\x05b\x02\x884d!@C4v\xbe(f\x85\xa0\x88ApY\xf2\x88.\x01HN^(\xa1AT"\x01\x88\x9e\x7f\xe2\xec\xd7\x01\x11\x9a\x9f\x90\xe7\xa5-\x1fI:\x00\x93*a\xe6\xa4\xa4\xa6\x9c\xd0\xceikv\xc5\xa48\x970\x10\x86\te\xe2\xac\xbf9e"\x14\xc6(\x92\xb0b\x89D\x03\x80\x08\x08T\x99i\x11\x01^\x92b\x82%\x08/\xd4\x86\xbd\x11r\xa1\xd5 \x84\xc1\x07"\xee\xdc\xb3ce\xee\xa1\xa6$\xd5$\xab\x7f0\xd0\xb9\x04*\xa22\xa9\xb3s\x81\x88\xe2)4\x99\x80\x9f\xc3\xad\x80b\xa0\xa9\xc5\x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d7\xf1q\xb8\x1bz\\\xa0\xcdI\x8c\xae\xac\x14\x86\xf8\xce \x16\xcf\x9b6\xc0\xbe,Id\xa3i\xa5\xd6\xd1\xdb\xbb\xf6\x13;\x1cA77\xad\xa8\x8cV\xeb\xd9\xae\x87$\xb9\xba\xcbh\xfa?\xbc\x0e\x1d\xcf\xd8s\xef@\xe1\xabH\x181G\xcd4&\xca\xa7~tX\x16m\xb3Y&i\x97\x00AT\xc7\x1dc\x97\xc1\x11\x91P\x9b\xd36U\x8e\xa7?;\xbc\xa0\xbeu\xa3\xcd\xa2\xca\x98\xfb\xbf\xdb\xc0\x8a\xaa\x04U"\x84D\x04s\x1b\x1e\x13E\xd5dh$\xef\xaeVl\x96=\x97\x00A\x8d\xde\x08\x81\x01\x86\x99\x1d\xf0\x0c\x82\x08\xe2\x83\x13\xf3\xf5t6A\\\x8a\x9f@\xf4\x91\r\xf7M\x05q\xf1I\xa9\x88H\xd4$x#\xa2\x9f}\xb4z\t\x92\xf8\xdf[\xff\xe7\xfe\xa6\xa6\x05\xd1\x82hA\xb4 Z\x10\x1f\xfbjA\xb4 Z\x10-\x88\x16D\x0b\xa2\x05\xd1\x82\xf8\x7f\x01\xf1\xdf\x91\xd3\xe9`7\x9a\x1c\x88\x00\x00\x00\x12tEXtexif:ExifOffset\x00620\x1a\xa3x\x00\x00\x00\x12tEXtexif:ImageLength\x000\xc1\xc5N\xce\x00\x00\x00\x11tEXtexif:ImageWidth\x000/\xffv\xa0\x00\x00\x00\x12tEXtexif:LightSource\x000x\x05kH\x00\x00\x00\x00IEND\xaeB`\x82'
|
|
,
|
|
url='https://wx.qlogo.cn/mmhead/ver_1/DpDqmvTDORNWfLrMj26YicorEUREffl1G8FapawdKgINVH9g1icudfWesGrH9LqeGAz16z4PmkW9U1KAIM3btWgozZ1GaLF66bdKdxlMdazmibn2hpFeiaa4613dN6HM4Vfk/132')
|
|
w.show()
|
|
sys.exit(app.exec_())
|