QTfrontend/chatwidget.h
author displacer
Tue, 20 Feb 2007 19:50:38 +0000
changeset 465 07eca0a2546c
parent 462 91baab07b79a
child 480 09434d6c3865
permissions -rw-r--r--
chatWidget with nicks ready
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);
465
07eca0a2546c chatWidget with nicks ready
displacer
parents: 462
diff changeset
    20
  void nickAdded(const QString& nick);
07eca0a2546c chatWidget with nicks ready
displacer
parents: 462
diff changeset
    21
  void nickRemoved(const QString& nick);
07eca0a2546c chatWidget with nicks ready
displacer
parents: 462
diff changeset
    22
  void clear();
461
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    23
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    24
 signals:
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    25
  void chatLine(const QString& str);
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    26
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    27
 private:
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    28
  QGridLayout mainLayout;
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    29
  QListWidget* chatText;
462
91baab07b79a resizing and grid problems
displacer
parents: 461
diff changeset
    30
  QListWidget* chatNicks;
461
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    31
  QLineEdit* chatEditLine;
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    32
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    33
 private slots:
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    34
  void returnPressed();
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    35
};
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    36
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    37
#endif // _CHAT_WIDGET_INCLUDED