diff options
Diffstat (limited to 'Swift/QtUI')
-rw-r--r-- | Swift/QtUI/QtMainWindow.cpp | 7 | ||||
-rw-r--r-- | Swift/QtUI/QtMainWindow.h | 1 |
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); |