Moved network widgets to src/components/network/
[dashstudio.git] / src / components / network / chatwindow.h
blob8d291e4892748657cefbc9d1506a9089e12c50a3
1 /***************************************************************************
2 * Copyright (C) 2007 by David Cuadrado *
3 * krawek@gmail.com *
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) any later version. *
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 ***************************************************************************/
22 #ifndef CHATWINDOW_H
23 #define CHATWINDOW_H
25 #include <QDialog>
27 namespace Ui {
28 class ChatWindow;
31 /**
32 @author David Cuadrado <krawek@gmail.com>
34 class ChatWindow : public QDialog
36 Q_OBJECT;
37 public:
38 enum {
39 Chat = 0x01,
40 Notice,
41 Wall
43 ChatWindow(QWidget *parent = 0);
44 ~ChatWindow();
46 void addMessage(const QString &from, const QString &text);
47 void addNotice(const QString &from, const QString &text);
48 void addWall(const QString &from, const QString &text);
50 void addUsers(const QStringList & logins);
51 void removeUser(const QString & login);
53 private slots:
54 void onEditFinished();
56 signals:
57 void sendText(const QString &text, int type);
59 private:
60 QString replaceText(const QString &text);
62 private:
63 Ui::ChatWindow *ui;
67 #endif