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