summaryrefslogtreecommitdiffstats
path: root/pictureviewer2.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix convert to PNG messArno2015-10-241-7/+15
| | | | | | | | | | Automatically converting a damaged file to PNG and updating the archive is fine as long as we're *in* the archive, but it totally messes things up if we're browsing the file system. So check if the image is in the archive path, and only then consider auto-converting it. Also show a notice in the InfoItem if the file has been converted.
* Fix crash in PictureViewer2Arno2015-10-121-0/+5
| | | | | | Don't try to access an empty QList<QVariant>. It comes from the constructor. There has to be a better way to fix this, but right now it eludes me...
* Slide through recent in PictureViewer2Arno2015-08-291-5/+58
| | | | | For now, recent is hardcoded to pictures added in the last 6 months. Maybe it should be configurable...
* Fixes for control item in PictureViewer2Arno2015-08-281-13/+18
| | | | | | * place it bottom right instead of right center * add proper margins * use variables for margins and sizes instead of magic numbers
* Implement shuffle in PictureViewer2 controlsArno2015-08-271-18/+35
| | | | Remove action from context menu.
* Remove PVActions from SheMovArno2015-08-271-17/+1
| | | | Remove actions that are now triggered by the ControlItem.
* Add missing restore() for QPainterArno2015-08-271-0/+1
|
* Fix keyboard triggersArno2015-08-271-2/+26
| | | | Call the appropriate functions on keyPressEvent
* Reload picture list on normal slideArno2015-08-271-0/+3
| | | | | When changing from slide through all to slide, reload picture list from model instead of continuing with current list from all.
* Make PictureViewer2 controls workArno2015-08-271-4/+57
| | | | | Now the controls actually do something. Not still as promised, but they kinda work!
* Display control itemsArno2015-08-271-4/+58
| | | | | Draw control items in PictureViewer2 at the right centered on the y- axis.
* Create dummy BoundingRectItem for controlsArno2015-08-271-1/+23
| | | | Draw a dummy rounded rectangle on the bottom left for control items.
* Custom QGraphicsScene for PictureViewer2Arno2015-08-271-1/+9
| | | | | Introduce PictureViewerGraphicsScene for upcoming control items in the scene.
* Don't crash when current pic doesn't existArno2015-08-131-0/+4
| | | | Check if the currently shown picture still exists instead of crashing.
* Implement slide through all picturesArno2015-08-121-6/+77
| | | | | Wow, that was much more complicated than I first thought, but it seems to work. Maybe it's much more convoluted than it has to be :)
* Automatically convert invalid jpg picsArno2015-07-181-3/+11
| | | | | | | | Well, seems that's Qt's ImageReader got pickier regarding jpeg-files. If the resulting QPixmap is null and void, try to convert them to png. This introduces a new dependency to ImageMagic++. I don't like it, but it works, kinda... I saw random crashes while testing...
* Usability fixesArno2015-06-071-0/+1
| | | | | | | | | | * start maximized * focus MappingTree when showing NewPicsDialog * Keyboard Shortcuts for FilesystemWidget: CTRL+UP: go to parent dir CTRL+LEFT: go back CTRL+U: unpack * close UnpackDialog when done
* Resize PictureViewer2Arno2015-06-061-15/+9
| | | | | | Make it possible to resize the PictureViewer2 and get rid of fixed size. Also, make sure that the current picture is redrawn when we get a resize event.
* Save position of NewPicsDialogArno2015-04-081-1/+0
| | | | | Add button to save the position of the NewPicsDialog and move it there when we show()
* Move NewPicsDialog to topLeft + selectAllArno2015-03-211-5/+14
| | | | | | When calling NewPicsDialog from PictureViewer, move it to the top left corner to not cover the pic itself. Also, select all pics from current directory when no files are marked.
* Bring back the nice MappingItem!Arno2014-07-091-59/+28
| | | | | | | | | | Resurrect the indented MappingItem. There's some recursion involved, but actually it ain't so hard if you have a template :) This adventure uncovered a bug in NewPicsDialog: Right now we also record the nodes (not just the leaves) for the Mappings. This bug was introduced by commit dc7cc269a4fffe43bdac2ae2dc6548fbd1e3bb5e and will be fixed in one of the next commits.
* Major rework of MappingTreeResultView + ModelArno2014-06-291-1/+1
| | | | | | | Well, I hope this fixes the crashes for good. String comparison for looking up the parents really wasn't a prudent thing to do... Use the ParentIds instead.
* Fix Display of mappingsArno2014-06-191-18/+65
| | | | | MappingTreeModel::treeFromPath() never worked as intended, so replace it by displaying mappings in a QTextTable.
* Add Skip in PictureViewer2Arno2014-06-071-0/+25
| | | | | PageDown = back 25 PageUp = forward 25
* Don't show PicGone when showing a PreviewArno2013-10-121-2/+2
|
* Bugfix PictureViewer2Arno2013-10-121-8/+14
| | | | Don't crash if file list is empty. Check size of mFiles.
* Use marked files from PictureViewer2Arno2013-10-121-2/+32
| | | | | | | | * Call NewPicsDialog with marked files list * some more keyboard navigation: -> Cursor UP and RIGHT - previous -> Cursor DOWN and LEFT - next -> DELETE - delete file
* Improve PictureViewer2Arno2013-10-121-11/+68
| | | | | | | | | * implement Mark Files * always show all pictures from context * change navigation: N -> next P -> previous M -> mark/unmark file
* Fix show/hide events for PictureViewer2Arno2013-10-121-1/+18
| | | | check and uncheck the show/hide QAction on showEvent/hideEvent.
* Preview fixesArno2013-09-141-3/+3
| | | | | * Don't show the mapping item in preview, because it has none. * Use qApp->showOverrideCursor() instead of QWidget::cursor()
* Usability fixArno2013-08-211-2/+2
| | | | | | | * repair shortcuts for adding files to NewPicsDialog and showing it from PictureViewer2 * Replace files in NewPicsDialog instead of adding them * add missing header to MappingTreeModel
* Fix previewArno2013-08-161-2/+4
| | | | | * Show :/picgone.png if movie is not available * Show cover if preview is called on a picture
* Implement previewArno2013-08-111-8/+17
| | | | Show 4 frames of the selected movie in PictureViewer2.
* Port to Qt5Arno2013-03-031-8/+8
| | | | | | | | * Change #include to qt5 * Fix missing QX11Info * use explicit constructor for QVariant(QColor) * use beginResetModel() and endResetModel() instead of reset(). The latter was removed. Hopefully it still works :)
* Usability: Make archiving pics easierArno2012-11-161-1/+11
| | | | | | | | | | | To make archiving pictures from different sources easier, add a NewPicsDialog to PictureViewer. Add shortcuts to show the dialog and adding pics to it. After adding all pics with the same mappping, just click OK and add them to the archive. Shortcuts: Meta+s: Show NewPicsDialog Meta+a: Add current pic
* Fix centering image on sceneArno2012-10-201-5/+6
| | | | | Use Qt-functions for centering pics in PictureViewer2 and fix distance to window borders.
* Make PictureViewer2 size configurableArno2012-10-201-10/+18
| | | | | | | | Several bug fixes on the way: * set fixed size policy for PictureViewer2 -> makes resizing much easier * don't set Y-offset when showing a pic. The scene takes care of it * don't deliver SIGNAL configChanged() twice to PictureViewer2 * center Widget on current screen when calling Helper::centerWidget
* Usability: ConfigurationDialog -> picturesArno2012-10-201-11/+3
| | | | | | Replace checkbox for showing info items at all with a "do not show" position in the combobox. While at it, remove unused SideBySide position.
* Keep current Pic when adding files to PicViewer2Arno2012-10-191-3/+13
| | | | | | | Try to get the position of the current picture after adding and clearing the file list of PictureViewer2. While thinking of using std::find for this I realized that the operator()-functions in Helper:: weren't used any more, so remove them and the <algorithm> includes.
* Fix Mappings in PictureViewer2Arno2012-10-041-20/+31
| | | | | | | | | | Another fix for the new MappingTreeModel database layout: Make the mappings display correctly when showing an archived picture. For performance reasons I had to make PicFilesModel global and put it into a separate file. Also clean up MappingTreeModel: remove comments and unused functions.
* Foremost a fix for SmTreeModelArno2012-09-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not working again, but I eventually have to commit the changes. Fixes to SmTreeModel: * Fix SmTreeModel::index(). The previous comment was quite valid. I'm surprised that it worked at all. I have no clue why to return an invalid QModelIndex if the column isn't 0. Now an index with any valid column number can be created. * Fix SmTreeModel::parent(). Again, why shouldn't we create a parent index with a column other than 0? No idea... * Fix SmTreeModel::headerData(). Add some sanity checks. * Fix SmTreeModel::findRecursive(). Well, what is there to say. It never worked for models with a depth > 1, but obviously it didn't really matter until now. To make it work I had to change SmTreeItem as well. SmTreeItem::next() returns the next valid parent/sibling, or 0 if there isn't one. There may be some fallout from these changes, but they're yet to be seen. Changes to PictureView: * fix selecting an item according to the new datasbase layout * same goes for editing items. If an update actually works has to be checked. Overall, it's an intermediate commit that should have been a sane series of commits. Can't be changed now...
* Implement copy file from PictureViewer2Arno2012-09-081-0/+21
| | | | | | | | | | | | Add an action to PictureViewer2 for copying the current pic to another directory. When I tried to add the QAction to the context menu, I realized that I chose the variable names picView and picViewer in shemov.cpp very poorly. Took some time to sift though it. Eventually I shifted some code around to make it more readable. While at it I replaced the individual separators with createSeparator(). Other than adding the Copy To action no functional changes.
* Weed out PictureViewer in favor of PictureViewer2Arno2012-04-281-0/+44
| | | | Remove PictureViewer from everywhere and use PictureViewer2 instead.
* Finally fix MappingItemArno2012-04-031-31/+16
| | | | | | | | | Well, the comment was right. The previous implementation was fishy at best. It simply didn't work. Could have been so ease. Just look at the commit size :) Don't forget that there will be an empty line at the beginning of the QTextDocument if you don't check the first insert.
* Make Mapping widget configurableArno2012-03-241-19/+31
| | | | | Make mappingwidget behave according to settings. SideBySide doesn't work yet, maybe it should be canned.
* Made FileInfoItem configurableArno2012-03-241-4/+38
| | | | | | | Create copious options for FileInfoItem, reintroducing the Pictures tab in ConfigurationDialog. Also fixed a long standing bug in SeriesTreeWidget: don't static_cast() an event. It'll succeed even when called from a destructor.
* Show mappings in PictureViewer2Arno2012-03-241-8/+102
| | | | | | | | | | | Hell, this was one heck of a bitch. Lots of changes just to show the mapping tree in PictureViewer2. Did I mention that I hate recursion? Added a function for fetching a SmTreeItem * from MappingTreeModel for paths, just to turn it into a QTextDocument in PictureViewer2. Of course everything is recursive. Did I say that I hate recursion? Well, as said in the comments, one recursion function seems fishy, but it works (tm).
* Add keyboard actions to PictureViewer2Arno2012-03-171-2/+34
| | | | | | | Never, ever forget: QVariant() casts to a valid int! Again, this was a tough one, but maybe I shouldn't drink and program. PictureViewer2 reacts to Escape and Space. Escape hides it and stops the slide timer, Space activates the slide timer.
* Make info item in PictureViewer2 moveableArno2012-03-171-1/+11
| | | | | This was easier than I thought. Make info item movable and save position on exit.
* Randomize selection for pictureviewerArno2012-03-171-0/+4
| | | | | std::random_shuffle available files in PictureViewer2. Add action to View menu and reuse an icon.