From 6b8c2cf35525c62b1e7a0279a7ebaa175848d268 Mon Sep 17 00:00:00 2001 From: Arno Date: Sat, 17 Mar 2012 11:48:24 +0100 Subject: Make nodes with children selectable in picture widget This was a tough one. Lost in recursion. When selecting nodes with children in the picture widget, all files having this node as mapping parent are shown. Had to make some changes to SmTreeModel::findRecursive for this. I hope I didn't break anything. If I did, I'll fix it :) Also disposed of some comments and unused member variables. --- mappingtreemodel.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mappingtreemodel.h') diff --git a/mappingtreemodel.h b/mappingtreemodel.h index 411a0b2..50843ba 100644 --- a/mappingtreemodel.h +++ b/mappingtreemodel.h @@ -34,6 +34,7 @@ class MappingTreeModel : public SmTreeModel { //data QVariant data(const QModelIndex &index, int role) const; + QList childList(const QVariant &value, int column = 0) const; QModelIndex indexFromPath(QString &path, int column = 0) const; bool setData(const QModelIndex &index, const QVariant &value, int role); void move(const QModelIndex &source, const QModelIndex &dest); @@ -63,6 +64,7 @@ class MappingTreeModel : public SmTreeModel { void getMappingTypes(); void getChildrenRecursive(SmTreeItem *item); QStringList getPathsRecursive(SmTreeItem *parent) const; + QList getChildListRecursive(SmTreeItem *item, int column) const; QString basePath(SmTreeItem *item) const; int lowerBound(SmTreeItem *item, const QVariant &value, int column = 0) const; QList mappingData(SmTreeItem *item); -- cgit v1.2.3-70-g09d2