QTfrontend/chatwidget.cpp
changeset 465 07eca0a2546c
parent 464 7f48321fc38a
child 480 09434d6c3865
--- a/QTfrontend/chatwidget.cpp	Tue Feb 20 19:00:46 2007 +0000
+++ b/QTfrontend/chatwidget.cpp	Tue Feb 20 19:50:38 2007 +0000
@@ -44,3 +44,22 @@
   w->scrollToBottom();
   w->setSelectionMode(QAbstractItemView::NoSelection);
 }
+
+void HWChatWidget::nickAdded(const QString& nick)
+{
+  chatNicks->addItem(nick);
+}
+
+void HWChatWidget::nickRemoved(const QString& nick)
+{
+  QList<QListWidgetItem *> items=chatNicks->findItems(nick, Qt::MatchExactly);
+  for(QList<QListWidgetItem *>::iterator it=items.begin(); it!=items.end();) {
+    chatNicks->takeItem(chatNicks->row(*it));
+    ++it;
+  }
+}
+
+void HWChatWidget::clear()
+{
+  chatNicks->clear();
+}