Temporarily fixed the bug where the backlog would be displayed multiple times.
[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.setFont(QFont("Verdana",5));
27   setFormat(None, def);
28
29   // We need to just set our internal formats; everything else is done by the base class...
30
31   // Internal message formats
32
33   QTextCharFormat plainMsg;
34   plainMsg.setForeground(QBrush("#000000"));
35   setFormat(PlainMsg, plainMsg);
36
37   QTextCharFormat notice;
38   notice.setForeground(QBrush("#000080"));
39   setFormat(NoticeMsg, notice);
40
41   QTextCharFormat server;
42   server.setForeground(QBrush("#000080"));
43   setFormat(ServerMsg, server);
44
45   QTextCharFormat error;
46   error.setForeground(QBrush("#ff0000"));
47   setFormat(ErrorMsg, error);
48
49   QTextCharFormat join;
50   join.setForeground(QBrush("#008000"));
51   setFormat(JoinMsg, join);
52
53   QTextCharFormat part;
54   part.setForeground(QBrush("#ff0000"));
55   setFormat(PartMsg, part);
56
57   QTextCharFormat quit;
58   quit.setForeground(QBrush("#ff0000"));
59   setFormat(QuitMsg, quit);
60
61   QTextCharFormat kick;
62   kick.setForeground(QBrush("#ff0000"));
63   setFormat(KickMsg, kick);
64
65   QTextCharFormat nren;
66   nren.setForeground(QBrush("#6a5acd"));
67   setFormat(RenameMsg, nren);
68
69   QTextCharFormat mode;
70   mode.setForeground(QBrush("#4682b4"));
71   setFormat(ModeMsg, mode);
72
73   QTextCharFormat action;
74   action.setFontItalic(true);
75   action.setForeground(QBrush("#8b008b"));
76   setFormat(ActionMsg, action);
77
78   // Internal message element formats
79   QTextCharFormat ts;
80   ts.setForeground(QBrush("#808080"));
81   setFormat(Timestamp, ts);
82
83   QTextCharFormat sender;
84   sender.setAnchor(true);
85   sender.setForeground(QBrush("#000080"));
86   setFormat(Sender, sender);
87
88   QTextCharFormat nick;
89   nick.setAnchor(true);
90   nick.setFontWeight(QFont::Bold);
91   setFormat(Nick, nick);
92
93   QTextCharFormat hostmask;
94   hostmask.setFontItalic(true);
95   setFormat(Hostmask, hostmask);
96
97   QTextCharFormat channel;
98   channel.setAnchor(true);
99   channel.setFontWeight(QFont::Bold);
100   setFormat(ChannelName, channel);
101
102   QTextCharFormat flags;
103   flags.setFontWeight(QFont::Bold);
104   setFormat(ModeFlags, flags);
105
106   QTextCharFormat url;
107   url.setFontUnderline(true);
108   url.setAnchor(true);
109   setFormat(Url, url);
110
111 }
112
113 QtopiaUiStyle::~QtopiaUiStyle() {}