aboutsummaryrefslogtreecommitdiff
path: root/lib/util.h
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2019-06-29 19:59:54 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2019-06-29 20:05:33 +0900
commitf58e3a24161db2cb2e400b5a686f140eb054f541 (patch)
tree23a8e907fd1d1c1d2306330b30db0c8f3d9e5562 /lib/util.h
parent5722ceaf4bd10c29f1091e3dc5a87f5650ea8c71 (diff)
parentd3ddd394e855cfe217bf0f0d368822c9b99316bb (diff)
downloadlibquotient-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.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/util.h b/lib/util.h
index d626834c..a78e59bd 100644
--- a/lib/util.h
+++ b/lib/util.h
@@ -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