summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-12-12 12:29:20 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-12-12 16:00:53 (GMT)
commit4315ccbd51f63e408d69d944f162d0ead4f9addd (patch)
tree046b3734d18c7c5e76040e8798a6f4af5e5045cb /Swift/QtUI/QtMainWindow.cpp
parentaaf38fe2e6804bd87ea5e99a05ed57070cbe1c57 (diff)
downloadswift-4315ccbd51f63e408d69d944f162d0ead4f9addd.zip
swift-4315ccbd51f63e408d69d944f162d0ead4f9addd.tar.bz2
Refactored own nickname handling.
Diffstat (limited to 'Swift/QtUI/QtMainWindow.cpp')
-rw-r--r--Swift/QtUI/QtMainWindow.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/Swift/QtUI/QtMainWindow.cpp b/Swift/QtUI/QtMainWindow.cpp
index 710ef61..fb84da4 100644
--- a/Swift/QtUI/QtMainWindow.cpp
+++ b/Swift/QtUI/QtMainWindow.cpp
@@ -40,6 +40,7 @@ QtMainWindow::QtMainWindow(UIEventStream* uiEventStream) : QWidget(), MainWindow
meView_ = new QtRosterHeader(this);
mainLayout->addWidget(meView_);
connect(meView_, SIGNAL(onChangeStatusRequest(StatusShow::Type, const QString&)), this, SLOT(handleStatusChanged(StatusShow::Type, const QString&)));
+ connect(meView_, SIGNAL(onChangeNickRequest(const QString&)), this, SLOT(handleChangeNickRequest(const QString&)));
tabs_ = new QtTabWidget(this);
#if QT_VERSION >= 0x040500
@@ -162,8 +163,12 @@ void QtMainWindow::handleShowOfflineToggled(bool state) {
}
}
-void QtMainWindow::setMyName(const String& name) {
- meView_->setName(P2QSTRING(name));
+void QtMainWindow::setMyNick(const String& nick) {
+ meView_->setNick(P2QSTRING(nick));
+}
+
+void QtMainWindow::setMyJID(const JID& jid) {
+ meView_->setJID(P2QSTRING(jid.toBare().toString()));
}
void QtMainWindow::setMyAvatarPath(const String& path) {
@@ -182,5 +187,9 @@ void QtMainWindow::setConnecting() {
meView_->setConnecting();
}
+void QtMainWindow::handleChangeNickRequest(const QString& nick) {
+ onChangeNickRequest(Q2PSTRING(nick));
+}
+
}