diff options
Diffstat (limited to 'Swift/QtUI/QtMainWindow.cpp')
| -rw-r--r-- | Swift/QtUI/QtMainWindow.cpp | 21 | 
1 files changed, 15 insertions, 6 deletions
diff --git a/Swift/QtUI/QtMainWindow.cpp b/Swift/QtUI/QtMainWindow.cpp index 6e53258..7a84c59 100644 --- a/Swift/QtUI/QtMainWindow.cpp +++ b/Swift/QtUI/QtMainWindow.cpp @@ -24,7 +24,8 @@  #include "QtSwiftUtil.h"  #include "QtTabWidget.h"  #include "Roster/QtTreeWidget.h" -#include "Swift/Controllers/UIEvents/RequestUserSearchUIEvent.h" +#include "Swift/Controllers/UIEvents/RequestAddUserDialogUIEvent.h" +#include "Swift/Controllers/UIEvents/RequestChatWithUserDialogUIEvent.h"  #include "Swift/Controllers/UIEvents/RequestMUCSearchUIEvent.h"  #include "Swift/Controllers/UIEvents/JoinMUCUIEvent.h"  #include "Swift/Controllers/UIEvents/ToggleShowOfflineUIEvent.h" @@ -84,9 +85,12 @@ QtMainWindow::QtMainWindow(QtSettingsProvider* settings, UIEventStream* uiEventS  	QAction* joinMUCAction = new QAction("Join Room", this);  	connect(joinMUCAction, SIGNAL(triggered()), SLOT(handleJoinMUCAction()));  	actionsMenu->addAction(joinMUCAction); -	otherUserAction_ = new QAction("Find Other Contact", this); -	connect(otherUserAction_, SIGNAL(triggered(bool)), this, SLOT(handleOtherUserActionTriggered(bool))); -	actionsMenu->addAction(otherUserAction_); +	addUserAction_ = new QAction("Add Contact", this); +	connect(addUserAction_, SIGNAL(triggered(bool)), this, SLOT(handleAddUserActionTriggered(bool))); +	actionsMenu->addAction(addUserAction_); +	chatUserAction_ = new QAction("Start Chat", this); +	connect(chatUserAction_, SIGNAL(triggered(bool)), this, SLOT(handleChatUserActionTriggered(bool))); +	actionsMenu->addAction(chatUserAction_);  	QAction* signOutAction = new QAction("Sign Out", this);  	connect(signOutAction, SIGNAL(triggered()), SLOT(handleSignOutAction()));  	actionsMenu->addAction(signOutAction); @@ -123,8 +127,13 @@ void QtMainWindow::handleEventCountUpdated(int count) {  	tabs_->setTabText(eventIndex, text);  } -void QtMainWindow::handleOtherUserActionTriggered(bool /*checked*/) { -	boost::shared_ptr<UIEvent> event(new RequestUserSearchUIEvent()); +void QtMainWindow::handleAddUserActionTriggered(bool /*checked*/) { +	boost::shared_ptr<UIEvent> event(new RequestAddUserDialogUIEvent()); +	uiEventStream_->send(event); +} + +void QtMainWindow::handleChatUserActionTriggered(bool /*checked*/) { +	boost::shared_ptr<UIEvent> event(new RequestChatWithUserDialogUIEvent());  	uiEventStream_->send(event);  }  | 
 Swift