summaryrefslogtreecommitdiffstats
path: root/mappingtreemodel.h
diff options
context:
space:
mode:
authorArno <am@disconnect.de>2012-02-26 14:15:45 +0100
committerArno <am@disconnect.de>2012-02-26 14:15:45 +0100
commit11bf52b6cf1c27a75715a8379e7893b8d1e16bf0 (patch)
treed0d5366c585fb482716f44db3f9e22ea8acd914c /mappingtreemodel.h
parentff4a70f50e42152c5c391fd7801b916e64b181a4 (diff)
downloadSheMov-11bf52b6cf1c27a75715a8379e7893b8d1e16bf0.tar.gz
SheMov-11bf52b6cf1c27a75715a8379e7893b8d1e16bf0.tar.bz2
SheMov-11bf52b6cf1c27a75715a8379e7893b8d1e16bf0.zip
Mark active Mappings
When selecting pictures, mark the active mappings with a different color.
Diffstat (limited to 'mappingtreemodel.h')
-rw-r--r--mappingtreemodel.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/mappingtreemodel.h b/mappingtreemodel.h
index fa2cfef..60c7bd4 100644
--- a/mappingtreemodel.h
+++ b/mappingtreemodel.h
@@ -40,6 +40,8 @@ class MappingTreeModel : public SmTreeModel {
bool addChild(const QVariant &name, const QModelIndex &parent);
bool deleteChild(const QModelIndex &idx);
int childCount(const QModelIndex &idx) const;
+ MappingData mappingDataFromId(int mappingId) const;
+ void setSelectedMappings(const QList<int> &mappingData);
public slots:
void populate();
@@ -57,6 +59,7 @@ class MappingTreeModel : public SmTreeModel {
void getMappingTypes();
void getChildrenRecursive(SmTreeItem *item);
int lowerBound(SmTreeItem *item, const QVariant &value, int column = 0) const;
+ QList<MappingData> mappingData(SmTreeItem *item);
QSqlDatabase mDb;
QSqlQuery *mTypesQ;
QSqlQuery *mTypeParentsQ;
@@ -69,6 +72,8 @@ class MappingTreeModel : public SmTreeModel {
QSqlQuery *mAddParentQ;
QSqlQuery *mDeleteChildQ;
QList<mappingType> mMappingTypes;
+ QList<MappingData> mValidMappings;
+ QList<int> mSelectedMappings;
int mType;
};