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