461
|
1 |
#ifndef _CHAT_WIDGET_INCLUDED
|
|
2 |
#define _CHAT_WIDGET_INCLUDED
|
|
3 |
|
|
4 |
#include <QWidget>
|
|
5 |
#include <QString>
|
|
6 |
#include <QGridLayout>
|
|
7 |
|
|
8 |
class QListWidget;
|
|
9 |
class QLineEdit;
|
|
10 |
|
|
11 |
class HWChatWidget : public QWidget
|
|
12 |
{
|
|
13 |
Q_OBJECT
|
|
14 |
|
|
15 |
public:
|
|
16 |
HWChatWidget(QWidget* parent=0);
|
|
17 |
|
|
18 |
public slots:
|
|
19 |
void onChatStringFromNet(const QStringList& str);
|
465
|
20 |
void nickAdded(const QString& nick);
|
|
21 |
void nickRemoved(const QString& nick);
|
|
22 |
void clear();
|
461
|
23 |
|
|
24 |
signals:
|
|
25 |
void chatLine(const QString& str);
|
|
26 |
|
|
27 |
private:
|
|
28 |
QGridLayout mainLayout;
|
|
29 |
QListWidget* chatText;
|
462
|
30 |
QListWidget* chatNicks;
|
461
|
31 |
QLineEdit* chatEditLine;
|
|
32 |
|
|
33 |
private slots:
|
|
34 |
void returnPressed();
|
|
35 |
};
|
|
36 |
|
|
37 |
#endif // _CHAT_WIDGET_INCLUDED
|