Semi-yearly copyright bump
[quassel.git] / src / uisupport / uistyle.h
index 28ba405..899ab9a 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2016 by the Quassel Project                        *
+ *   Copyright (C) 2005-2018 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -81,7 +81,7 @@ public:
         Bold            = 0x00000100,
         Italic          = 0x00000200,
         Underline       = 0x00000400,
-        Reverse         = 0x00000800,
+        Strikethrough   = 0x00000800,
 
         // Individual parts of a message
         Timestamp       = 0x00001000,
@@ -128,6 +128,11 @@ public:
         Invalid           = 0xffffffff
     };
 
+    enum class FormatProperty {
+        AllowForegroundOverride = QTextFormat::UserProperty,
+        AllowBackgroundOverride
+    };
+
     enum class ColorRole {
         MarkerLine,
         // Sender colors (16 + self)
@@ -266,11 +271,12 @@ protected:
     void loadStyleSheet();
     QString loadStyleSheet(const QString &name, bool shouldExist = false);
 
-    QTextCharFormat format(quint64 key) const;
+    QTextCharFormat parsedFormat(quint64 key) const;
     QTextCharFormat cachedFormat(const Format &format, MessageLabel messageLabel) const;
     void setCachedFormat(const QTextCharFormat &charFormat, const Format &format, MessageLabel messageLabel) const;
     void mergeFormat(QTextCharFormat &charFormat, const Format &format, MessageLabel messageLabel) const;
     void mergeSubElementFormat(QTextCharFormat &charFormat, FormatType formatType, MessageLabel messageLabel) const;
+    void mergeColors(QTextCharFormat &charFormat, const Format &format, MessageLabel messageLabel) const;
 
     static FormatType formatType(const QString &code);
     static QString formatCode(FormatType);