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 "qtopiauistyle.h"
24 QtopiaUiStyle::QtopiaUiStyle() : UiStyle("QtopiaUiStyle") {
27 def.setForeground(QBrush("#000000"));
28 def.setFont(QFont("Verdana",5));
29 setFormat(None, def, Settings::Default);
31 // We need to just set our internal formats; everything else is done by the base class...
33 // Internal message formats
35 QTextCharFormat plainMsg;
36 plainMsg.setForeground(QBrush("#000000"));
37 setFormat(PlainMsg, plainMsg, Settings::Default);
39 QTextCharFormat notice;
40 notice.setForeground(QBrush("#000080"));
41 setFormat(NoticeMsg, notice, Settings::Default);
43 QTextCharFormat server;
44 server.setForeground(QBrush("#000080"));
45 setFormat(ServerMsg, server, Settings::Default);
47 QTextCharFormat error;
48 error.setForeground(QBrush("#ff0000"));
49 setFormat(ErrorMsg, error, Settings::Default);
52 join.setForeground(QBrush("#008000"));
53 setFormat(JoinMsg, join, Settings::Default);
56 part.setForeground(QBrush("#ff0000"));
57 setFormat(PartMsg, part, Settings::Default);
60 quit.setForeground(QBrush("#ff0000"));
61 setFormat(QuitMsg, quit, Settings::Default);
64 kick.setForeground(QBrush("#ff0000"));
65 setFormat(KickMsg, kick, Settings::Default);
68 nren.setForeground(QBrush("#6a5acd"));
69 setFormat(RenameMsg, nren, Settings::Default);
72 mode.setForeground(QBrush("#4682b4"));
73 setFormat(ModeMsg, mode, Settings::Default);
75 QTextCharFormat action;
76 action.setFontItalic(true);
77 action.setForeground(QBrush("#8b008b"));
78 setFormat(ActionMsg, action, Settings::Default);
80 // Internal message element formats
82 ts.setForeground(QBrush("#808080"));
83 setFormat(Timestamp, ts, Settings::Default);
85 QTextCharFormat sender;
86 sender.setAnchor(true);
87 sender.setForeground(QBrush("#000080"));
88 setFormat(Sender, sender, Settings::Default);
92 nick.setFontWeight(QFont::Bold);
93 setFormat(Nick, nick, Settings::Default);
95 QTextCharFormat hostmask;
96 hostmask.setFontItalic(true);
97 setFormat(Hostmask, hostmask, Settings::Default);
99 QTextCharFormat channel;
100 channel.setAnchor(true);
101 channel.setFontWeight(QFont::Bold);
102 setFormat(ChannelName, channel, Settings::Default);
104 QTextCharFormat flags;
105 flags.setFontWeight(QFont::Bold);
106 setFormat(ModeFlags, flags, Settings::Default);
109 url.setFontUnderline(true);
111 setFormat(Url, url, Settings::Default);
115 QtopiaUiStyle::~QtopiaUiStyle() {}