diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2019-06-29 19:59:54 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2019-06-29 20:05:33 +0900 |
commit | f58e3a24161db2cb2e400b5a686f140eb054f541 (patch) | |
tree | 23a8e907fd1d1c1d2306330b30db0c8f3d9e5562 /lib/util.h | |
parent | 5722ceaf4bd10c29f1091e3dc5a87f5650ea8c71 (diff) | |
parent | d3ddd394e855cfe217bf0f0d368822c9b99316bb (diff) | |
download | libquotient-f58e3a24161db2cb2e400b5a686f140eb054f541.tar.gz libquotient-f58e3a24161db2cb2e400b5a686f140eb054f541.zip |
Merge remote-tracking branch 'remotes/origin/master' into use-clang-format
Diffstat (limited to 'lib/util.h')
-rw-r--r-- | lib/util.h | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -341,4 +341,12 @@ QString prettyPrint(const QString& plainText); * \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 |