| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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...
|
|
|
|
|
|
|
|
| |
* 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 :)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move mappings by context menu. Select new parent by QComboBox with
available paths, items separated by "/". Note that hell will break loose
if a mapping name contains "/". Will be fixed later.
Since mapping views don't have setSortingEnabled(), make
SmTreeModel::addRow() sort items.
This fixes a long standing bug in SmTreeModel::reparent(): Since it
alters the model, newParent has to be a QPersistentModelIndex to stay
consistent.
|
|
|
|
|
|
| |
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 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Implemented 2 new pages for NewMovieWizard: actors and genres.
|
|
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.
|