12174f115c7651d51b8bb1ee34d8b7c4779d7c51
[quassel.git] / src / qtopia / qtopiastyle.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 "qtopiastyle.h"
22
23 QtopiaStyle::QtopiaStyle() : UiStyle() {
24
25   QTextCharFormat def;
26   def.setFont(QFont("Verdana",6));
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   QTextCharFormat plainMsg;
33   plainMsg.setForeground(QBrush("black"));
34   setFormat(PlainMsg, plainMsg);
35
36   QTextCharFormat notice;
37   notice.setForeground(QBrush("navy"));
38   setFormat(NoticeMsg, notice);
39
40   QTextCharFormat server;
41   server.setForeground(QBrush("navy"));
42   setFormat(ServerMsg, server);
43
44   QTextCharFormat error;
45   error.setForeground(QBrush("red"));
46   setFormat(ErrorMsg, error);
47
48   QTextCharFormat join;
49   join.setForeground(QBrush("green"));
50   setFormat(JoinMsg, join);
51
52   QTextCharFormat part;
53   part.setForeground(QBrush("indianred"));
54   setFormat(PartMsg, part);
55
56   QTextCharFormat quit;
57   quit.setForeground(QBrush("indianred"));
58   setFormat(QuitMsg, quit);
59
60   QTextCharFormat kick;
61   kick.setForeground(QBrush("indianred"));
62   setFormat(KickMsg, kick);
63
64   QTextCharFormat nren;
65   nren.setForeground(QBrush("magenta"));
66   setFormat(RenameMsg, nren);
67
68   QTextCharFormat mode;
69   mode.setForeground(QBrush("steelblue"));
70   setFormat(ModeMsg, mode);
71
72   QTextCharFormat action;
73   action.setFontItalic(true);
74   action.setForeground(QBrush("darkmagenta"));
75   setFormat(ActionMsg, action);
76
77   // Internal message element formats
78   QTextCharFormat ts;
79   ts.setForeground(QBrush("grey"));
80   setFormat(Timestamp, ts);
81
82   QTextCharFormat sender;
83   sender.setAnchor(true);
84   sender.setForeground(QBrush("navy"));
85   setFormat(Sender, sender);
86
87   QTextCharFormat nick;
88   nick.setAnchor(true);
89   nick.setFontWeight(QFont::Bold);
90   setFormat(Nick, nick);
91
92   QTextCharFormat hostmask;
93   hostmask.setFontItalic(true);
94   setFormat(Hostmask, hostmask);
95
96   QTextCharFormat channel;
97   channel.setAnchor(true);
98   channel.setFontWeight(QFont::Bold);
99   setFormat(ChannelName, channel);
100
101   QTextCharFormat flags;
102   flags.setFontWeight(QFont::Bold);
103   setFormat(ModeFlags, flags);
104
105   QTextCharFormat url;
106   url.setFontUnderline(true);
107   url.setAnchor(true);
108   setFormat(Url, url);
109
110
111 }
112
113 QtopiaStyle::~QtopiaStyle() {}