summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2010-05-06 08:00:44 (GMT)
committerKevin Smith <git@kismith.co.uk>2010-05-06 10:49:49 (GMT)
commit081fc03556708447610e9697a57235fa191a4f0d (patch)
tree505c8cc9129d2b44968d183a180f0ccddaa08810 /Swift/QtUI/Roster/QtTreeWidget.h
parent8c53236875d2ca77f1b463449918458f6b424ab1 (diff)
downloadswift-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/Roster/QtTreeWidget.h')
-rw-r--r--Swift/QtUI/Roster/QtTreeWidget.h19
1 files changed, 9 insertions, 10 deletions
diff --git a/Swift/QtUI/Roster/QtTreeWidget.h b/Swift/QtUI/Roster/QtTreeWidget.h
index d6e6038..c03f2e2 100644
--- a/Swift/QtUI/Roster/QtTreeWidget.h
+++ b/Swift/QtUI/Roster/QtTreeWidget.h
@@ -9,31 +9,29 @@
#include <QTreeView>
#include <QModelIndex>
-#include "Swiften/Roster/TreeWidgetFactory.h"
-#include "Swiften/Roster/TreeWidget.h"
-#include "Swiften/Roster/TreeWidgetItem.h"
-#include "Swift/QtUI/Roster/QtTreeWidgetItem.h"
#include "Swift/QtUI/Roster/QtTreeWidget.h"
#include "Swift/QtUI/Roster/RosterModel.h"
#include "Swift/QtUI/Roster/RosterDelegate.h"
#include "Swift/QtUI/ContextMenus/QtContextMenu.h"
namespace Swift {
+class UIEventStream;
-class QtTreeWidget : public QTreeView, public TreeWidget {
+class QtTreeWidget : public QTreeView{
Q_OBJECT
public:
- QtTreeWidget(QWidget* parent = 0);
+ QtTreeWidget(UIEventStream* eventStream, QWidget* parent = 0);
~QtTreeWidget();
void show();
QtTreeWidgetItem* getRoot();
void setContextMenu(QtContextMenu* contextMenu);
+ void setRosterModel(Roster* roster);
private slots:
void handleItemActivated(const QModelIndex&);
- void handleModelItemExpanded(const QModelIndex&, bool expanded);
- void handleExpanded(const QModelIndex&);
- void handleCollapsed(const QModelIndex&);
- void handleDataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight);
+// void handleModelItemExpanded(const QModelIndex&, bool expanded);
+// void handleExpanded(const QModelIndex&);
+// void handleCollapsed(const QModelIndex&);
+// void handleDataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight);
protected:
void contextMenuEvent(QContextMenuEvent* event);
@@ -43,6 +41,7 @@ class QtTreeWidget : public QTreeView, public TreeWidget {
RosterDelegate* delegate_;
QtTreeWidgetItem* treeRoot_;
QtContextMenu* contextMenu_;
+ UIEventStream* eventStream_;
};
}