equal
deleted
inserted
replaced
42 QListWidget* w=chatText; |
42 QListWidget* w=chatText; |
43 w->addItem(str[0]+": "+str[1]); |
43 w->addItem(str[0]+": "+str[1]); |
44 w->scrollToBottom(); |
44 w->scrollToBottom(); |
45 w->setSelectionMode(QAbstractItemView::NoSelection); |
45 w->setSelectionMode(QAbstractItemView::NoSelection); |
46 } |
46 } |
|
47 |
|
48 void HWChatWidget::nickAdded(const QString& nick) |
|
49 { |
|
50 chatNicks->addItem(nick); |
|
51 } |
|
52 |
|
53 void HWChatWidget::nickRemoved(const QString& nick) |
|
54 { |
|
55 QList<QListWidgetItem *> items=chatNicks->findItems(nick, Qt::MatchExactly); |
|
56 for(QList<QListWidgetItem *>::iterator it=items.begin(); it!=items.end();) { |
|
57 chatNicks->takeItem(chatNicks->row(*it)); |
|
58 ++it; |
|
59 } |
|
60 } |
|
61 |
|
62 void HWChatWidget::clear() |
|
63 { |
|
64 chatNicks->clear(); |
|
65 } |