summaryrefslogtreecommitdiffstats
path: root/archivecontroller.cpp
diff options
context:
space:
mode:
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);