diff options
author | Kevin Smith <git@kismith.co.uk> | 2010-05-06 08:00:44 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2010-05-06 10:49:49 (GMT) |
commit | 081fc03556708447610e9697a57235fa191a4f0d (patch) | |
tree | 505c8cc9129d2b44968d183a180f0ccddaa08810 /Swift/QtUI/QtChatWindow.cpp | |
parent | 8c53236875d2ca77f1b463449918458f6b424ab1 (diff) | |
download | swift-081fc03556708447610e9697a57235fa191a4f0d.zip swift-081fc03556708447610e9697a57235fa191a4f0d.tar.bz2 |
Rewrite of large amounts of roster code.
Now keeps widgets out of Swiften, keeps sorting inside Swiften,
and keeps track of presences to show the correct presence per
roster item.
Resolves: #316
Resolves: #81
Resolves: #239
Diffstat (limited to 'Swift/QtUI/QtChatWindow.cpp')
-rw-r--r-- | Swift/QtUI/QtChatWindow.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Swift/QtUI/QtChatWindow.cpp b/Swift/QtUI/QtChatWindow.cpp index 5bedc22..d1b3194 100644 --- a/Swift/QtUI/QtChatWindow.cpp +++ b/Swift/QtUI/QtChatWindow.cpp @@ -6,8 +6,8 @@ #include "QtChatWindow.h" #include "QtSwiftUtil.h" +#include "Swiften/Roster/Roster.h" #include "Roster/QtTreeWidget.h" -#include "Roster/QtTreeWidgetFactory.h" #include "SwifTools/Linkify.h" #include "QtChatView.h" #include "MessageSnippet.h" @@ -26,7 +26,7 @@ #include <QUrl> namespace Swift { -QtChatWindow::QtChatWindow(const QString &contact, QtTreeWidgetFactory *treeWidgetFactory) : QtTabbable(), contact_(contact), previousMessageWasSelf_(false), previousMessageWasSystem_(false) { +QtChatWindow::QtChatWindow(const QString &contact, UIEventStream* eventStream) : QtTabbable(), contact_(contact), previousMessageWasSelf_(false), previousMessageWasSystem_(false), eventStream_(eventStream) { unreadCount_ = 0; updateTitleWithUnreadCount(); @@ -42,7 +42,7 @@ QtChatWindow::QtChatWindow(const QString &contact, QtTreeWidgetFactory *treeWidg messageLog_->setFocusPolicy(Qt::NoFocus); logRosterSplitter->addWidget(messageLog_); - treeWidget_ = dynamic_cast<QtTreeWidget*>(treeWidgetFactory->createTreeWidget()); + treeWidget_ = new QtTreeWidget(eventStream_); treeWidget_->hide(); logRosterSplitter->addWidget(treeWidget_); @@ -79,8 +79,8 @@ QtChatWindow::~QtChatWindow() { } -TreeWidget* QtChatWindow::getTreeWidget() { - return treeWidget_; +void QtChatWindow::setRosterModel(Roster* roster) { + treeWidget_->setRosterModel(roster); } void QtChatWindow::setAvailableSecurityLabels(const std::vector<SecurityLabel>& labels) { |