another try to fix those win/linux crashes :)
[quassel.git] / src / qtui / qtuistyle.cpp
1 /***************************************************************************
2  *   Copyright (C) 2005-08 by the Quassel Project                          *
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) version 3.                                           *
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 "qtuistyle.h"
22
23 QtUiStyle::QtUiStyle() : UiStyle("QtUiStyle") {
24   // We need to just set our internal formats; everything else is done by the base class...
25
26   // Internal message formats
27   QTextCharFormat plainMsg;
28   plainMsg.setForeground(QBrush("black"));
29   setFormat(PlainMsg, plainMsg, Settings::Default);
30
31   QTextCharFormat notice;
32   notice.setForeground(QBrush("navy"));
33   setFormat(NoticeMsg, notice, Settings::Default);
34
35   QTextCharFormat server;
36   server.setForeground(QBrush("navy"));
37   setFormat(ServerMsg, server, Settings::Default);
38
39   QTextCharFormat error;
40   error.setForeground(QBrush("red"));
41   setFormat(ErrorMsg, error, Settings::Default);
42
43   QTextCharFormat join;
44   join.setForeground(QBrush("green"));
45   setFormat(JoinMsg, join, Settings::Default);
46
47   QTextCharFormat part;
48   part.setForeground(QBrush("indianred"));
49   setFormat(PartMsg, part, Settings::Default);
50
51   QTextCharFormat quit;
52   quit.setForeground(QBrush("indianred"));
53   setFormat(QuitMsg, quit, Settings::Default);
54
55   QTextCharFormat kick;
56   kick.setForeground(QBrush("indianred"));
57   setFormat(KickMsg, kick, Settings::Default);
58
59   QTextCharFormat nren;
60   nren.setForeground(QBrush("magenta"));
61   setFormat(RenameMsg, nren, Settings::Default);
62
63   QTextCharFormat mode;
64   mode.setForeground(QBrush("steelblue"));
65   setFormat(ModeMsg, mode, Settings::Default);
66
67   QTextCharFormat action;
68   action.setFontItalic(true);
69   action.setForeground(QBrush("darkmagenta"));
70   setFormat(ActionMsg, action, Settings::Default);
71
72   // Internal message element formats
73   QTextCharFormat ts;
74   ts.setForeground(QBrush("grey"));
75   setFormat(Timestamp, ts, Settings::Default);
76
77   QTextCharFormat sender;
78   sender.setAnchor(true);
79   sender.setForeground(QBrush("navy"));
80   setFormat(Sender, sender, Settings::Default);
81
82   QTextCharFormat nick;
83   nick.setAnchor(true);
84   nick.setFontWeight(QFont::Bold);
85   setFormat(Nick, nick, Settings::Default);
86
87   QTextCharFormat hostmask;
88   hostmask.setFontItalic(true);
89   setFormat(Hostmask, hostmask, Settings::Default);
90
91   QTextCharFormat channel;
92   channel.setAnchor(true);
93   channel.setFontWeight(QFont::Bold);
94   setFormat(ChannelName, channel, Settings::Default);
95
96   QTextCharFormat flags;
97   flags.setFontWeight(QFont::Bold);
98   setFormat(ModeFlags, flags, Settings::Default);
99
100   QTextCharFormat url;
101   url.setFontUnderline(true);
102   url.setAnchor(true);
103   setFormat(Url, url, Settings::Default);
104
105
106 }
107
108 QtUiStyle::~QtUiStyle() {}