summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2009-09-16 09:47:42 (GMT)
committerKevin Smith <git@kismith.co.uk>2009-09-16 09:47:42 (GMT)
commit5d71183270c1b214a816e494ab7de9d94502df33 (patch)
treeb5cbf5ff34a6f1cd03a673ad3adb956db7a6f438 /Swift/QtUI
parent9a02397822d7ef3dea95bc8821f14fb35d201b7b (diff)
downloadswift-5d71183270c1b214a816e494ab7de9d94502df33.zip
swift-5d71183270c1b214a816e494ab7de9d94502df33.tar.bz2
SignOut nearly working.
Diffstat (limited to 'Swift/QtUI')
-rw-r--r--Swift/QtUI/QtMainWindow.cpp7
-rw-r--r--Swift/QtUI/QtMainWindow.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/Swift/QtUI/QtMainWindow.cpp b/Swift/QtUI/QtMainWindow.cpp
index e3c6e35..ed7e67b 100644
--- a/Swift/QtUI/QtMainWindow.cpp
+++ b/Swift/QtUI/QtMainWindow.cpp
@@ -70,6 +70,9 @@ QtMainWindow::QtMainWindow(QtTreeWidgetFactory *treeWidgetFactory) : QWidget() {
QAction* joinMUCAction = new QAction("Join chatroom", this);
connect(joinMUCAction, SIGNAL(triggered()), SLOT(handleJoinMUCAction()));
chatMenu->addAction(joinMUCAction);
+ QAction* signOutAction = new QAction("Sign Out", this);
+ connect(signOutAction, SIGNAL(triggered()), SLOT(handleSignOutAction()));
+ chatMenu->addAction(signOutAction);
}
void QtMainWindow::handleAddActionTriggered(bool checked) {
@@ -79,6 +82,10 @@ void QtMainWindow::handleAddActionTriggered(bool checked) {
addContact->show();
}
+void QtMainWindow::handleSignOutAction() {
+ onSignOutRequest();
+}
+
void QtMainWindow::handleAddContactDialogComplete(const JID& contact, const QString& name) {
onAddContactRequest(contact, Q2PSTRING(name));
}
diff --git a/Swift/QtUI/QtMainWindow.h b/Swift/QtUI/QtMainWindow.h
index 1faf65a..afe6ccd 100644
--- a/Swift/QtUI/QtMainWindow.h
+++ b/Swift/QtUI/QtMainWindow.h
@@ -35,6 +35,7 @@ namespace Swift {
void handleStatusChanged(StatusShow::Type showType, const QString &statusMessage);
void handleShowOfflineToggled(bool);
void handleJoinMUCAction();
+ void handleSignOutAction();
void handleJoinMUCDialogComplete(const JID& muc, const QString& nick);
void handleAddContactDialogComplete(const JID& contact, const QString& name);
void handleAddActionTriggered(bool checked);