X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Fuistyle.h;h=4d983309e270807ded10d54df40d1eea8c79dece;hp=f09cdbc4d9a5c6c5af0315e09765b39d24a31b74;hb=1f7cffc751c022ddea816db471f7870a60dc0d1c;hpb=70706ff642683d03ff091cab25d984ec7d9612de diff --git a/src/uisupport/uistyle.h b/src/uisupport/uistyle.h index f09cdbc4..4d983309 100644 --- a/src/uisupport/uistyle.h +++ b/src/uisupport/uistyle.h @@ -1,11 +1,11 @@ /*************************************************************************** - * Copyright (C) 2005-07 by the Quassel IRC Team * + * Copyright (C) 2005-08 by the Quassel Project * * devel@quassel-irc.org * * * * 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