summaryrefslogtreecommitdiffstats
path: root/filesystemwidget.cpp
diff options
context:
space:
mode:
authorArno <am@disconnect.de>2012-04-28 15:29:35 +0200
committerArno <am@disconnect.de>2012-04-28 15:29:35 +0200
commit3f2df0541a862d8e6a799b9502e6b3f7a0c5f884 (patch)
tree4451efc120da60b894a40c98391236fc5ae2096a /filesystemwidget.cpp
parent5bf304d22564666621c35919b2d9aea1aa5b4b5a (diff)
downloadSheMov-3f2df0541a862d8e6a799b9502e6b3f7a0c5f884.tar.gz
SheMov-3f2df0541a862d8e6a799b9502e6b3f7a0c5f884.tar.bz2
SheMov-3f2df0541a862d8e6a799b9502e6b3f7a0c5f884.zip
Weed out PictureViewer in favor of PictureViewer2
Remove PictureViewer from everywhere and use PictureViewer2 instead.
Diffstat (limited to 'filesystemwidget.cpp')
-rw-r--r--filesystemwidget.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/filesystemwidget.cpp b/filesystemwidget.cpp
index 1592d13..f8fc294 100644
--- a/filesystemwidget.cpp
+++ b/filesystemwidget.cpp
@@ -35,12 +35,12 @@
#include "shemoviconprovider.h"
#include "filesystemfileproxy.h"
#include "helper.h"
-#include "pictureviewer.h"
+#include "pictureviewer2.h"
#include "smglobals.h"
FilesystemWidget::FilesystemWidget(QWidget *parent) : QWidget(parent), mClipboardMode(None) {
mModel = new FileSystemModel(this);
- mModel->setRootPath("/");
+ mModel->setRootPath("/");
mModel->setFilter(QDir::AllEntries | QDir::NoDot);
mModel->setReadOnly(false);
mIconProvider = new SheMovIconProvider;
@@ -187,7 +187,10 @@ void FilesystemWidget::fileViewActivated(const QModelIndex &idx){
programArgs = data.second;
}
if(mt.toLower().startsWith("image")){
- mPicViewer->showPic(path);
+ if(!mPicViewer->isVisible()){
+ mPicViewer->setVisible(true);
+ }
+ mPicViewer->setFile(path);
return;
}
programArgs << path;
@@ -409,6 +412,15 @@ void FilesystemWidget::markSeen(){
}
}
+void FilesystemWidget::selectAllPV(){
+ QModelIndex idx = mDirView->currentIndex();
+ if(idx.isValid()){
+ QModelIndex real = mDirProxy->mapToSource(idx);
+ QString filePath = real.data(QFileSystemModel::FilePathRole).toString();
+ mPicViewer->addFiles(filePath, true);
+ }
+}
+
void FilesystemWidget::setWindowTitle(const QString &dir){
mWindowTitle = QString("%1 - %2").arg(qApp->applicationName()).arg(dir);
emit windowTitle(mWindowTitle);