This is it, the long-awaited huge commit with the new Network handling.
[quassel.git] / src / qtopia / chatline.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 <QtCore>
22
23 #include "chatline.h"
24 #include "qtopiaui.h"
25 #include "qtopiauistyle.h"
26
27 ChatLine::ChatLine(Message msg) {
28   _styledSender = QtopiaUi::style()->styleString(msg.formattedSender());
29   _styledText = QtopiaUi::style()->styleString(msg.formattedText());
30   _timestamp = msg.timestamp();
31   _msgId = msg.msgId();
32   _bufferInfo = msg.buffer();
33
34
35 }
36
37 QString ChatLine::sender() const {
38   return _sender;
39 }
40
41 QString ChatLine::text() const {
42   return _text;
43 }
44
45 MsgId ChatLine::msgId() const {
46   return _msgId;
47 }
48
49 BufferInfo ChatLine::bufferInfo() const {
50   return _bufferInfo;
51 }
52
53 QDateTime ChatLine::timestamp() const {
54   return _timestamp;
55 }
56
57 UiStyle::StyledText ChatLine::styledSender() const {
58   return _styledSender;
59 }
60
61 UiStyle::StyledText ChatLine::styledText() const {
62   return _styledText;
63 }
64
65
66
67 QString ChatLine::formattedToHtml(const QString &f) {
68    
69   return f;
70 }