QTfrontend/chatwidget.h
author displacer
Tue, 20 Feb 2007 17:50:59 +0000
changeset 461 105af110b0e6
child 462 91baab07b79a
permissions -rw-r--r--
chatWidget with layout
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
461
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
     1
#ifndef _CHAT_WIDGET_INCLUDED
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
     2
#define _CHAT_WIDGET_INCLUDED
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
     3
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
     4
#include <QWidget>
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
     5
#include <QString>
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
     6
#include <QGridLayout>
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
     7
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
     8
class QListWidget;
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
     9
class QLineEdit;
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    10
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    11
class HWChatWidget : public QWidget
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    12
{
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    13
  Q_OBJECT
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    14
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    15
 public:
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    16
  HWChatWidget(QWidget* parent=0);
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    17
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    18
 public slots:
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    19
  void onChatStringFromNet(const QStringList& str);
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    20
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    21
 signals:
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    22
  void chatLine(const QString& str);
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    23
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    24
 private:
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    25
  QGridLayout mainLayout;
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    26
  QListWidget* chatText;
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    27
  QLineEdit* chatEditLine;
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    28
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    29
 private slots:
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    30
  void returnPressed();
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    31
};
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    32
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    33
#endif // _CHAT_WIDGET_INCLUDED