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 --- helper.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'helper.cpp') diff --git a/helper.cpp b/helper.cpp index 348c066..7349b09 100644 --- a/helper.cpp +++ b/helper.cpp @@ -290,6 +290,15 @@ namespace Helper { return retval.scaledToWidth(640); } + QVariant picSize(const QString &path){ + QPixmap pm(path); + if(!pm.isNull()){ + QString retval = QString("%1x%2").arg(QString::number(pm.width())).arg(QString::number(pm.height())); + return retval; + } + return QVariant(); + } + Duration::Duration() : mHours(0), mMinutes(0), mSeconds(0) {} Duration::Duration(qint64 seconds){ -- cgit v1.2.3-70-g09d2