Videos, images, and presentations were all look at the wrong index. I
needed to look for the count - 1 in order to find the right index from
the model when switching to the editMode
If each model is registered as a QML type, we can pass the model back
to QML from each proxy model to have more direct access to it. This
enables us to use it's functions and properties better.
I have gotten reveal.js presentations to be viewable. I'll still need
to work with how to present them, and fix the presenter piece as well,
but for now, it works.
Since the rust implementation happens on insertion of slides and
creates a property for it, it's better as we won't need to create it
on the fly. Now we'll just need to move it into a background thread so
things will load while ffmpeg creates thumbnails for us.
We still need to handle all errors and possibly handle edge cases of
playlists and non urls better. The UI needs a lot of work too, but
this is a good start of the feature.
Since songs had more than one slide, anything inserted after the first
multi-slide item would break the insertion. ServiceItem indexes are
not the same as the slide indexes so we needed to find the right
index, then properly change the other indexes in the right spot.
I think I've done this by using rust iterators better.
Apparently there is a bug in the way these functions are called from
QML so we aren't getting the count of items in the library. All other
functions seem to be working but not this, so I tried a property and
the same situation...
In order to make start and end time setting far more efficient, I
decided to create my own RangeSlider called RangedSlider. This has a
moved signal for each handle and a released signal for each
handle. This allows us to change the video playback but not set the
value until released. Meaning only one access to the database.