diff options
author | Alexey Andreyev <aa13q@ya.ru> | 2019-05-15 16:36:02 +0300 |
---|---|---|
committer | Alexey Andreyev <aa13q@ya.ru> | 2019-05-23 02:12:56 +0300 |
commit | 48ffee5fa78f44bd00d76772ad79ae4eeb6c8dc4 (patch) | |
tree | 7dd9996a3e89f36a942617a740fd33c069871e1e /lib/util.h | |
parent | d6f39dcb0de69322479f287514a8c36afcb3fe7b (diff) | |
download | libquotient-48ffee5fa78f44bd00d76772ad79ae4eeb6c8dc4.tar.gz libquotient-48ffee5fa78f44bd00d76772ad79ae4eeb6c8dc4.zip |
Move out the logic of the hue calculation to utils
Diffstat (limited to 'lib/util.h')
-rw-r--r-- | lib/util.h | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -314,5 +314,13 @@ namespace QMatrixClient * \param dir path to cache directory relative to the standard cache path */ QString cacheLocation(const QString& dirName); + + /** Hue color component of based of the hash of the string. + * The implementation is based on XEP-0392: + * https://xmpp.org/extensions/xep-0392.html + * Naming and range are the same as QColor's hueF method: + * https://doc.qt.io/qt-5/qcolor.html#integer-vs-floating-point-precision + */ + qreal stringToHueF(const QString& string); } // namespace QMatrixClient |