From 7b374095aaec92e0fb7044550903aa8e10522677 Mon Sep 17 00:00:00 2001 From: Arno Date: Sun, 11 Aug 2013 08:01:22 +0200 Subject: Implement preview Show 4 frames of the selected movie in PictureViewer2. --- archivecontroller.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'archivecontroller.cpp') diff --git a/archivecontroller.cpp b/archivecontroller.cpp index 4475166..185b770 100644 --- a/archivecontroller.cpp +++ b/archivecontroller.cpp @@ -176,6 +176,20 @@ void ArchiveController::showProperties(){ dlg.exec(); } +void ArchiveController::showPreview(){ + QModelIndexList sel = mFileSelection->selectedRows(ArchiveFilesModel::FullPath); + if(sel.isEmpty()){ + return; + } + QModelIndex first = sel.first(); + QPixmap preview = Helper::preview(first.data().toString()); + if(!preview.isNull()){ + PictureViewer2 *pv = SmGlobals::instance()->pictureViewer(); + pv->setPixmap(preview); + pv->show(); + } +} + void ArchiveController::addActionForTree(QAction *a){ mActionsForTree << a; mArchiveTree->addAction(a); -- cgit v1.2.3-70-g09d2