From: Manuel Nickschas Date: Wed, 24 Jun 2009 07:44:21 +0000 (+0200) Subject: Parse format parameters in QSS X-Git-Tag: 0.5-rc1~134 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=c870a4980ba79f784781e75b89ec537f1ec343ac;ds=sidebyside Parse format parameters in QSS Adds [format="$fmt"], where $fmt can be one of "bold", "italic", "underline" and "reverse" corresponding to the respective mIRC format codes. --- diff --git a/src/uisupport/qssparser.cpp b/src/uisupport/qssparser.cpp index c25bceb8..585b769d 100644 --- a/src/uisupport/qssparser.cpp +++ b/src/uisupport/qssparser.cpp @@ -243,6 +243,20 @@ quint64 QssParser::parseFormatType(const QString &decl) { } fmtType |= val << 48; } + } else if(condName == "format") { + if(condValue == "bold") + fmtType |= UiStyle::Bold; + if(condValue == "italic") + fmtType |= UiStyle::Italic; + if(condValue == "underline") + fmtType |= UiStyle::Underline; + if(condValue == "reverse") + fmtType |= UiStyle::Reverse; + else { + qWarning() << Q_FUNC_INFO << tr("Invalid format name: %1").arg(condValue); + return UiStyle::Invalid; + } + } // TODO: colors }