From 91cf2978ba97bc8ebda2da9df01d3dde22b99f14 Mon Sep 17 00:00:00 2001 From: Arno Date: Thu, 12 Aug 2010 19:40:33 +0200 Subject: Show picture size or duration in FilesTreeView Finally managed to view size of pictures or duration for movies in the file view. That values are not held in the database, they're created on the fly. For this to perform I created a disk based cache. I also had to create some convenience functions: FilesTreeModel::streamInfo(const QString &) FilesTreeModel::pictureInfo(const QString &) The cache is a QDataStream and will be deleted if the magic doesn't fit. --- shemov.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'shemov.cpp') diff --git a/shemov.cpp b/shemov.cpp index 359d06a..509848e 100644 --- a/shemov.cpp +++ b/shemov.cpp @@ -98,6 +98,8 @@ void SheMov::closeEvent(QCloseEvent *event){ mFSWidget->writeSettings(); mFSWidget->pictureViewer()->close(); mATree->seriesWidget()->writeSettings(); + FilesTreeModel *filesModel = static_cast(SmGlobals::instance()->model("FilesModel")); + filesModel->writeCache(); writeSettings(); delete SmGlobals::instance(); event->accept(); -- cgit v1.2.3-70-g09d2