summaryrefslogtreecommitdiffstats
path: root/mappingtreemodel.h
diff options
context:
space:
mode:
authorArno <am@disconnect.de>2012-10-04 06:59:44 +0200
committerArno <am@disconnect.de>2012-10-04 07:01:29 +0200
commit184448e767ccdeae66fe4d795757cace98033b0e (patch)
tree26cafbb4fbafe94406413439c0cbd36f5cd66cc3 /mappingtreemodel.h
parentdeeec5306a37e2280626f3486a07629570aafe92 (diff)
downloadSheMov-184448e767ccdeae66fe4d795757cace98033b0e.tar.gz
SheMov-184448e767ccdeae66fe4d795757cace98033b0e.tar.bz2
SheMov-184448e767ccdeae66fe4d795757cace98033b0e.zip
Fix Mappings in PictureViewer2
Another fix for the new MappingTreeModel database layout: Make the mappings display correctly when showing an archived picture. For performance reasons I had to make PicFilesModel global and put it into a separate file. Also clean up MappingTreeModel: remove comments and unused functions.
Diffstat (limited to 'mappingtreemodel.h')
-rw-r--r--mappingtreemodel.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/mappingtreemodel.h b/mappingtreemodel.h
index f2771c9..72a7b7f 100644
--- a/mappingtreemodel.h
+++ b/mappingtreemodel.h
@@ -50,13 +50,12 @@ class MappingTreeModel : public SmTreeModel {
bool deleteChild(const QModelIndex &idx);
int childCount(const QModelIndex &idx) const;
MappingData mappingDataFromIndex(QModelIndex &idx) const;
- MappingData mappingDataFromId(int mappingId) const;
QStringList paths() const;
const QString &forbidden() const { return mForbidden; }
public slots:
void populate();
- void setType(int type); // { mType = type; }
+ void setType(int type);
signals:
void mappingTypesChanged();
@@ -92,8 +91,6 @@ class MappingTreeModel : public SmTreeModel {
QSqlQuery *mMappingsForFileIdQ;
QSqlQuery *mMappingsQ;
QList<mappingType> mMappingTypes;
- QList<MappingData> mValidMappings;
- QList<SmTreeItem*> mSelectedMappings;
QMap<QString, int> mMappings;
const QString mForbidden;
int mType;
@@ -125,7 +122,9 @@ class MappingTreeResultModel : public SmTreeModel {
struct MappingData {
int id;
QString name;
- QStringList path;
+ QList<QStringList> path;
};
+Q_DECLARE_METATYPE(QList<QStringList>)
+
#endif // MAPPINGTREEMODEL_H