| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
Handle actions dependent on type node.
|
| |
|
| |
|
|
|
|
|
| |
Use MetadataEditorWidget in NewMovieWizard and test it. Works perfectly
in NewMovieWizard and MetadataEditor.
|
|
|
|
|
| |
Again, split the editor into a widget and a dialog, so we can use the
widget in NewMovieWizard.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Split MappingEditor into a Dialog and the actual MappingEditorWidget.
Turns out that we need the Widget in NewMovieWizard, also. No need for
code duplication.
NB: Before this I tried to convert the WizardTreeModel to a
QStandardItemModel, but it had severe performance problems. Most likely
I would have ended up subclassing QStandardItemModel anyway, so leave it
as it is.
|
| |
|
|
|
|
|
| |
QStandardItemModel is much better than a poorly derived
QStringListModel...
|
|
|
|
|
| |
Create new dialogs for editing actors, genres and metadata. IMHO like
this it's much clearer who does what. KISS!
|
| |
|
|
|
|
| |
We're getting there, slowly, but steadily :)
|
|
|
|
|
|
|
| |
Finally! Return a copy of the file tree instead of the working item!
Hopefully this fixes a lot of crashes.
Threading is a bitch...
|
|
|
|
|
|
|
|
|
|
| |
Well, this is a huge commit. Should be severals, but who knew...
First and foremost feature: Make NewMovieWizard work with the
experimental model. This change obsoleted a lot of code. Also, the old
archive won't work with with the new Wizward...
There are most probably many other features I forgot about.
|
|
|
|
| |
Well, select DISTINCT :)
|
|
|
|
|
| |
* make files double-clickable
* implement edit actions for files
|
|
|
|
|
|
|
|
|
| |
* Save header states
* Implement delegates for columns
* unify size and duration to 1 column
* colorize View
... and lots of other things I forgot :)
|
|
|
|
|
|
|
|
|
| |
Implement a new file model for the archive. It's quite basic at this
stage, but finally something happens when clicking the archive tree.
Also, implement the interaction (signal -> slot) between the views and
models in an explicit controller to prevent the mess from the old
archive.
|
|
|
|
|
|
|
|
|
|
|
| |
We need a destructor for ArchiveModel, because we have to stop the
collectors first. Otherwise there will be random crashes all over the
place on exit when the Threads are destroyed while they're still
running.
Also, get rid of the signals collectorDone and collectorAboutToBeDone.
The latter was unused, and the former can be replaced with
QAbstractItemModel::modelReset.
|
|
|
|
|
| |
* make it sortable
* change the header when changing the sort order
|
|
|
|
|
| |
Cancel the collectors if they're still running. Otherwise we may get
outdated results when refreshing the view after an update or delete.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was a hard one, actually. Since we only returned a pointer from the
ArchiveCollector, it worked _most_ of the time, but crashed at random
when the view was reading the tree while the collector was updating it.
So create a working copy constructor for SmRootItem and return a copy of
the the tree when the collector is done.
I bet that's also the reason for the random crashes in the filesystem
view.
|
|
|
|
|
| |
Well, sounds easier as it is to keep track of expanded items, but
finally I got it!
|
|
|
|
|
| |
Read the cache if there is one, if not, read it in another thread and
update the view when it's done.
|
|
|
|
|
|
|
| |
This should be 2 commits, really...
Fix: write cache after renaming an item
Protect: protect the accessors of ArchiveCollector with Mutexes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Create a caches of database archive views. Esp. gathering data for
actors takes a long time, and I don't see how to optimize the queries.
So write them to a QDataStream. It was much more difficult that it
sounds. Once again I was lost in recursion. Did I mention that I hate
recursion?
The solution:
When writing use the address of the SMTreeItem cast to qint64 as unique
key. On reading build a hash with the address as key and use it to find
the parent of the next item.
I hope that makes sense...
|
|
|
|
|
| |
Child items of RootItem were initialized with 9 columns instead of 8 in
ArchiveModel. Loose the stray QVariant()
|
|
|
|
|
|
|
|
|
|
|
| |
Well, well... Recursion isn't that bad at all. Filter experimental
ArchiveView recursive by the following rules:
* check children _and_ parents for filter
* if any child _or_ parent matches, accept the current row, parents and
children.
The column is converted to a QString and matched by QRegExp, so don't
try to match numbers or anything else.
|
|
|
|
|
| |
Implement remove nodes for ArchiveView. Only empty nodes without
children can be removed. Everything else is too dangerous :)
|
|
|
|
|
|
|
| |
While thinking about merging items, I realized that it is not necessary.
Just edit the mappings instead.
However, a fallout is an error function for the TreeView.
|
|
|
|
| |
Rename items: spits out an error message if the new item already exists.
|
|
|
|
|
| |
For the current SortOrder the expanded items are written to the config
file and read on startup.
|
|
|
|
|
| |
Fetching data sometimes takes a long time, so do it in a QThread and
show a progress dialog. Some kludges included :)
|
|
|
|
|
|
|
| |
Filter by QRegExp, but only on the first level according to the sort
order. All items are expanded when filtered.
Also, remember the filter and the sort order when exiting.
|
|
|
|
|
| |
Don't delete threads and stuff in destructors. It leads to SIGARBRT when
debugging. Now we get a warning on close, but who cares?
|
|
|
|
|
|
|
|
|
| |
Actually do something when the sort order is changed. That resulted in
various fixes to both model and view, since both had completely untested
codepaths.
Most notable fix: Only select those seriesparts which are actually
mapped to the selected genre or actor.
|
|
|
|
|
|
| |
* Show childcount
* Show subtitle or part no
* Resize Widget properly
|
|
|
|
| |
Display the new ArchiveModel in an experimental tab
|
| |
|
|
|
|
|
|
|
|
| |
The new ArchiveModel allows sorting and display by the series name,
actors and genres. Hopefully it's generic enough to easily add other
sort orders like file location or file type.
For now, it's just there. Not included anywhere. No view, no nothing.
|
|
|
|
| |
Also align VCenter in filesystemfileproxy
|
|
|
|
| |
Don't use scientific notation. Just qRound() the value.
|
|
|
|
| |
Also align columns vertically when Qt:AlignRight is in effect.
|
|
|
|
|
|
| |
SheMov crashed in MappingEditWidget::removeMapping, maybe because of
some race. So turn the selected QModelIndex into a PersistentModelIndex
and check for validity before removing the row...
|
|
|
|
|
|
| |
Renaming/Editing of an item didn't work, because database restrictions
hadn't been taken into account. tdescription_name is unique, so update
the description_id if it already exists.
|
|
|
|
|
|
|
|
|
|
| |
Get rid of the cache file. Instead, generate the cache on startup. The
cache was never written since it was turned into a thread. Because of
that I wrote a cleanup function, but surprisingly it didn't have much
impact on the startup time, so I dropped the cache file.
Also, fix destructor of SmGlobals. Call deleteLater on all Q_OBJECTS,
and of course, some header cleanup.
|
|
|
|
|
|
|
| |
Check for valid QModelIndex in dirEvent. It could very well be possible
that we get an invalid index from find(), especially when deleting or
modifying files. Maybe this fixes some unexplained crashes I wasn't able
to reproduce...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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...
|
|
|
|
|
|
| |
Don't call refresh on model after setting the dvd no for an index. Then
the selection is lost and the other selected indexes won't be updated.
Call refresh from the view after updating all indexes instead.
|
|
|
|
|
| |
Add a configuration option for checking the database when browsing the
filesystem.
|