Applies filter to just show the images in the ImageViewer
ClosedPublic

Authored by atulsharma on Jul 10 2017, 1:17 PM.

Details

Summary
  • adds SortModel in ImageViewer to filter just the images for the ImageViewer listView
  • uses filterRole and filterRegExp properties exposed by QSortFilterProxyModel
  • mapping from source and to source are done in order to keep the currentItem consistent for every view

Diff Detail

Repository
R659 Koko Image Gallery
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
atulsharma created this revision.Jul 10 2017, 1:17 PM
atulsharma updated this revision to Diff 16455.Jul 10 2017, 3:17 PM

currentImage stores the information related to the source model

mart added inline comments.Jul 10 2017, 3:25 PM
src/sortmodel.cpp
243

return mapFromSource( sourceModel()->index( indexValue, 0, QModelIndex())).row();

atulsharma updated this revision to Diff 16465.Jul 10 2017, 6:25 PM

adds mappings

atulsharma updated this revision to Diff 16468.Jul 10 2017, 6:48 PM

Adds MimeTypeRole definition for ImageListModel

atulsharma updated this revision to Diff 16489.Jul 11 2017, 8:38 AM

view of currentImage automatically changes the currentItem according to the navigation performed in imageviewer

atulsharma edited the summary of this revision. (Show Details)Jul 11 2017, 8:44 AM
mart accepted this revision.Jul 11 2017, 8:46 AM
This revision is now accepted and ready to land.Jul 11 2017, 8:46 AM
This revision was automatically updated to reflect the committed changes.