summaryrefslogtreecommitdiffstats
path: root/smtreemodel.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Turn metadata display into a QTreeViewArno2011-07-081-1/+1
| | | | | | | This wasn't as easy as it sounds. I had to completely redesign the SeriesMetadataModel. Now it's a hybrid between a ListModel and a TreeModel. The actual data is held in a QList<QVariant>, the tree is only for display.
* Update IsLocal when setting DVD no.Arno2011-05-221-6/+20
| | | | | | The field IsLocal in the SeriesTreeModel is now properly updated when the DVD no. changes. It still doesn't propagate to the file view, though.
* Made all icons in qresource available for UIArno2010-12-271-1/+7
| | | | | | | | | | | | | | | | Every registered icon can be chosen as Qt::DecorationRole for all models at once. Suitable icons must be added to SmGlobals::mIcons. Key is a descriptive text, value is the icon path. To make things easier SmTreeModel got two new member functions: -QIcon decorationIcon() returning the current Icon -void setDecorationIcon() to set the current Icon The current Icon is initialized in the constructor from QSettings - ui/iconfolder To update the TreeViews connected to the FileSystemModel a little hack is needed: Just set the QFileIconProvider again. This causes the Model to update connected views.
* Selectable columns in FilesTreeViewArno2010-12-051-0/+7
| | | | | | | | | Made columns shown in FilesTreeView selectable. Also, the order of columns is saved and restored. This was a difficult one. I even had to make a debug build of qt. But I fixed a serious bug in FilesTreeModel::modeName: don't access the Hash if modeName == -1.
* Final version of NewMovieWizard::accept() (hopefully)Arno2010-07-091-1/+0
| | | | | | | | | | | | | | | | | 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
* Fix MovieInfoPageArno2010-07-041-5/+5
| | | | | | | | | | | | | | | 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-021-0/+35
| | | | | | | | 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
* Created frontend for SeriesTreeModel::deleteFromSeriesArno2010-06-181-1/+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.
* 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.
* Treemodel DevelopmentArno2010-06-161-0/+8
| | | | | | | | | | -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-131-1/+8
| | | | | | | | | 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
* Implemented SmTreeModel::parentArno2010-06-121-0/+14
| | | | | Forgot to implement SmTreeModel::parent. Thus it was a pure abstract class and not instantiable.
* Finished SmTreeModel, started SmUberModelArno2010-06-061-0/+144
| | | | | kinda finished the treemodel. Don't really know if it's complete yet. More programming will show :)
* Started Treemodel for ArchiveArno2010-06-031-0/+18
Implemented generic SmTreeItem, started on generic SmTreeModel.