This should fix a bug resulting in a crash, when a IrcUser object was not destroyed...
[quassel.git] / src / qtopia / qtopiauistyle.cpp
1 /***************************************************************************
2  *   Copyright (C) 2005-07 by the Quassel IRC Team                         *
3  *   devel@quassel-irc.org                                                 *
4  *                                                                         *
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.                                   *
9  *                                                                         *
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.                          *
14  *                                                                         *
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  ***************************************************************************/
20
21 #include "qtopiauistyle.h"
22
23 QtopiaUiStyle::QtopiaUiStyle() : UiStyle() {
24
25   QTextCharFormat def;
26   def.setForeground(QBrush("#000000"));
27   def.setFont(QFont("Verdana",5));
28   setFormat(None, def);
29
30   // We need to just set our internal formats; everything else is done by the base class...
31
32   // Internal message formats
33
34   QTextCharFormat plainMsg;
35   plainMsg.setForeground(QBrush("#000000"));
36   setFormat(PlainMsg, plainMsg);
37
38   QTextCharFormat notice;
39   notice.setForeground(QBrush("#000080"));
40   setFormat(NoticeMsg, notice);
41
42   QTextCharFormat server;
43   server.setForeground(QBrush("#000080"));
44   setFormat(ServerMsg, server);
45
46   QTextCharFormat error;
47   error.setForeground(QBrush("#ff0000"));
48   setFormat(ErrorMsg, error);
49
50   QTextCharFormat join;
51   join.setForeground(QBrush("#008000"));
52   setFormat(JoinMsg, join);
53
54   QTextCharFormat part;
55   part.setForeground(QBrush("#ff0000"));
56   setFormat(PartMsg, part);
57
58   QTextCharFormat quit;
59   quit.setForeground(QBrush("#ff0000"));
60   setFormat(QuitMsg, quit);
61
62   QTextCharFormat kick;
63   kick.setForeground(QBrush("#ff0000"));
64   setFormat(KickMsg, kick);
65
66   QTextCharFormat nren;
67   nren.setForeground(QBrush("#6a5acd"));
68   setFormat(RenameMsg, nren);
69
70   QTextCharFormat mode;
71   mode.setForeground(QBrush("#4682b4"));
72   setFormat(ModeMsg, mode);
73
74   QTextCharFormat action;
75   action.setFontItalic(true);
76   action.setForeground(QBrush("#8b008b"));
77   setFormat(ActionMsg, action);
78
79   // Internal message element formats
80   QTextCharFormat ts;
81   ts.setForeground(QBrush("#808080"));
82   setFormat(Timestamp, ts);
83
84   QTextCharFormat sender;
85   sender.setAnchor(true);
86   sender.setForeground(QBrush("#000080"));
87   setFormat(Sender, sender);
88
89   QTextCharFormat nick;
90   nick.setAnchor(true);
91   nick.setFontWeight(QFont::Bold);
92   setFormat(Nick, nick);
93
94   QTextCharFormat hostmask;
95   hostmask.setFontItalic(true);
96   setFormat(Hostmask, hostmask);
97
98   QTextCharFormat channel;
99   channel.setAnchor(true);
100   channel.setFontWeight(QFont::Bold);
101   setFormat(ChannelName, channel);
102
103   QTextCharFormat flags;
104   flags.setFontWeight(QFont::Bold);
105   setFormat(ModeFlags, flags);
106
107   QTextCharFormat url;
108   url.setFontUnderline(true);
109   url.setAnchor(true);
110   setFormat(Url, url);
111
112 }
113
114 QtopiaUiStyle::~QtopiaUiStyle() {}