diff options
Diffstat (limited to 'Swift/QtUI')
-rw-r--r-- | Swift/QtUI/QtChatWindow.cpp | 5 | ||||
-rw-r--r-- | Swift/QtUI/QtChatWindow.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/Swift/QtUI/QtChatWindow.cpp b/Swift/QtUI/QtChatWindow.cpp index 8e916c3..f4e0b0b 100644 --- a/Swift/QtUI/QtChatWindow.cpp +++ b/Swift/QtUI/QtChatWindow.cpp @@ -121,6 +121,11 @@ void QtChatWindow::setUnreadMessageCount(int count) { updateTitleWithUnreadCount(); } +void QtChatWindow::setName(const String& name) { + contact_ = P2QSTRING(name); + updateTitleWithUnreadCount(); +} + void QtChatWindow::updateTitleWithUnreadCount() { setWindowTitle(unreadCount_ > 0 ? QString("(%1) %2)").arg(unreadCount_).arg(contact_) : contact_); emit titleUpdated(); diff --git a/Swift/QtUI/QtChatWindow.h b/Swift/QtUI/QtChatWindow.h index 20a53b9..6e45d34 100644 --- a/Swift/QtUI/QtChatWindow.h +++ b/Swift/QtUI/QtChatWindow.h @@ -29,6 +29,7 @@ namespace Swift { void setSecurityLabelsEnabled(bool enabled); void setSecurityLabelsError(); SecurityLabel getSelectedSecurityLabel(); + void setName(const String& name); protected slots: void qAppFocusChanged(QWidget* old, QWidget* now); |