diff options
author | Arno <am@disconnect.de> | 2012-02-24 20:35:27 +0100 |
---|---|---|
committer | Arno <am@disconnect.de> | 2012-02-24 20:35:27 +0100 |
commit | b8e16c3bddb706ecc195e86eaafb89ed90f9bfc3 (patch) | |
tree | b14578ba8f801f701777b73d3dbb22730570585a /mappingtreemodel.h | |
parent | e82af6117dfcf4ccbebb712caaf1b8f9c68599ba (diff) | |
download | SheMov-b8e16c3bddb706ecc195e86eaafb89ed90f9bfc3.tar.gz SheMov-b8e16c3bddb706ecc195e86eaafb89ed90f9bfc3.tar.bz2 SheMov-b8e16c3bddb706ecc195e86eaafb89ed90f9bfc3.zip |
Implement MappingTreeWidget
This is a rather large commit. It implements MappingTreeWidget using
MappingTreeModel unsurprisingly this uncovered some exciting bugs.
Fixes the following bugs in MappingTreeModel:
* use insertRows() and removeRows() when addings children, because
dataChanged() won't do it.
* don't use a prepared QSqlQuery when fetching children recursively.
This won't work because the query is still active when we invoke
ourselves again. Put the query on the stack instead
* Keep the model sorted.
Also add an entry for a MappingTreeEditor to the File-Menu.
Diffstat (limited to 'mappingtreemodel.h')
-rw-r--r-- | mappingtreemodel.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mappingtreemodel.h b/mappingtreemodel.h index a18ce57..451ab83 100644 --- a/mappingtreemodel.h +++ b/mappingtreemodel.h @@ -52,10 +52,10 @@ class MappingTreeModel : public SmTreeModel { }; void getMappingTypes(); void getChildrenRecursive(SmTreeItem *item); + int lowerBound(SmTreeItem *item, const QVariant &value, int column = 0) const; QSqlDatabase mDb; QSqlQuery *mTypesQ; QSqlQuery *mTypeParentsQ; - QSqlQuery *mChildrenQ; QSqlQuery *mUpdateTypeQ; QSqlQuery *mUpdateChildQ; QSqlQuery *mAddMappingTypeQ; |