summaryrefslogtreecommitdiffstats
path: root/mappingtablewidget.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Make it run with Qt6Arno2022-04-151-1/+1
| | | | | | | | | This is a huge commit. Changes: * Obviously, make it compile * Make it run (only scarcely tested) * get rid of most of clang's warnings Let's see what surprises are in store...
* Bring mappingtablewidget.cpp into the 21st centuryArno2018-11-231-12/+12
| | | | Use type-safe connects and weed out foreach.
* Simplify icon managementArno2013-07-271-3/+1
| | | | Introduce SmGlobals::iconFor to retrieve the configured item.
* Fix setAlternatignRowColorsArno2013-04-101-6/+2
| | | | | | | | | | | | | | | | | | | | Well, what started as a try to simplify QTreeView ended in a mass header murder... What happened: * I searched for a way to let every QTreeView honor the setAlternatingRowcolors() setting. Unfortunately it isn't enough to just set the global palette and set it to true. So every QTreeView is now derived from SmTreeView * SmTreeView registers itself with SmGlobals, so the property is set _after_ it's constructed. It's definitely not enough to call it in the constructor. I guess that's a bug. But it's enough to append the SmTreeView to a QList<QWidget*> in SmGlobals and call it _after_ the painting is done. * As an added Bonus we can add virt. funcs to every SmTreeView at will While at it I realized that most of the included headers were void, so remove them. No idea what impact it has on the bin size...
* Fix ColorsArno2013-03-171-0/+1
| | | | | | | This is more a qt5-fix than a SmDirModel fix. The global palette doesn't propagate any more, so we have to set the palette in every QTreeView separately. Very annoying and tedious. Maybe I missed a Widget or two, dunno...
* Fix iconArno2013-03-051-1/+1
| | | | Miss-spelled foldericon (folderIcon) in mappingtablewidget.cpp model.
* Port to Qt5Arno2013-03-031-8/+8
| | | | | | | | * Change #include to qt5 * Fix missing QX11Info * use explicit constructor for QVariant(QColor) * use beginResetModel() and endResetModel() instead of reset(). The latter was removed. Hopefully it still works :)
* Center Dialogs on screenArno2011-08-171-1/+1
| | | | | | Since I'm now using a tiling window manager dialogs have to center themselves on the screen. Otherwise they end up at QPoint(0,0). Not very nice. Subclassed QDialog to SmDialog and converted all dialogs.
* Added partial search for MappingTableModelArno2011-07-011-0/+50
| | | | | | Added a search button to NewMovieWizard to do partial searches on the according table. Selected items will be inserted into the QLineEdit of the Wizard page.
* Use folderIcon in NewMovieWizardArno2011-01-091-1/+6
| | | | Also show the folderIcon in the NewMovieWizard QTreeViews.
* Made all icons in qresource available for UIArno2010-12-271-1/+1
| | | | | | | | | | | | | | | | 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.
* Made colors configurableArno2010-12-261-0/+1
| | | | | | | | | Added a tab to ConfigurationDialog to make some colors configurable. It works somehow. The font color isn't evaluated yet, since I'm not convinced that it is a good idea. But one problem is that calling qApp->setPalette() doesn't propagate to non visible child dialogs. Dunno if it's worth fixing.
* Fixed various bugs in NewMovieWizardArno2010-08-171-3/+2
| | | | | | | | | | | | | | | | | SmTreeModel had a serious bug: SmTreeItem would accept rows > mChildren.count() in SmTreeItem::child(int row). Do some sanity checks. This only happened when trying to edit the type of the last file in NewMovieWizard::MovieInfoPage, strangely enough. But this should fix it. While working on the Wizard I tried to figure out why mItemEdit->clear only sometimes worked. I guess it's because mItemEdit and the QCompleter were connected to the same QKeyEvent, the latter winning and doing the completion. "Fixed" this by removing the connection to the returnPressed() slot of mItemEdit and giving the "Add Item" button a shortcut. Don't really know if this is more annoying than pressing CTRL- Also fixed a small logic error in MappingTableItemModel::lowerBound(). Revert the logic if the sort order should be ascending.
* Act on doubleClick in FileTreeWidgetArno2010-07-241-2/+2
| | | | | | | | | | | | | When doubleclicking a picture in FileTreeWidget the pictureViewer is shown. Doubleclicking a movie file launches the default movie player. Since PictureViewer is now used in FileSystemWidget and ArchiveTreeView a global instance is needed. The appropriate place for this is a singleton. Since we already had a singleton for QAbstractItemModels I renamed it to SmGlobals and added a function to return a PictureViewer object. Renaming it was quite easy thanks to QtCreator's ability to rename variable names.
* Final version of NewMovieWizard::accept() (hopefully)Arno2010-07-091-1/+2
| | | | | | | | | | | | | | | | | 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-0/+146
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.