1 /***************************************************************************
2 * Copyright (C) 2005-07 by The Quassel IRC Development Team *
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) any later version. *
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"
23 QtUiStyle::QtUiStyle() : UiStyle() {
24 // We need to just set our internal formats; everything else is done by the base class...
26 // Internal message formats
27 QTextCharFormat plainMsg;
28 plainMsg.setForeground(QBrush("black"));
29 setFormat(PlainMsg, plainMsg);
31 QTextCharFormat notice;
32 notice.setForeground(QBrush("navy"));
33 setFormat(NoticeMsg, notice);
35 QTextCharFormat server;
36 server.setForeground(QBrush("navy"));
37 setFormat(ServerMsg, server);
39 QTextCharFormat error;
40 error.setForeground(QBrush("red"));
41 setFormat(ErrorMsg, error);
44 join.setForeground(QBrush("green"));
45 setFormat(JoinMsg, join);
48 part.setForeground(QBrush("indianred"));
49 setFormat(PartMsg, part);
52 quit.setForeground(QBrush("indianred"));
53 setFormat(QuitMsg, quit);
56 kick.setForeground(QBrush("indianred"));
57 setFormat(KickMsg, kick);
60 nren.setForeground(QBrush("magenta"));
61 setFormat(RenameMsg, nren);
64 mode.setForeground(QBrush("steelblue"));
65 setFormat(ModeMsg, mode);
67 QTextCharFormat action;
68 action.setFontItalic(true);
69 action.setForeground(QBrush("darkmagenta"));
70 setFormat(ActionMsg, action);
72 // Internal message element formats
74 ts.setForeground(QBrush("grey"));
75 setFormat(Timestamp, ts);
77 QTextCharFormat sender;
78 sender.setAnchor(true);
79 sender.setForeground(QBrush("navy"));
80 setFormat(Sender, sender);
84 nick.setFontWeight(QFont::Bold);
85 setFormat(Nick, nick);
87 QTextCharFormat hostmask;
88 hostmask.setFontItalic(true);
89 setFormat(Hostmask, hostmask);
91 QTextCharFormat channel;
92 channel.setAnchor(true);
93 channel.setFontWeight(QFont::Bold);
94 setFormat(ChannelName, channel);
96 QTextCharFormat flags;
97 flags.setFontWeight(QFont::Bold);
98 setFormat(ModeFlags, flags);
101 url.setFontUnderline(true);
108 QtUiStyle::~QtUiStyle() {}