summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix MovieInfoPageArno2010-07-047-18/+112
| | | | | | | | | | | | | | | 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
* Started NewMovieWizard for adding moviesArno2010-07-025-2/+346
| | | | | | | | 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
* Implemented "open with" submenu in ArchiveTreeViewArno2010-07-024-8/+19
| | | | | | | | | Changes: -changed signature of ArchiveTreeView::playSelected() to take a QString argument for the preferred player -Bugfix in SeriesTreeModel::findSortedMovies: use SeriesId for mSortedMovieListQuery -SheMov: use mOpenWithMapperAV for mATree instead of deprecated mAVWidget
* Implemented playing a movie on doubleclickArno2010-06-268-0/+82
| | | | | | | | | | | | | 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.
* Actors and genre editArno2010-06-269-20/+313
| | | | | | | | | | | | | | | | | | Implemented widgets for actor and genre editing of movies. Created new MappingTableWidget for both genres and actors and revamped ArchiveTreeView to show 2 widgets below the FilesTreeView separated by a splitter. While testing the new setup several bugs were fixed: -an SQL syntax error in FilesTreeModel -fixed SmModelSingleton to properly work with table names I also changed the signature of MappingTableModel::addMapping for the ease of use and added MappingTableModel::removeMapping. MappingTableModel got 2 new convenience functions: 1. bool contains(QString) to check if an item is already present 2. QModelIndex find() to get the index of a specific value from the model.
* Update for migdb.pyArno2010-06-251-1/+1
| | | | | Pass the right var to Migrator::newEntry for the file nubmer. Before it passed the series part number as the file number to newEntry.
* New model: MappingTableModelArno2010-06-254-3/+261
| | | | | | | | | Implemented new Model for Mapping tables. This model is intended to replace the old ListModel and Singleton. MappingTableModel is derived from SmTreeModel and can be accessed using SmModelSingleton. It's quite dynamic building its queries, and has yet to be tested. Hopefully I got it right the first time :)
* Sorting for FilesTreeModelArno Moeller2010-06-254-6/+48
| | | | | | | | Implemented individual sorting for FilesTreeModel: 1. Don't compare the "Movies" and "Covers" nodes, keep the initial order. 2. Compare Size and DvdNo by int/longlong instead of comparing the displayed strings.
* Made FilesTreeWidget workArno2010-06-2410-50/+129
| | | | | | | | | | | | | | | | | | | | | | | | 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-236-12/+91
| | | | | Introduced filestreewidget, just like seriestreewidget. The connection is still missing, though.
* Singleton cleanupArno2010-06-2312-161/+96
| | | | | | | | | | 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.
* Started implementation of FilesTreeModelArno2010-06-203-2/+223
| | | | | | No visible representation yet. Implemented setData for quality and dvdno, but not tested yet. Dunno yet if anything else has to be editable.
* SeriesTreeModel::findMoviesArno2010-06-182-0/+20
| | | | | Implemented function to return a QFileInfoList of only the movies for a given QModelIndex.
* expand/collape actions for SeriesTreeWidgetArno2010-06-184-3/+29
| | | | Implemented expand and collapse actions for SeriesTreeWidget.
* read/write settings for SeriesTreeWidgetArno2010-06-183-0/+39
| | | | | SeriesTreeWidget now retains its last state regarding sort order and expanded items.
* Sort for SeriesTreeModel/ViewArno2010-06-182-2/+23
| | | | Sort Parts regarding to their part number.
* Created frontend for SeriesTreeModel::deleteFromSeriesArno2010-06-184-3/+59
| | | | | | | | | | | 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-185-1/+38
| | | | 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-174-0/+43
| | | | | | 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-173-41/+90
| | | | | | | | 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-178-8/+49
| | | | | | 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-174-4/+16
| | | | | -Hide columns 1 - 5 in SeriesTreeWidget -Resort SeriesTreeWidget when SeriesName is changed
* Fixed SeriesTreeModelArno Moeller2010-06-174-7/+13
| | | | | 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-1610-29/+288
| | | | | | | | | | -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 SeriesTreeWidgetArno2010-06-137-9/+115
| | | | | | | | | Implemented a widget for showing series in a tree. Also implemented filtering and sorting for this widget. Some bugfixes and enhancements: -Show dildo as DecorationRole in SeriesWidget -removed Quality from SeriesWidget
* Made ArchiveTreeView workArno2010-06-124-3/+11
| | | | | Made ArchiveTreeView work and took a look at it. Right now flat view seems to be the better alternative.
* Created basic ArchiveTreeViewArno2010-06-124-2/+71
| | | | | Implemented Widget for archive tree view. It's very basic and does nothing.
* Created singleton for SmUberModelArno2010-06-123-2/+46
| | | | Implemented a singleton for SmUberModel.
* Implemented SmUberModel::populateSeriesModelArno2010-06-122-0/+47
| | | | | | Implemented SmUberModel::populateSeriesModel(). Created a new QSqlDatabase with hardcoded access data for refactoring. This will change once the new schema is working.
* Implemented SmTreeModel::parentArno2010-06-122-1/+16
| | | | | Forgot to implement SmTreeModel::parent. Thus it was a pure abstract class and not instantiable.
* New database schemaArno2010-06-121-0/+213
| | | | | | | | Created a new database schema and implemented a migration script to migrate data from the old schema to the new one. The new schema is more "modular". Actors and files, including covers are assigned to series parts.
* Finished SmTreeModel, started SmUberModelArno2010-06-067-4/+216
| | | | | kinda finished the treemodel. Don't really know if it's complete yet. More programming will show :)
* Started Treemodel for ArchiveArno2010-06-035-2/+158
| | | | Implemented generic SmTreeItem, started on generic SmTreeModel.
* Bugfix: Data corruption in ArchiveItemInfoEditArno2010-05-301-1/+1
| | | | Allow more than 10 Dvds in dvd spinbox of ArchiveItemInfoEdit.
* Implemented copying of movie dataArno2010-05-307-1/+59
| | | | | Added function to copy actors, covers, genre, dvd and quality to other parts of the same movie if movie has multiple files.
* Bugfix: clear actors in ArchiveEditItemDialogArno2010-05-301-0/+1
| | | | | Clear actors when showing ArchiveEditItemDialog, otherwise they keep piling up :)
* Get rid of obsolete classesArno2010-05-299-529/+0
| | | | | Get rid of EditArchiveItemDialog and CoverArchiveEditor. The functionality of the classes is implemented in ArchiveItemEditDialog.
* Implemented ArchiveItemEditDialog::accept()Arno2010-05-293-3/+126
| | | | | | | | | Now the update button from ArchiveItemEditDialog actually updates something. The cover handling is much cleaner than in CoverArchiveEditor on first glance. This means I can get rid of CoverArchiveEditor and EditArchiveItemDialog at last.
* Implement new ArchiveItemEditDialogArno2010-05-2910-26/+159
| | | | | | | | | | | | | | | | Use ArchiveItemEditDialog instead of EditArchiveItemDialog. The latter will soon be obsolete and removed. Terrible naming, though. This commit is not as atomic as I want it to be, but it can't be helped. I had to fix several bugs in ArchveItemInfoEdit and ArchiveItemCoverEdit on the way: -Fix layout of ArchiveItemCoverEdit -Make white background of warning label in ArchiveItemCoverEdit work -Add function to ArchiveItemInfoEdit to init the ActorModel and FileInfoModel -Add function to ArchiveItemInfoEdit to return selected actors Beware: The update button still does nothing!
* Implemented ArchiveItemCoverEditArno2010-05-293-2/+272
| | | | | | Implemented Widget in preparation for the new ArchiveItemEditDialog. It's still quite convoluted, but I can't think of a better way to do this.
* Redesign of editing archive itemsArno2010-05-283-2/+251
| | | | | Added new widget to edit movies already in archive. ArchiveItemInfoEdit is designed to be part of a QTabWidget.
* Make directory browsing optional for PictureViewerArno2010-05-282-3/+8
| | | | | | Make directory browsing optional in preparation for new ArchiveItemEditDialog. There will be a button to view the selected picture, but it needn't be able to browse the directory of the picture.
* Bugfix: set Margins of CoverEditor to 0Arno2010-05-281-0/+1
| | | | | Set margins for mainlayout of Covereditor to 0, otherwise the layout of a widget embedding the covereditor gets cluttered.
* Bugfix for commit 8827510ec55eda169340b5414bd60eb3ba3bfb79 et al.Arno2010-05-242-5/+6
| | | | | | Remove duplicate QLabels in ArchiveEditDialog after given commit. Also readd ListModel to genre QComboBox in the dialog. Seems I deleted a little to much.
* Close PictureViewer on exitArno2010-05-242-0/+3
| | | | Close PictureViewer window when exiting SheMov.
* Save PictureViewer positionArno2010-05-241-0/+3
| | | | Save and restore PictureViewer position on exit and startup.
* Implemented PictureViewer classArno2010-05-249-10/+317
| | | | | | | Don't call an external program for showing a picture. When an image is doubleclicked a new windows shows the picture. Pictures can still be opened in an exteral program by using the "Open with..." context menu item.
* Added cover page to AddMovieWizardArno2010-05-233-39/+106
| | | | Finished AddMovieWizard. Added one last page to add covers to movie.