summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/Roster/QtTreeWidget.h')
-rw-r--r--Swift/QtUI/Roster/QtTreeWidget.h29
1 files changed, 14 insertions, 15 deletions
diff --git a/Swift/QtUI/Roster/QtTreeWidget.h b/Swift/QtUI/Roster/QtTreeWidget.h
index 4ecba83..271fbd5 100644
--- a/Swift/QtUI/Roster/QtTreeWidget.h
+++ b/Swift/QtUI/Roster/QtTreeWidget.h
@@ -8,6 +8,9 @@
#include <QTreeView>
#include <QModelIndex>
+#include <QDragEnterEvent>
+#include <QDropEvent>
+#include <QDragMoveEvent>
#include "Swift/QtUI/Roster/RosterModel.h"
#include "Swift/QtUI/Roster/RosterDelegate.h"
@@ -23,13 +26,7 @@ class QtTreeWidget : public QTreeView{
QtTreeWidgetItem* getRoot();
void setRosterModel(Roster* roster);
Roster* getRoster() {return roster_;}
- void setEditable(bool b) { editable_ = b; }
-
- signals:
- void onSomethingSelectedChanged(bool);
-
- public slots:
- void handleEditUserActionTriggered(bool checked);
+ boost::signal<void (RosterItem*)> onSomethingSelectedChanged;
private slots:
void handleItemActivated(const QModelIndex&);
@@ -38,22 +35,24 @@ class QtTreeWidget : public QTreeView{
void handleCollapsed(const QModelIndex&);
void handleClicked(const QModelIndex&);
protected:
- void contextMenuEvent(QContextMenuEvent* event);
- protected slots:
- virtual void currentChanged(const QModelIndex& current, const QModelIndex& previous);
+ void dragEnterEvent(QDragEnterEvent* event);
+ void dropEvent(QDropEvent* event);
+ void dragMoveEvent(QDragMoveEvent* event);
+ protected:
+ QModelIndexList getSelectedIndexes() const;
private:
- void renameGroup(GroupRosterItem* group);
void drawBranches(QPainter*, const QRect&, const QModelIndex&) const;
- QModelIndexList getSelectedIndexes() const;
-
+ protected slots:
+ virtual void currentChanged(const QModelIndex& current, const QModelIndex& previous);
+ protected:
+ UIEventStream* eventStream_;
+
private:
RosterModel* model_;
Roster* roster_;
RosterDelegate* delegate_;
QtTreeWidgetItem* treeRoot_;
- UIEventStream* eventStream_;
- bool editable_;
};
}