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 /pictureswidget.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 'pictureswidget.h')
-rw-r--r-- | pictureswidget.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/pictureswidget.h b/pictureswidget.h index 40c1874..41df3b8 100644 --- a/pictureswidget.h +++ b/pictureswidget.h @@ -19,6 +19,7 @@ class PictureView; class MappingTreeWidget; class MappingEditWidget; class MappingEditDialog; +class MappingTreeModel; class QSqlQuery; class PicFilesModel; class QSortFilterProxyModel; @@ -103,7 +104,8 @@ class PicFilesModel : public SmTreeModel { enum Fields { FileName = 0, Size = 1, MimeType = 2, FullPath = 3, Id = 4, Added = 5, Md5Sum = 6, SizeDisplay = 7 }; enum { NumFields = 8 }; explicit PicFilesModel(const QStringList &headers, QObject *parent = 0); - void setMapping(int mappingId) { mMappingId = mappingId; } + ~PicFilesModel(); + void setMapping(int mappingId); QList<int> mappingIds(const QList<QVariant> &fileIds); //some data @@ -119,15 +121,14 @@ class PicFilesModel : public SmTreeModel { private: QSqlDatabase mDb; - QSqlQuery *mPopulateQ; + MappingTreeModel *mMappingTreeModel; + QString mPopulateQS; QSqlQuery *mDeleteFileQ; - QSqlQuery *mCurMappingIdsQ; QSqlQuery *mDeleteMappingsQ; QSqlQuery *mAddMappingsQ; QSqlQuery *mAllFilesQ; QString mCurMappingIdsQS; - int mMappingId; - QList<int> mCurMappingsIds; + QList<int> mMappingIds; }; #endif // PICTURESWIDGET_H |