1 /***************************************************************************
2 * Copyright (C) 2005-08 by the Quassel Project *
3 * devel@quassel-irc.org *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) version 3. *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19 ***************************************************************************/
21 #include "qtuistyle.h"
24 QtUiStyle::QtUiStyle() : UiStyle("QtUiStyle") {
26 QtUiStyle::QtUiStyle() : UiStyle("QtUiStyleNew") {
28 // We need to just set our internal formats; everything else is done by the base class...
30 // Internal message formats
31 QTextCharFormat plainMsg;
32 plainMsg.setForeground(QBrush("black"));
33 setFormat(PlainMsg, plainMsg, Settings::Default);
35 QTextCharFormat notice;
36 notice.setForeground(QBrush("navy"));
37 setFormat(NoticeMsg, notice, Settings::Default);
39 QTextCharFormat server;
40 server.setForeground(QBrush("navy"));
41 setFormat(ServerMsg, server, Settings::Default);
43 QTextCharFormat error;
44 error.setForeground(QBrush("red"));
45 setFormat(ErrorMsg, error, Settings::Default);
48 join.setForeground(QBrush("green"));
49 setFormat(JoinMsg, join, Settings::Default);
52 part.setForeground(QBrush("indianred"));
53 setFormat(PartMsg, part, Settings::Default);
56 quit.setForeground(QBrush("indianred"));
57 setFormat(QuitMsg, quit, Settings::Default);
60 kick.setForeground(QBrush("indianred"));
61 setFormat(KickMsg, kick, Settings::Default);
64 nren.setForeground(QBrush("magenta"));
65 setFormat(RenameMsg, nren, Settings::Default);
68 mode.setForeground(QBrush("steelblue"));
69 setFormat(ModeMsg, mode, Settings::Default);
71 QTextCharFormat action;
72 action.setFontItalic(true);
73 action.setForeground(QBrush("darkmagenta"));
74 setFormat(ActionMsg, action, Settings::Default);
76 // Internal message element formats
78 ts.setForeground(QBrush("grey"));
79 setFormat(Timestamp, ts, Settings::Default);
81 QTextCharFormat sender;
82 sender.setAnchor(true);
83 sender.setForeground(QBrush("navy"));
84 setFormat(Sender, sender, Settings::Default);
88 nick.setFontWeight(QFont::Bold);
89 setFormat(Nick, nick, Settings::Default);
91 QTextCharFormat hostmask;
92 hostmask.setFontItalic(true);
93 setFormat(Hostmask, hostmask, Settings::Default);
95 QTextCharFormat channel;
96 channel.setAnchor(true);
97 channel.setFontWeight(QFont::Bold);
98 setFormat(ChannelName, channel, Settings::Default);
100 QTextCharFormat flags;
101 flags.setFontWeight(QFont::Bold);
102 setFormat(ModeFlags, flags, Settings::Default);
105 url.setFontUnderline(true);
107 setFormat(Url, url, Settings::Default);
112 QtUiStyle::~QtUiStyle() {}