summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCatalin Badea <catalin.badea392@gmail.com>2012-05-24 16:29:25 (GMT)
committerCătălin Badea <catalin.badea392@gmail.com>2012-08-11 15:45:27 (GMT)
commitc09901d69a0b606d8f16a3496c0c4f24c3c7aa1b (patch)
treedc6b472d914413b372a6cefdab4cef2eae25aafb /Swift/QtUI/QtMainWindow.cpp
parentf799cce739f89225258dfbd2e0099e8a71d99af4 (diff)
downloadswift-contrib-c09901d69a0b606d8f16a3496c0c4f24c3c7aa1b.zip
swift-contrib-c09901d69a0b606d8f16a3496c0c4f24c3c7aa1b.tar.bz2
Added History window based code: controller, events, interface and menu entry.
Diffstat (limited to 'Swift/QtUI/QtMainWindow.cpp')
-rw-r--r--Swift/QtUI/QtMainWindow.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/Swift/QtUI/QtMainWindow.cpp b/Swift/QtUI/QtMainWindow.cpp
index d312546..7ec0c93 100644
--- a/Swift/QtUI/QtMainWindow.cpp
+++ b/Swift/QtUI/QtMainWindow.cpp
@@ -27,6 +27,7 @@
#include <Swift/QtUI/QtLoginWindow.h>
#include <Roster/QtRosterWidget.h>
#include <Swift/Controllers/UIEvents/RequestJoinMUCUIEvent.h>
+#include <Swift/Controllers/UIEvents/RequestHistoryUIEvent.h>
#include <Swift/Controllers/UIEvents/RequestAddUserDialogUIEvent.h>
#include <Swift/Controllers/UIEvents/RequestChatWithUserDialogUIEvent.h>
#include <Swift/Controllers/UIEvents/RequestProfileEditorUIEvent.h>
@@ -122,6 +123,9 @@ QtMainWindow::QtMainWindow(SettingsProvider* settings, UIEventStream* uiEventStr
QAction* joinMUCAction = new QAction(tr("Enter &Room…"), this);
connect(joinMUCAction, SIGNAL(triggered()), SLOT(handleJoinMUCAction()));
actionsMenu->addAction(joinMUCAction);
+ QAction* viewLogsAction = new QAction(tr("&View History…"), this);
+ connect(viewLogsAction, SIGNAL(triggered()), SLOT(handleViewLogsAction()));
+ actionsMenu->addAction(viewLogsAction);
addUserAction_ = new QAction(tr("&Add Contact…"), this);
connect(addUserAction_, SIGNAL(triggered(bool)), this, SLOT(handleAddUserActionTriggered(bool)));
actionsMenu->addAction(addUserAction_);
@@ -235,6 +239,10 @@ void QtMainWindow::handleJoinMUCAction() {
uiEventStream_->send(boost::make_shared<RequestJoinMUCUIEvent>());
}
+void QtMainWindow::handleViewLogsAction() {
+ uiEventStream_->send(boost::make_shared<RequestHistoryUIEvent>());
+}
+
void QtMainWindow::handleStatusChanged(StatusShow::Type showType, const QString &statusMessage) {
onChangeStatusRequest(showType, Q2PSTRING(statusMessage));
}