summaryrefslogtreecommitdiffstats
path: root/pictureswidget.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix setAlternatignRowColorsArno2013-04-101-4/+3
| | | | | | | | | | | | | | | | | | | | Well, what started as a try to simplify QTreeView ended in a mass header murder... What happened: * I searched for a way to let every QTreeView honor the setAlternatingRowcolors() setting. Unfortunately it isn't enough to just set the global palette and set it to true. So every QTreeView is now derived from SmTreeView * SmTreeView registers itself with SmGlobals, so the property is set _after_ it's constructed. It's definitely not enough to call it in the constructor. I guess that's a bug. But it's enough to append the SmTreeView to a QList<QWidget*> in SmGlobals and call it _after_ the painting is done. * As an added Bonus we can add virt. funcs to every SmTreeView at will While at it I realized that most of the included headers were void, so remove them. No idea what impact it has on the bin size...
* New Class: SmTreeViewArno2013-04-051-32/+1
| | | | | | | | | | Code reusage: all 3 tabs had the same funtions: readHeaderConfig, writeHeaderConfig and toggleHeader, so turn it into a class derived from QTreeView. Unfortunately mATree didn't do things as later added Views, so it took some time to find the culprit in SheMov::readSettings :( Hopefully I didn't break too much...
* Fix ColorsArno2013-03-171-0/+1
| | | | | | | This is more a qt5-fix than a SmDirModel fix. The global palette doesn't propagate any more, so we have to set the palette in every QTreeView separately. Very annoying and tedious. Maybe I missed a Widget or two, dunno...
* Port to Qt5Arno2013-03-031-6/+6
| | | | | | | | * 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 :)
* More fallout from the MappingTreeModel fixArno2012-11-171-1/+3
| | | | | Forgot to fix the Edit widget... While at it, refresh the view if mappings changed in PicturesWidget.
* Fix display of caption when hoveringArno2012-10-271-1/+1
| | | | | Well, centering and sizing text is a bitch when operating with QPixmaps and QImages...
* Bugfixes: don't select dirs and don't crash on write settingsArno2012-10-271-1/+3
| | | | | | | Only select files when archiving pics from filemanager. While at it, I noticed a crash on close when no item is selected in PicturesWidget. So check if MappingData is valid on writing settings. Best way is MappingData::isValid(), and for that I needed a explicit constructor.
* Fix archiving picturesArno2012-10-271-2/+2
| | | | | | Well, what can I say. Lost in recursion and parent pointers. This commit actually boils down to using the proper database tables and inserting the right values. 'Nuff said...
* Make headers in PictureView configurableArno2012-10-201-1/+35
| | | | | Save state of QHeaderView and restore it on startup. Maybe it's time for a SmTreeView Class implementing these generic functions...
* Always select all PicsArno2012-10-201-0/+1
| | | | | Select all pics from current node when doubleclicking a file in pictures tab.
* Fix Mappings in PictureViewer2Arno2012-10-041-194/+4
| | | | | | | | | | 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.
* Fix MappEditDialgArno2012-10-031-2/+2
| | | | | Convert to new mapping DB layout. Return the parent ID where necessary instead of the mapping ID.
* Foremost a fix for SmTreeModelArno2012-09-301-4/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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...
* MappingTreeModel Fix: get rid of displaying mappings in status barArno2012-09-221-29/+0
| | | | | When selecting pictures the mappings were displayed in the status bar. Get rid of it. It's useless and nothing to be shown down there anyway.
* MappingTreeModel Fix: Select pictures from pics_mappings2Arno2012-09-221-5/+5
| | | | | Select pictures referencing pics_mappings2 instead of broken pics_mappings. This just fixes the selection, nothing else!
* Weed out PictureViewer in favor of PictureViewer2Arno2012-04-281-1/+1
| | | | Remove PictureViewer from everywhere and use PictureViewer2 instead.
* Save settings for PicturesWidgetArno2012-03-181-0/+14
| | | | Remember selected node in PicturesWidget.
* Fix FrameCache and HoverWindowArno2012-03-181-1/+5
| | | | | | Another commit that should be two. While fixing FrameCache to delete invalid Pixmaps, I ventured into the depths of HoverWindow. Now it hides when focus leaves the widget we're hovering over.
* Fix some severe braindamageArno2012-03-181-10/+21
| | | | | | | | | | | | | | It started as a buxfix session, but the more I dug into some ancient code, the more I had to change. Well, first and foremost, this fixes a crash in PicturesWidget. Trying to display the mappings of the selected picture in a different color never was a good idea. Show them in the statusbar instead. While looking at the statusBar code, make PictureWidget emit signals to show the total size and number of selected items. Then I noticed some really, really braindamaged connection madness in the Shemov constructor. Instead of doing all the work in SheMov itself, have the widgets emit signals. This should have been several commits, but one lead to another...
* Add keyboard actions to PictureViewer2Arno2012-03-171-0/+6
| | | | | | | 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.
* Revamp Select all files in PictureViewerArno2012-03-171-12/+7
| | | | | | Change semantics of "Select all pics" in PictureViewer2. Now all pics are not really all pics any more, but only all pics of the selected mapping node.
* Make nodes with children selectable in picture widgetArno2012-03-171-22/+36
| | | | | | | | | This was a tough one. Lost in recursion. When selecting nodes with children in the picture widget, all files having this node as mapping parent are shown. Had to make some changes to SmTreeModel::findRecursive for this. I hope I didn't break anything. If I did, I'll fix it :) Also disposed of some comments and unused member variables.
* Slide showArno2012-03-101-0/+24
| | | | | | Implement slide show in Pictureviewer2. Slide over all available files and wrap around when reaching the end of the list. Also added some more artwork.
* Make PictureViewer usefulArno2012-03-081-2/+27
| | | | | | | -Implement add and replace files -use QList<QVariant> (typedef'd) for shoveling data around -more code shuffling -new artwork
* Show picture on doubleClick in PicturesWidgetArno2012-03-081-2/+13
| | | | | Show picture in PictureViewer2 when double clicking an item in pictures widget. Also shuffle some code around.
* First draft of PictureViewer2Arno2012-03-081-0/+5
| | | | | | Doesn't do much other than showing a default picture, but it behaves like a QDialog and positions itself correctly. It's quite a pain in the ass with a tiling window manager...
* Customize menus and toolbar for PictureViewArno2012-03-031-3/+13
| | | | | | | * Added 4 new icons for PictureView-actions. * simplified SheMov::tabChanged(int) * fix long standing bug with QActionGroups in SheMov. Enable and disable all actions according to the active tab
* Implement refresh for PicturesArno2012-03-031-2/+10
| | | | | Add action to PictureView for refreshing the view. Needed after editing mappings.
* Impement editing of picture mappingsArno2012-03-031-0/+51
| | | | Make it possible to edit picture mappings on archived pictures.
* Mark active MappingsArno2012-02-261-0/+44
| | | | | When selecting pictures, mark the active mappings with a different color.
* Implement PicturesWidgetArno2012-02-261-0/+228
Create a tab to show the archived pictures. It's far from complete, but it already does: * show pictures * hover * delete pictures from archive