X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Fuistyle.h;h=a80af5e041250226bc23f8d39d9b1e543b3c71ae;hp=f09cdbc4d9a5c6c5af0315e09765b39d24a31b74;hb=2517c75cb456db066aec68f99eed6e42d12a827d;hpb=70706ff642683d03ff091cab25d984ec7d9612de diff --git a/src/uisupport/uistyle.h b/src/uisupport/uistyle.h index f09cdbc4..a80af5e0 100644 --- a/src/uisupport/uistyle.h +++ b/src/uisupport/uistyle.h @@ -5,7 +5,7 @@ * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * + * (at your option) version 3. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * @@ -26,11 +26,12 @@ #include #include "message.h" +#include "settings.h" class UiStyle { public: - UiStyle(); + UiStyle(const QString &settingsKey); virtual ~UiStyle(); /** This enumerates the possible formats a text element may have. */ @@ -59,8 +60,8 @@ class UiStyle { StyledText styleString(QString); - void setFormat(FormatType, QTextCharFormat); - QTextCharFormat format(FormatType) const; + void setFormat(FormatType, QTextCharFormat, Settings::Mode mode/* = Settings::Custom*/); + QTextCharFormat format(FormatType, Settings::Mode mode = Settings::Custom) const; FormatType formatType(const QString &code) const; QString formatCode(FormatType) const; @@ -71,9 +72,12 @@ class UiStyle { private: QTextCharFormat mergedFormat(QList); - QVector _formats; + QVector _defaultFormats; + QVector _customFormats; QHash _formatCodes; + QString _settingsKey; + }; #endif