While the previous function technically worked, the connections
weren't setup properly. Also the row_count function wasn't running
because it requires a QModelIndex parameter. Added a simple count
function to make sure we know how many slides there are in QML.
This model, built in Rust, works in that functions are getting called
and the right pieces are mapped into the model. I've yet to connect
things up to see if QML is talking to the model just yet.
This commit finally has a working basic slide_obj implemented in Rust!
There are likely still some things that need to be tweaked and
massaged in order for things to translate back and forth from QML to
Rust.
The key was to make the old SlideObject written in C++ to act as a
bridge between QML and Rust. QML can't seem to understand CXX-QT's
QMap_QString_QVariant type as a QVariantMap and thus didn't translate
the Javascript object properly. Having the call first go into a C++
class translated it and then was trivial to pass into Rust.
This object is still unfinished, but it will later serve as our main
object to connect to for the slides that are shown on screen. All of
this needed some heavy tweaking and I still need to learn more about
rust, but the beginnings are there and it will be worth it to have the
safety and speed that rust provides
This command sets the keyboard focus to the presentation item which
controls when slides are changed. It ensures that after every action
you can use the arrow keys to switch the slides.
This was an attempt at forcing the layout of the ListView so that it
will adjust to model changes properly. It only sort of works. There
are still occasional overlapping items.
The loading item will show as things are dropped into the
listview. This makes sure the user sees a loading bit as things are
happening in the background to add the new serviceItem
This add looping primarily for videos but I've added in the groundwork
for looping through any kind of slide. This obviously will be
implemented differently for each type of slide, but this way the
groundwork is done already.