summaryrefslogtreecommitdiffstats
path: root/mappingtablemodel.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Use folderIcon in NewMovieWizardArno2011-01-091-0/+3
| | | | Also show the folderIcon in the NewMovieWizard QTreeViews.
* Added database maintenance codeArno2010-07-311-0/+44
| | | | | | Implemented a function in MappingTableModel to remove all actors/genres with no references in the according mapping table. Available through the "File" menu.
* Fix SQL errorsArno2010-07-291-0/+3
| | | | | | | | | | | While trying to find out why a newly added SeriesPart won't get selected programmatically, I discovered a not so serious SQL bug. MappingTableModel::addMapping happily tries to execute queries with an invalid seriesPartId. Return if seriesPartId = -1. Now all items expanded previously will be expanded after adding a new movie. (SeriesTreeWidgetT::seriesAdded). Unfortunately the original problem remains unsolved...
* Final version of NewMovieWizard::accept() (hopefully)Arno2010-07-091-12/+14
| | | | | | | | | | | | | | | | | Actually made this function work. Forgot to handle actors and genres. Also several bugfixes in other parts: -fix typo in FilesTreeModel query -commit changes ind MappingTableModel::addItem, making the genre and actor widgets work as intended -remove redundant MappingTableModel::find(), already implemented in SmTreeModel -call next() instead of exec() in SeriesTreeModel::addSeriesPart. Query is already executing if it's a select -use QModelIndex::row() instead of column() in MappingTableWidget::removeItem() -add partNo to layout in MovieInfopage::MovieInfoPage() -add convenience function setMappings() to MappingTableModel
* Actors and genre editArno2010-06-261-13/+39
| | | | | | | | | | | | | | | | | | 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.
* New model: MappingTableModelArno2010-06-251-0/+181
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 :)