summaryrefslogtreecommitdiffstats
path: root/archivecontroller.cpp
diff options
context:
space:
mode:
authorArno <am@disconnect.de>2013-08-11 08:01:22 +0200
committerArno <am@disconnect.de>2013-08-11 08:01:22 +0200
commit7b374095aaec92e0fb7044550903aa8e10522677 (patch)
tree82fa5c69f56db2a6def9923b50916dabbea53ce8 /archivecontroller.cpp
parentf597c802ab31560bcc200ab068675ecc34f423c9 (diff)
downloadSheMov-7b374095aaec92e0fb7044550903aa8e10522677.tar.gz
SheMov-7b374095aaec92e0fb7044550903aa8e10522677.tar.bz2
SheMov-7b374095aaec92e0fb7044550903aa8e10522677.zip
Implement preview
Show 4 frames of the selected movie in PictureViewer2.
Diffstat (limited to 'archivecontroller.cpp')
-rw-r--r--archivecontroller.cpp14
1 files changed, 14 insertions, 0 deletions
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);