This is kinda a broken commit. There isn't any order to the adding of
the slide anymore. So it'll need to find a way of keeping track of
where all the current slides are and then insert the new ones in the
correct order while moving the others around as well.
In order to make slide_object dumber and and not need to keep track of
slide info, we are moving the business logic to slide_model so that
the model can keep track of whether presentations are ready to switch
and don't need to run reveal_next or something.
QT6 Apparently means a lot of changes, these are the changes I've
found to make at least CPP build. The problem is we just got rid of a
lot of CPP and I don't know if the application will work. On the other
hand, the QML isn't finished yet either, but this is the start of
updating the application for QT6 and using MpvQt which is being built
and maintained by KDE. This will be better as they'll keep the library
updated for future QT updates so long as I still track with Kirigami.
This means we are loading and saving files with the rfd crate which
utilizes platform appropriate dialogs for saving and loading files. We
can start to use this in all other file dialog locations to make sure
we are getting the right files.
It uses xdg-desktop-portals on linux so we will always use the
appropriate file dialog for each desktop environment.
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.
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.
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.
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.