From 369c14264c664b38049ac081cf60b8485a4042cb Mon Sep 17 00:00:00 2001 From: Arno Date: Thu, 22 Aug 2013 07:43:20 +0200 Subject: Give Pictures some love! * Show and archive size of pictures * Fix SqlQueries in PicFilesModel: removeFiles and changeMappings * use delegate in PictureView --- newpicsdialog.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'newpicsdialog.h') diff --git a/newpicsdialog.h b/newpicsdialog.h index f706ee8..baae31e 100644 --- a/newpicsdialog.h +++ b/newpicsdialog.h @@ -54,9 +54,9 @@ class NewPicsDialog : public QDialog { class NewPicFilesModel : public SmTreeModel { Q_OBJECT public: - enum Roles { FileNameRole = Qt::UserRole + 1, SizeRole = Qt::UserRole + 2, ValidRole = Qt::UserRole + 3, Md5SumRole = Qt::UserRole + 4, MimeTypeRole = Qt::UserRole + 5, FullPathRole = Qt::UserRole + 6 }; - enum Fields { FileName = 0, Size = 1, Valid = 2, Md5Sum = 3, MimeType = 4, FullPath = 5 }; - enum { NumFields = 6 }; + enum Roles { FileNameRole = Qt::UserRole + 1, SizeRole = Qt::UserRole + 2, ValidRole = Qt::UserRole + 3, Md5SumRole = Qt::UserRole + 4, MimeTypeRole = Qt::UserRole + 5, FullPathRole = Qt::UserRole + 6, PicSizeRole = Qt::UserRole + 7 }; + enum Fields { FileName = 0, Size = 1, Valid = 2, Md5Sum = 3, MimeType = 4, FullPath = 5, PicSize = 6 }; + enum { NumFields = 7 }; explicit NewPicFilesModel(const QStringList &header, QObject *parent = 0); //data @@ -74,7 +74,6 @@ class NewPicFilesModel : public SmTreeModel { private: bool haveMd5(const QString &md5) const; QSqlDatabase mDb; - QSqlQuery *mMd5Query; }; struct FileData { @@ -84,6 +83,7 @@ struct FileData { QString md5sum; QString mimeType; QString fullPath; + QString picSize; }; #endif // NEWPICSDIALOG_H -- cgit v1.2.3-70-g09d2