480
|
1 |
/*
|
1066
|
2 |
* Hedgewars, a free turn based strategy game
|
486
|
3 |
* Copyright (c) 2007 Igor Ulyanov <iulyanov@gmail.com>
|
480
|
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; version 2 of the License
|
|
8 |
*
|
|
9 |
* This program is distributed in the hope that it will be useful,
|
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12 |
* GNU General Public License for more details.
|
|
13 |
*
|
|
14 |
* You should have received a copy of the GNU General Public License
|
|
15 |
* along with this program; if not, write to the Free Software
|
|
16 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
|
17 |
*/
|
|
18 |
|
461
|
19 |
#ifndef _CHAT_WIDGET_INCLUDED
|
|
20 |
#define _CHAT_WIDGET_INCLUDED
|
|
21 |
|
|
22 |
#include <QWidget>
|
|
23 |
#include <QString>
|
|
24 |
#include <QGridLayout>
|
|
25 |
|
|
26 |
class QListWidget;
|
|
27 |
class QLineEdit;
|
|
28 |
|
|
29 |
class HWChatWidget : public QWidget
|
|
30 |
{
|
|
31 |
Q_OBJECT
|
|
32 |
|
|
33 |
public:
|
|
34 |
HWChatWidget(QWidget* parent=0);
|
|
35 |
|
|
36 |
public slots:
|
1360
|
37 |
void onChatString(const QString& str);
|
465
|
38 |
void nickAdded(const QString& nick);
|
|
39 |
void nickRemoved(const QString& nick);
|
|
40 |
void clear();
|
1405
|
41 |
void setReadyStatus(const QString & nick, bool isReady);
|
461
|
42 |
|
|
43 |
signals:
|
|
44 |
void chatLine(const QString& str);
|
1391
|
45 |
void kick(const QString & str);
|
461
|
46 |
|
|
47 |
private:
|
|
48 |
QGridLayout mainLayout;
|
|
49 |
QListWidget* chatText;
|
462
|
50 |
QListWidget* chatNicks;
|
461
|
51 |
QLineEdit* chatEditLine;
|
|
52 |
|
|
53 |
private slots:
|
|
54 |
void returnPressed();
|
1391
|
55 |
void onKick();
|
461
|
56 |
};
|
|
57 |
|
|
58 |
#endif // _CHAT_WIDGET_INCLUDED
|