diff options
author | Arno <am@disconnect.de> | 2012-03-17 11:48:24 +0100 |
---|---|---|
committer | Arno <am@disconnect.de> | 2012-03-17 11:48:24 +0100 |
commit | 6b8c2cf35525c62b1e7a0279a7ebaa175848d268 (patch) | |
tree | 762291d670475cf7dcd95d8a2f2fc67ac63ea73b /mappingtreemodel.h | |
parent | 77645a5dcfcb968cf5a3e4d43b4e93c12710f79e (diff) | |
download | SheMov-6b8c2cf35525c62b1e7a0279a7ebaa175848d268.tar.gz SheMov-6b8c2cf35525c62b1e7a0279a7ebaa175848d268.tar.bz2 SheMov-6b8c2cf35525c62b1e7a0279a7ebaa175848d268.zip |
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.
Diffstat (limited to 'mappingtreemodel.h')
-rw-r--r-- | mappingtreemodel.h | 2 |
1 files changed, 2 insertions, 0 deletions
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<QVariant> 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<QVariant> getChildListRecursive(SmTreeItem *item, int column) const; QString basePath(SmTreeItem *item) const; int lowerBound(SmTreeItem *item, const QVariant &value, int column = 0) const; QList<MappingData> mappingData(SmTreeItem *item); |