1 /***************************************************************************
2 * Copyright (C) 2005 by The Quassel Team *
3 * devel@quassel-irc.org *
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. *
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. *
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 ***************************************************************************/
21 #ifndef _CHANNELWIDGET_H_
22 #define _CHANNELWIDGET_H_
24 #include "ui_channelwidget.h"
25 #include "ui_ircwidget.h"
30 class ChannelWidget : public QWidget {
34 ChannelWidget(QString netname, QString bufname, QString ownNick, QWidget *parent = 0);
36 QString bufferName() { return _bufferName; }
37 QString networkName() { return _networkName; }
40 void sendInput(QString, QString, QString);
41 void nickListChanged(QStringList);
44 void recvMessage(Message);
45 void recvStatusMsg(QString msg);
46 void setTopic(QString);
47 void setNicks(QStringList);
48 void addNick(QString nick, VarMap props);
49 void renameNick(QString oldnick, QString newnick);
50 void removeNick(QString nick);
51 void updateNick(QString nick, VarMap props);
52 void setOwnNick(QString nick);
57 void updateNickList();
59 void itemExpansionChanged(QTreeWidgetItem *);
64 QString stdCol, errorCol, noticeCol, joinCol, quitCol, partCol, kickCol, serverCol, nickCol;
70 QCompleter *completer;
72 bool opsExpanded, voicedExpanded, usersExpanded;
75 /** Temporary widget for displaying a set of ChannelWidgets. */
76 class IrcWidget : public QWidget {
80 IrcWidget(QWidget *parent = 0);
83 void recvMessage(QString network, QString buffer, Message message);
84 void recvStatusMsg(QString network, QString message);
85 void setTopic(QString, QString, QString);
86 void setNicks(QString, QString, QStringList);
87 void addNick(QString net, QString nick, VarMap props);
88 void removeNick(QString net, QString nick);
89 void renameNick(QString net, QString oldnick, QString newnick);
90 void updateNick(QString net, QString nick, VarMap props);
91 void setOwnNick(QString net, QString nick);
94 void sendInput(QString network, QString buffer, QString message);
97 void userInput(QString, QString, QString);
101 QHash<QString, ChannelWidget *> buffers;
103 QHash<QString, QString> ownNick;
105 ChannelWidget * getBuffer(QString net, QString buf);