summaryrefslogtreecommitdiffstats
path: root/archivemodel.h
Commit message (Collapse)AuthorAgeFilesLines
* Make the archive cache usefulArno2013-06-231-10/+8
| | | | | Read the cache if there is one, if not, read it in another thread and update the view when it's done.
* Fix renaming items, protect colletor-vars with MutexesArno2013-06-231-1/+4
| | | | | | | This should be 2 commits, really... Fix: write cache after renaming an item Protect: protect the accessors of ArchiveCollector with Mutexes
* Archive CacheArno2013-06-221-0/+7
| | | | | | | | | | | | | | | | Create a caches of database archive views. Esp. gathering data for actors takes a long time, and I don't see how to optimize the queries. So write them to a QDataStream. It was much more difficult that it sounds. Once again I was lost in recursion. Did I mention that I hate recursion? The solution: When writing use the address of the SMTreeItem cast to qint64 as unique key. On reading build a hash with the address as key and use it to find the parent of the next item. I hope that makes sense...
* Filter recursiveArno2013-06-141-0/+2
| | | | | | | | | | | Well, well... Recursion isn't that bad at all. Filter experimental ArchiveView recursive by the following rules: * check children _and_ parents for filter * if any child _or_ parent matches, accept the current row, parents and children. The column is converted to a QString and matched by QRegExp, so don't try to match numbers or anything else.
* Remove nodesArno2013-06-031-0/+2
| | | | | Implement remove nodes for ArchiveView. Only empty nodes without children can be removed. Everything else is too dangerous :)
* Implement RenameArno2013-06-021-1/+7
| | | | Rename items: spits out an error message if the new item already exists.
* Remember expanded ItemsArno2013-06-021-0/+2
| | | | | For the current SortOrder the expanded items are written to the config file and read on startup.
* Gather archive data in a threadArno2013-06-011-5/+33
| | | | | Fetching data sometimes takes a long time, so do it in a QThread and show a progress dialog. Some kludges included :)
* Make filter work in new ArchiveViewArno2013-06-011-1/+2
| | | | | | | Filter by QRegExp, but only on the first level according to the sort order. All items are expanded when filtered. Also, remember the filter and the sort order when exiting.
* Do something when SortOrder is changed in ArchiveViewArno2013-06-011-3/+4
| | | | | | | | | Actually do something when the sort order is changed. That resulted in various fixes to both model and view, since both had completely untested codepaths. Most notable fix: Only select those seriesparts which are actually mapped to the selected genre or actor.
* Fix various display issues of ArchiveModelArno2013-06-011-0/+1
| | | | | | * Show childcount * Show subtitle or part no * Resize Widget properly
* First draft of new ArchiveModelArno2013-06-011-0/+44
The new ArchiveModel allows sorting and display by the series name, actors and genres. Hopefully it's generic enough to easily add other sort orders like file location or file type. For now, it's just there. Not included anywhere. No view, no nothing.