summaryrefslogtreecommitdiffstats
path: root/mappingtreemodel.h
Commit message (Collapse)AuthorAgeFilesLines
* Make nodes with children selectable in picture widgetArno2012-03-171-0/+2
| | | | | | | | | 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.
* Fix brute forcing of colorsArno2012-03-031-1/+1
| | | | | Don't brute force coloring MappingTree by calling (begin| it keeps the focus.
* Impement editing of picture mappingsArno2012-03-031-0/+1
| | | | Make it possible to edit picture mappings on archived pictures.
* Fix MappingTreeModel::addChild()Arno2012-03-021-1/+2
| | | | | Catch illegal separator in value before making a database entry and insertRows()
* Make it possible to move mappingsArno2012-03-021-0/+7
| | | | | | | | | | | | | Move mappings by context menu. Select new parent by QComboBox with available paths, items separated by "/". Note that hell will break loose if a mapping name contains "/". Will be fixed later. Since mapping views don't have setSortingEnabled(), make SmTreeModel::addRow() sort items. This fixes a long standing bug in SmTreeModel::reparent(): Since it alters the model, newParent has to be a QPersistentModelIndex to stay consistent.
* Mark active MappingsArno2012-02-261-0/+5
| | | | | When selecting pictures, mark the active mappings with a different color.
* Implement PicturesWidgetArno2012-02-261-0/+1
| | | | | | | | Create a tab to show the archived pictures. It's far from complete, but it already does: * show pictures * hover * delete pictures from archive
* Make NewPicsDialog archive picturesArno2012-02-251-5/+7
| | | | | | Finally NewPicsDialog actually does something. Added another parameter to Helper::moveToArchive. If set to true, files will only be copied instead of moved. Default is false, not changing the expected behavior.
* Implemented mapping widget for NewPicsDialogArno2012-02-251-0/+29
| | | | | | | Make it possible to add mappings to new pictures. This actually was a tough one. Maybe I shouldn't drink and code. Next: make NewPicsDialog actually do something.
* Implement MappingTreeWidgetArno2012-02-241-1/+1
| | | | | | | | | | | | | | | This is a rather large commit. It implements MappingTreeWidget using MappingTreeModel unsurprisingly this uncovered some exciting bugs. Fixes the following bugs in MappingTreeModel: * use insertRows() and removeRows() when addings children, because dataChanged() won't do it. * don't use a prepared QSqlQuery when fetching children recursively. This won't work because the query is still active when we invoke ourselves again. Put the query on the stack instead * Keep the model sorted. Also add an entry for a MappingTreeEditor to the File-Menu.
* First shot at MappingTreeModelArno2012-02-241-0/+72
MappingTreeModel is a generic approach at mappings files to generic data, eg atttributes, actors or themes. It compiles, but nothing more. So expect many exciting bugs and SegFaults.