X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fuisupport%2Fold-uistyle.h;fp=src%2Fuisupport%2Fold-uistyle.h;h=0000000000000000000000000000000000000000;hb=8a6f1f5a61e6aafa4960cfafce1a45f3aeda3a50;hp=7b58c12f3eaae3a8f443fdffa222399edd513e9a;hpb=63af36e607d250637aaba0bba14d2158e79c7bed;p=quassel.git diff --git a/src/uisupport/old-uistyle.h b/src/uisupport/old-uistyle.h deleted file mode 100644 index 7b58c12f..00000000 --- a/src/uisupport/old-uistyle.h +++ /dev/null @@ -1,83 +0,0 @@ -/*************************************************************************** - * 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) version 3. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - ***************************************************************************/ - -#ifndef _OLD_UISTYLE_H_ -#define _OLD_UISTYLE_H_ - -#include -#include -#include - -#include "message.h" -#include "settings.h" - -class UiStyle { - - public: - UiStyle(const QString &settingsKey); - virtual ~UiStyle(); - - /** This enumerates the possible formats a text element may have. */ - enum FormatType { - None, Bold, Italic, Underline, Reverse, // Standard formats - PlainMsg, NoticeMsg, ServerMsg, ErrorMsg, JoinMsg, PartMsg, QuitMsg, KickMsg, // Internal message formats - RenameMsg, ModeMsg, ActionMsg, // ...cnt'd - Timestamp, Sender, Nick, Hostmask, ChannelName, ModeFlags, Url, // individual elements - FgCol00, FgCol01, FgCol02, FgCol03, FgCol04, FgCol05, FgCol06, FgCol07, // Color codes - FgCol08, FgCol09, FgCol10, FgCol11, FgCol12, FgCol13, FgCol14, FgCol15, - BgCol00, BgCol01, BgCol02, BgCol03, BgCol04, BgCol05, BgCol06, BgCol07, - BgCol08, BgCol09, BgCol10, BgCol11, BgCol12, BgCol13, BgCol14, BgCol15, - NumFormatTypes, Invalid // Do not add anything after this - }; - - struct UrlInfo { - int start, end; - QUrl url; - }; - - struct StyledText { - QString plainText; - QList formatList; - QList urls; - }; - - StyledText styleString(const QString &); - - 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; - - protected: - - - private: - QTextCharFormat mergedFormat(QList); - - QVector _defaultFormats; - QVector _customFormats; - QHash _formatCodes; - - QString _settingsKey; - -}; - -#endif