summaryrefslogtreecommitdiffstats
path: root/archivemodel.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix some nullptr warningsArno2018-11-231-3/+3
| | | | Also add -Wno-padded to the CLang-Model.
* Remove unused functionArno2018-11-231-1/+0
| | | | ArchiveFilesModel::nextDvd() is a distant memory...
* Kinda fix display of metadataArno2016-11-061-0/+8
| | | | | | | | If a seriespart is selected in the tree, display a summary. When a file is selected, display the actual metadata. It's much more consistent. Before, the metadata of the first *item in the selected list was displayed.
* Play movies from USB if availableArno2016-03-051-3/+3
| | | | | If USB-Storage is mounted and available, search it for already archived movies. If found, play it.
* Delete emtpy seriesArno2015-03-211-0/+1
| | | | | Enable the delete option in ArchiveTree, but only allow delete when it has no children.
* Fixed and beefed up "Move to archive"Arno2015-03-211-0/+2
| | | | | | It crashed when used on directories, because naturally md5sum was empty. So recurse through directories, collect files and check if we have a DB- Entry. If so, move the files back to archive. If not, skip them.
* Implement gotoArchiveArno2015-02-141-0/+1
| | | | | | New context menu item for Filesystemwidget: select the seriespart when goto archive is triggered... Selecting the partId from ArchiveModel was deceptibly simple. Doom impending?
* Revamped MetadataWidgetArno2014-12-101-1/+0
| | | | | | | | Split it up into a small QTreeView and a QTextEdit for the comment. QTreeView and horizontal scrollbars don't seem to play nice together. Qt never displays the bar even if ElideText is set to none. So add a QToolTip for the Subject/Name, since it's most likely not displayed completely.
* Redesign of NewMovieWizardArno2014-12-071-2/+0
| | | | | | Make it possible to add parent files to files, so we can identify already downloaded files even if we reencoded them. Record the md5sum in a new table files_origin.
* Delete files from ArchiveArno2014-04-181-0/+1
| | | | Well, the title says it all. KILL THEM!
* Change "Add Covers..." to "Add files..."Arno2014-04-181-1/+1
| | | | Generalize the slot. Make it possible to add movies, too.
* Implement Drag and Drop in Movie ArchiveArno2014-04-101-0/+3
| | | | | | | | | | | | | | Well, this was actually a bit of a drag. You have read the docs very carefully to get it right. For one, don't construct the drag object in mousePressEvent if you also want a double click, otherwise you end up with very weird behavior. Same goes for the receiving end. Differentiate between dragEnterEvent and dragMoveEvent, otherwise you'll only be able to drop items if you hit the right row on entering. There are some artefacts during the drag, but I guess that's a Qt bug. Didn't bother to look into it.
* Create new, empty Seriespart by contect menuArno2014-04-071-0/+1
| | | | | Preparation for drag and drop. Also make it possible to delete Seriesparts without files.
* Delete SeriesPartArno2014-04-041-0/+2
| | | | | Make it possible to delete a SeriesPart. This may happen if eg. you download the same clip/movie with a better quality.
* Replace ArchiveModel::FileType with #defineArno2014-02-151-1/+0
| | | | | These constants are used all over the place and aren't really specific to ArchiveModel, so use the preprocessor.
* Add filter bar to MappingTreeWidgetArno2013-10-131-2/+0
| | | | | Move matchRecursive from ArchiveModel to SmTreeModel so we can use it here, too.
* Fix copy constructor of SmTreeItemArno2013-09-281-0/+1
| | | | | | | | Seems the copy constructor of SmTreeItem was botched. After copying a rootItem, some children wouldn't show up. I guess it has something to do with the QHash of the parents. Replace it with an explictit deep copy function where needed.
* Implement addCoversArno2013-09-211-0/+1
| | | | Add covers to an already archived movie.
* New sortOrder: FavoritesArno2013-08-111-1/+2
|
* Implement FavoritesArno2013-08-111-0/+2
| | | | | | Re-Implement mark as Favorites in new ArchiveView. Also, don't block when the Collector is running again and we're trying to update the view.
* Various BugfixesArno2013-08-101-1/+3
| | | | | | | | * cache: use qint64 consistently instead of quint64 once (typo, I guess) * sync cancelling of ArchiveCollector: wait for it and reset the cancel var * sync access to cache file with QMutex * don't set quality for pics
* Show only local filesArno2013-07-281-1/+2
| | | | Only show series with files on the hd.
* Cleanup closeEventArno2013-07-271-1/+1
| | | | | | | | | | Don't try to delete all the prepared statements manually. Get rid of the ~destructors and just close the QSqlDatabase. close() deletes all Statements. Also, quit() all QThreads on closeEvent() except CompleterProducer. When the experimental archive view gets merged, that QThread is gone. No need to bother...
* Fix window titleArno2013-07-271-0/+2
| | | | Set the main window title according to selected tab.
* Use new icon schemeArno2013-07-261-0/+3
| | | | | | | Use new icon configuration consistently in: * Filemanager * NewMovieWizard * Experimental view
* Dis/enable QActions for ContextMenuArno2013-07-121-1/+1
| | | | Handle actions dependent on type node.
* Make PartNo and Subtitle editableArno2013-07-121-0/+1
|
* Get rid of useless SimpleModel againArno2013-07-101-7/+0
| | | | | QStandardItemModel is much better than a poorly derived QStringListModel...
* Make experimental view editableArno2013-07-101-0/+10
| | | | | Create new dialogs for editing actors, genres and metadata. IMHO like this it's much clearer who does what. KISS!
* Show actors, genres and metadata when selecting a seriesArno2013-07-091-0/+11
| | | | We're getting there, slowly, but steadily :)
* Implement actions for ArchiveFileViewArno2013-07-071-1/+7
| | | | | * make files double-clickable * implement edit actions for files
* Lots of Display ChangesArno2013-07-061-2/+2
| | | | | | | | | * Save header states * Implement delegates for columns * unify size and duration to 1 column * colorize View ... and lots of other things I forgot :)
* Basic ArchiveFilesModel and ArchiveControllerArno2013-07-061-0/+20
| | | | | | | | | Implement a new file model for the archive. It's quite basic at this stage, but finally something happens when clicking the archive tree. Also, implement the interaction (signal -> slot) between the views and models in an explicit controller to prevent the mess from the old archive.
* Implement destructor for ArchiveModel, get rid of 2 signalsArno2013-06-281-2/+1
| | | | | | | | | | | We need a destructor for ArchiveModel, because we have to stop the collectors first. Otherwise there will be random crashes all over the place on exit when the Threads are destroyed while they're still running. Also, get rid of the signals collectorDone and collectorAboutToBeDone. The latter was unused, and the former can be replaced with QAbstractItemModel::modelReset.
* Fix behavior of view when refreshingArno2013-06-261-1/+4
| | | | | Cancel the collectors if they're still running. Otherwise we may get outdated results when refreshing the view after an update or delete.
* Fix random crashes in ArchiveCollectorArno2013-06-251-2/+1
| | | | | | | | | | | | This was a hard one, actually. Since we only returned a pointer from the ArchiveCollector, it worked _most_ of the time, but crashed at random when the view was reading the tree while the collector was updating it. So create a working copy constructor for SmRootItem and return a copy of the the tree when the collector is done. I bet that's also the reason for the random crashes in the filesystem view.
* Keep state of expanded itemsArno2013-06-231-0/+2
| | | | | Well, sounds easier as it is to keep track of expanded items, but finally I got it!
* 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.