diff options
author | Arno <am@disconnect.de> | 2013-10-12 15:35:24 +0200 |
---|---|---|
committer | Arno <am@disconnect.de> | 2013-10-12 15:35:24 +0200 |
commit | 89662ce745c1eee152e7bc2200be5f08caee78a8 (patch) | |
tree | 8d1e1de7d33c9a2ba78ba4cecb5683cf8db0f587 /archivecontroller.cpp | |
parent | f4d47b31976bf0b95c8ee3e4c1f010ffe1d2fd21 (diff) | |
download | SheMov-89662ce745c1eee152e7bc2200be5f08caee78a8.tar.gz SheMov-89662ce745c1eee152e7bc2200be5f08caee78a8.tar.bz2 SheMov-89662ce745c1eee152e7bc2200be5f08caee78a8.zip |
Improve PictureViewer2
* implement Mark Files
* always show all pictures from context
* change navigation:
N -> next
P -> previous
M -> mark/unmark file
Diffstat (limited to 'archivecontroller.cpp')
-rw-r--r-- | archivecontroller.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/archivecontroller.cpp b/archivecontroller.cpp index 84e714c..574b9c1 100644 --- a/archivecontroller.cpp +++ b/archivecontroller.cpp @@ -311,7 +311,19 @@ void ArchiveController::fileDoubleClicked(const QModelIndex &idx){ return; } PictureViewer2 *pv = SmGlobals::instance()->pictureViewer(); - pv->setFile(idx.data(ArchiveFilesModel::FullPathRole).toString()); + QModelIndex parent = idx.parent(); + QStringList paths; + if(parent.isValid()){ + int row = 0; + QModelIndex child = parent.child(row, ArchiveFilesModel::FullPath); + while(child.isValid()){ + paths << child.data().toString(); + ++row; + child = parent.child(row, ArchiveFilesModel::FullPath); + } + } + pv->setShowMarkItem(false); + pv->addFiles(paths); pv->show(); } |