Want to figure out if I can inject html2canvas to capture a screenshot
of the webengineview offscreen and thus generate thumbnails of the
different slides in a RevealJS presentation.
This required switching from a QML Window to a QQuickView in C++. I
want to try to eventually subclass that in Rust, but for now it works.
I'll have to still tinker with this to find out how to specifically
set the screen in certain environments, but for now the user will need
to move the window on their own.
The basic functions are all working properly. Now the model works by
using diesel to connect the sql database and retrieve all the items
and organize them. Then it'll ensure any additions and deletions are
correct and happen first on the database before adding them to the
model.
There is still a C++ proxyModel inbetween QML and Rust, but
this proxyModel interfaces with the Rust model instead of the C++
SqlTableModel.
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 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 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.