summaryrefslogtreecommitdiffstats
path: root/seriestreemodel.h
Commit message (Collapse)AuthorAgeFilesLines
* Implemented extended filtersArno2010-08-011-0/+8
| | | | | | | | | | | | | | Extended the filter function in SeriesTreeWidget. By passing an operator to the filter dialog series can be filtered. The code generates highly dynamic SQL queries. I hope I didn't introduce possible SQL injections. Filter operators: g: genre a: actor q: quality n: filename d: dvd no s: size
* Preparation for new move to burn implementationArno2010-07-171-0/+3
| | | | | | Show size of selected items in status bar when files are selected in the FileView. Also show series name of current selected file in the general status bar.
* Preparations for NewMovieWizard::acceptArno2010-07-081-1/+4
| | | | | | | -new memfunc: SeriesTreeModel::addSeries -new memfunc: SeriesTreeModel::addSeriesPart started FilesTreeModel::addFile, not finished yet.
* Fix MovieInfoPageArno2010-07-041-0/+2
| | | | | | | | | | | | | | | The first page of NewMovieWizard gave me quite a headache. It crashed with a segmentation fault because of exposing mDvdNo via registerField() without actually assigning a QCheckBox to it. The backtrace isn't very helpful in such a case. I also fixed some bugs on the way: 1. use SmTreeItem::setData in SmTreeModel::addRow instead of deleting the old item and creating a new one. This way I don't need to take care of the parent. 2. get data of old item in SmTreeModel::reparent before calling removeRows. This call deletes the item. 3. Fix column alignments in WizardTreeModel for size column
* Implemented playing a movie on doubleclickArno2010-06-261-0/+2
| | | | | | | | | | | | | Movie files are played in the default player when double clicking on a movie, but not when doubleclicking on a series. The latter invokes the edit event on the series. Don't yet know if this is a good thing or not. Changes on the way there: 1. new helper function for finding the right player. Still need to fix FileSystemWidget to also use the Helper::function. It's a simple copy & paste from there. 2. added function SeriesTreeModel::findSortedMovies. It returns a QFileInfoList sorted by seriespart and fileno.
* Made FilesTreeWidget workArno2010-06-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | It wasn't as easy as I thought. Quite big changes: 1. I changed the query for setIds in FilesTreeModel. Initially it executed a database query for every id. Changed it to WHERE seriespart_id IN (ids). I didn't have a chance to test the first version, but this one is blazing fast. 2. Fixed a recursio ad infinitum in FilesTreeModel. This happens if you call data() from data(). Either use the *item or use a role different from what you've been called. 3. Introduce a new function in SeriesTreeModel: QList<QVariant> childrenColumnList. It returns a QList from the children values of the given column. 4. Lot's of UI changes. Hide unneded columns, align the remaining ones properly. What doesn't work: we can't let the database do the sorting of files. We need a proxy for this.
* Start making FilesView workArno2010-06-231-3/+1
| | | | | Introduced filestreewidget, just like seriestreewidget. The connection is still missing, though.
* Singleton cleanupArno2010-06-231-0/+3
| | | | | | | | | | The SmUberModel class wasn't needed at all, so I removed it. Instead I renamed SmUmberModelSingleton into a real singleton for all QAbstractItemModel*, though right now it only supports the SeriesTreeModel and FileTreeModel. But it should eventually evolve into a singleton for all QAbstractItemModel *. For this I renamed the class SmUberModelSingleton to SmModelSingleton.
* SeriesTreeModel::findMoviesArno2010-06-181-0/+1
| | | | | Implemented function to return a QFileInfoList of only the movies for a given QModelIndex.
* Implemented SeriesTreeModel::deleteFromSeriesArno Moeller2010-06-181-1/+2
| | | | It compiles, let's ship it. Totally untested.
* SeriesTreeModel::findFilesArno2010-06-171-0/+7
| | | | | | 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-0/+4
| | | | | | | | 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.
* GUI fixesArno Moeller2010-06-171-0/+3
| | | | | -Hide columns 1 - 5 in SeriesTreeWidget -Resort SeriesTreeWidget when SeriesName is changed
* Treemodel DevelopmentArno2010-06-161-0/+43
-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 :(