summaryrefslogtreecommitdiffstats
path: root/seriestreemodel.cpp
Commit message (Collapse)AuthorAgeFilesLines
* SeriesTreeModel::findMoviesArno2010-06-181-0/+19
| | | | | Implemented function to return a QFileInfoList of only the movies for a given QModelIndex.
* Created frontend for SeriesTreeModel::deleteFromSeriesArno2010-06-181-0/+1
| | | | | | | | | | | Implemented frontend for SeriesTreeModel::deleteFromSeries. I hope QPersistentModelIndexes work as advertised. From the qt-sources it seems that a QPersistentModelIndex is automatically updated by QAbstractItemModel when calling begin(Remove|Insert)Rows. Testing worked out fine. While at it I found a bug in SmTreeModel. removeRows has to be called with (i - 1) instead of (i) to remove the correct nodes.
* Implemented SeriesTreeModel::deleteFromSeriesArno Moeller2010-06-181-0/+25
| | | | It compiles, let's ship it. Totally untested.
* Streamline SeriesTreeModel::findFilesArno Moeller2010-06-181-14/+14
| | | | | Avoid code duplication by handling the two different queries more generic so the result set can be fetched in just one while loop.
* SeriesTreeModel::findFilesArno2010-06-171-0/+32
| | | | | | Implemented SeriesTreeModel::findFiles in preparation for deleting files from SeriesTreeView. Totally untested, of course, and the new action in SheMov doesn't do anything.
* Finished New series in SeriesTreeWidgetArno2010-06-171-39/+81
| | | | | | | | Another not so atomic commit. Inserting a new serie by triggering the action in the context menu now works. While at it I revamped setData and put the if/elses into functions. Also fixed a bug in setData: Use TypeRole instead of the Fields enum.
* Partial implementation of adding new SeriesArno Moeller2010-06-171-1/+1
| | | | | | Adding an item to the TreeView works, but it doesn't get focus after inserting. Also the data is not shown. And setting the title of the new item should make the database puke.
* Bugfix in SeriesTreeModelArno Moeller2010-06-171-0/+3
| | | | | Return false from setData if new name == old name. This made the entries disappear from tree.
* GUI fixesArno Moeller2010-06-171-1/+1
| | | | | -Hide columns 1 - 5 in SeriesTreeWidget -Resort SeriesTreeWidget when SeriesName is changed
* Fixed SeriesTreeModelArno Moeller2010-06-171-4/+5
| | | | | There was no serious problem with the database schema. Maybe I should have gone to bed earlier. Updating and changing series names now works.
* Treemodel DevelopmentArno2010-06-161-0/+188
-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 :(