summaryrefslogtreecommitdiffstats
path: root/smtreemodel.h
Commit message (Collapse)AuthorAgeFilesLines
* Major rework of MappingTreeResultView + ModelArno2014-06-291-6/+6
| | | | | | | 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.
* Add filter bar to MappingTreeWidgetArno2013-10-131-0/+2
| | | | | Move matchRecursive from ArchiveModel to SmTreeModel so we can use it here, too.
* Make new archive workArno2013-07-081-0/+1
| | | | | | | | | | Well, this is a huge commit. Should be severals, but who knew... First and foremost feature: Make NewMovieWizard work with the experimental model. This change obsoleted a lot of code. Also, the old archive won't work with with the new Wizward... There are most probably many other features I forgot about.
* Foremost a fix for SmTreeModelArno2012-09-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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...
* Make it possible to move mappingsArno2012-03-021-3/+3
| | | | | | | | | | | | | 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.
* Update IsLocal when setting DVD no.Arno2011-05-221-0/+1
| | | | | | The field IsLocal in the SeriesTreeModel is now properly updated when the DVD no. changes. It still doesn't propagate to the file view, though.
* Made all icons in qresource available for UIArno2010-12-271-0/+6
| | | | | | | | | | | | | | | | Every registered icon can be chosen as Qt::DecorationRole for all models at once. Suitable icons must be added to SmGlobals::mIcons. Key is a descriptive text, value is the icon path. To make things easier SmTreeModel got two new member functions: -QIcon decorationIcon() returning the current Icon -void setDecorationIcon() to set the current Icon The current Icon is initialized in the constructor from QSettings - ui/iconfolder To update the TreeViews connected to the FileSystemModel a little hack is needed: Just set the QFileIconProvider again. This causes the Model to update connected views.
* Selectable columns in FilesTreeViewArno2010-12-051-8/+11
| | | | | | | | | Made columns shown in FilesTreeView selectable. Also, the order of columns is saved and restored. This was a difficult one. I even had to make a debug build of qt. But I fixed a serious bug in FilesTreeModel::modeName: don't access the Hash if modeName == -1.
* Implemented dialog for showing movies without coversArno2010-11-271-1/+2
| | | | | | | | | Implemented a new dialog to show movies without covers. The view is a QTreeView with another model. While working on the model several shortcomings of SmTreeModel were resolved. findValue() now takes another argument to indicate the column the returned QModelIndex() should represent. Also, itemAt() was promoted from private to protected. It's quite useful for derived classes.
* Started NewMovieWizard for adding moviesArno2010-07-021-0/+2
| | | | | | | | Finished GUI for first page of NewMovieWizard. To make things easier I added two new member functions to SmTreeModel: -QModelIndex find() to find items by value of a column -void reparent() to remove an item from one parent and add it to another
* Treemodel DevelopmentArno2010-06-161-4/+8
| | | | | | | | | | -Changed the database schema. Attached quality to files -Subclassed SmTreeModel for SeriesTreeModel -Made SmTreeModel virtual for that Well, it seems there is a serious problem with the database schema. Curiously everything inside the model works beside the db update. Seems I have it wrong with the fks :(
* Implemented SmTreeModel::parentArno2010-06-121-1/+2
| | | | | Forgot to implement SmTreeModel::parent. Thus it was a pure abstract class and not instantiable.
* Finished SmTreeModel, started SmUberModelArno2010-06-061-0/+22
| | | | | kinda finished the treemodel. Don't really know if it's complete yet. More programming will show :)
* Started Treemodel for ArchiveArno2010-06-031-0/+27
Implemented generic SmTreeItem, started on generic SmTreeModel.