|
|
@ -21,9 +21,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
|
|
|
|
|
|
import logging; logger = logging.getLogger(__name__); logger.info("import") |
|
|
|
|
|
|
|
from PyQt5 import QtGui, QtWidgets |
|
|
|
from PyQt5 import QtCore, QtGui, QtWidgets |
|
|
|
|
|
|
|
from hashlib import md5 |
|
|
|
|
|
|
|
|
|
|
|
def iconFromString(st, size=128): |
|
|
|
px = QtGui.QPixmap(size,size) |
|
|
|
color = stringToColor(st) |
|
|
|
px.fill(color) |
|
|
|
return QtGui.QIcon(px) |
|
|
|
|
|
|
|
def stringToColor(st): |
|
|
|
"""Convert a string to QColor. Same string, same color |
|
|
|
Is used for group coloring""" |
|
|
|