summaryrefslogtreecommitdiffstats
path: root/picfilesmodel.h
diff options
context:
space:
mode:
Diffstat (limited to 'picfilesmodel.h')
-rw-r--r--picfilesmodel.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/picfilesmodel.h b/picfilesmodel.h
index 6a033c1..a538f75 100644
--- a/picfilesmodel.h
+++ b/picfilesmodel.h
@@ -14,8 +14,8 @@
class PicFilesModel : public SmTreeModel {
Q_OBJECT
public:
- enum Roles { FileNameRole = Qt::UserRole + 1, SizeRole = Qt::UserRole + 2, MimeTypeRole = Qt::UserRole + 3, FullPathRole = Qt::UserRole + 4, IdRole = Qt::UserRole + 5, AddedRole = Qt::UserRole + 6, Md5SumRole = Qt::UserRole + 7, SizeDisplayRole = Qt::UserRole + 8 };
- enum Fields { FileName = 0, Size = 1, MimeType = 2, FullPath = 3, Id = 4, Added = 5, Md5Sum = 6, SizeDisplay = 7 };
+ enum Roles { FileNameRole = Qt::UserRole + 1, SizeRole = Qt::UserRole + 2, MimeTypeRole = Qt::UserRole + 3, FullPathRole = Qt::UserRole + 4, IdRole = Qt::UserRole + 5, AddedRole = Qt::UserRole + 6, Md5SumRole = Qt::UserRole + 7, PicSizeRole = Qt::UserRole + 8 };
+ enum Fields { FileName = 0, Size = 1, MimeType = 2, FullPath = 3, Id = 4, Added = 5, Md5Sum = 6, PicSize = 7 };
enum { NumFields = 8 };
explicit PicFilesModel(const QStringList &headers, QObject *parent = 0);
void setMapping(int pMapId);
@@ -25,7 +25,7 @@ class PicFilesModel : public SmTreeModel {
QVariant data(const QModelIndex &index, int role) const;
QList<QVariant> dataList(const QModelIndex &idx) const;
QList<QList<QVariant> > allFiles() const;
- void removeFiles(const QList<QPersistentModelIndex> &files);
+ void removeFiles(const QList<QPair<int, QString> > &files);
bool changeMappings(const QList<int> &fileIds, const QList<QVariant> &parentIds);
QList<MappingData> mappingDataFromFile(int fileId) const;
QList<MappingData> mappingDataFromFiles(const QList<int> fileIds) const;
@@ -39,9 +39,6 @@ class PicFilesModel : public SmTreeModel {
MappingTreeModel *mMappingTreeModel;
QString mPopulateQS;
QString mMappingsQS;
- QSqlQuery *mDeleteFileQ;
- QSqlQuery *mDeleteMappingsQ;
- QSqlQuery *mAddMappingsQ;
QList<int> mMappingIds;
};