+ return QVariant();
+}
+
+quint32 ChatLineModelItem::messageLabel() const {
+ quint32 label = _styledMsg.senderHash() << 16;
+ if(_styledMsg.flags() & Message::Self)
+ label |= UiStyle::OwnMsg;
+ if(_styledMsg.flags() & Message::Highlight)
+ label |= UiStyle::Highlight;
+ return label;
+}
+
+QVariant ChatLineModelItem::backgroundBrush(UiStyle::FormatType subelement) const {
+ QTextCharFormat fmt = QtUi::style()->format(UiStyle::formatType(_styledMsg.type()) | subelement, messageLabel());
+ if(fmt.hasProperty(QTextFormat::BackgroundBrush))
+ return QVariant::fromValue<QBrush>(fmt.background());
+ return QVariant();