41 KiB
Todo List
- Tasks
[63%]
[55/87]
- REWRITE FOR ALL RUST AND BUILD WITH CARGO
- Plugin architecture with steel or some scheme as an extension language
- Server client architecture
- Organize and layout structure of rust code
- Consider converting diesel to raw sqlx instead
- start and end times for videos
- Fix updating things in the song editor
- Refactor service_item_model.rs and slide_model.rs
- Create a song_lyrics searching and importer for the song_editor
- Create an emacs interface
- Possibly add better handling of data through enums
- Add a way to interact with OBS
- Find segfault in webengine
- write a function for setting each slide to the appropriate index in html presentations
- Build a slide_editor.rs
- Need to use a better logging systems so things stop getting confusingly lost
- Figure out qml hot reload
- Switch to using rust only deletion functions.
- Start planning out what a 1.0 release would look like and decide how to get there
- REFACTORING THE BACKEND
- What is out
- What is In
- Major Bugs
- Fix inserting items from service bugs
- need to finish figuring out proper removal of slides
- There is still a bug in inserting items to the service list. The listview starts to stack items ontop of each other.
- Multi Select and Delete
- Items in library with missing videos or images don't show any helpful UI.
- Now there are bugs related to switch the slideModel in C++ to slide_model in Rust.
- slide_model.rs doesn't move slides right yet
- Song Model
- serivce_item_model
- Deployment
- A busy indicator while deleting library items
- find song on SongSelect or perhaps Genius Lyrics
- Create a setting for holding static slides and audios :feature: /chris/lumina/src/branch/master/~/dev/church-presenter/src/qml/presenter/Settings.qml
- ffmpeg.rs
- ytdl.rs
- UI Blocks while saving
- give images an aspect ratio option
- Fix ImageEditor to make more sense for images
- Add image slideshow with looping
- Add image gallery options
- Finish toolbar in presentation display
- WAIT Make toolbar functional for
songeditor
[3/4]
[75%]
- WAIT nix-shell needs a little bit of work perhaps yet. But may be working under plasma just not minimal window managers using qt5ct.
- Fix using arrows shows the right slide, but the slide preview list doesn't follow it
- Updating properties in models.
[0/0]
[0%]
- new_song method
- Figure out how to nest qobjects
- Make things not rely on my own machine.
- Make Presentation Window follow the presenter component
- RENAME TO LUMINA
- presentations need to know their index of individual slides and count
- Saving needs to be asynchronous
- Fix switching songs in editor not showing the right lyrics
- Mouse needs to have resize shape when hovering controls
- Adding move row to service list
- Port to CXX-QT 6.0
[0%]
[0/0]
- Write a function to handle switching to the next fragment in revealjs
- Rename SlideEditor.qml to SongEditorSlideList.qml
- Make saving file auto use the last save file and go from there
- When updating background, it isn't changed in the list
- Need to test on other wayland compositors but Hyprland doesn't show the presentation window.
- Database doesn't exist we crash
- get_lyric_list method
- Add video repeat pieces
- Make libraries and models aware of being selected.
- Library and ServiceList scrollbar is in the way
- bug in dragging servicelist items to reorder. Maybe I can fix with me simplified model system
- Check for edge cases in inputing wrong vorder and lyrics
- Fix possible bug in arrangingItems in draghandler
[1/3]
[33%]
- Build out a slide preview system so we can see each slide in the song or image slideshow
- Make serviceItemModel aware of being selected and active
- ServiceItemModel load needs to first look for on disk path and then the archive path
- Unload video when switching to something with just image
- Create a nextslide function to be used after the end of the list of slides
- To finish the UX of which item is active, the Presentation needs to switch to the active slide in the preview system.
- Images stored in sql need to have aspect saved and applied dynamically here
- VideoSQL Model and SQLite system needs fixing
- Add ability to use arrow keys to move through slides
- Make sure the video gets changed in a proper manner to not have left over video showing from previous items
- Add an audio file to the song so that it will play when the song is presented
- Make the hover effect of dragging items over the servicelist show in the correct spot at all times.
- add a dropping area in the library
- images and videos need a better get system
- Bug in mpv race condition with selecting with the presenter but not with the actual PresentationWindow.
- Find a way to maths the textsize
- Fix bug in not removing old slides in the SongEditor when switching songs from the Library
- Need to make
getLyricList
give back the verses with empty lines as separate slides - bug in changing slides with the arrows
- Fix broken append when importing River song
- implement previousSlide and previousAction
- Need to make ListModel capable of bringing in a string list
[2/2]
[100%]
- Make an image sql model
- Parse Lyrics to create a list of strings for slides
- BUG in dropping and then selecting song will duplicate entries
- Make nextSlideText a nextAction function to incorporate other types of items
- Fix file dialog using basic QT theme
- Delete temp folder
- Update the last save file
- Thoughts
Tasks [63%]
[55/87]
TODO [A] REWRITE FOR ALL RUST AND BUILD WITH CARGO
TODO [A] Plugin architecture with steel or some scheme as an extension language
TODO [A] Server client architecture
TODO [A] Organize and layout structure of rust code maintenance
Since building a lot of the rust code felt more like an experiment, I've not kept it very well organized. I need to go through each model and rust module and organize them well and then decide what needs to be publicly available or not.
One major way to work on this is to pass less items back to rust and just their indexes instead. This leads to knowing which item and letting rust find the item. Another solution is to allow qml to pass a QVariantMap to rust when adding items, and loop through the map to find all matches and build the item.
Better types
modified src/rust/service_item_model.rs
@@ -314,10 +314,18 @@ use self::service_item_model::{
use super::service_item_model::service_item_model::ServiceItemModel;
+#[derive(Clone, Debug)]
+pub enum ItemType {
+ Song,
+ Video,
+ Image,
+ Presentation,
+}
+
#[derive(Clone, Debug)]
pub struct ServiceItem {
name: QString,
- ty: QString,
+ ty: ItemType,
audio: QString,
background: QString,
background_type: QString,
This represents an example of what it'd look like to add better types. If I can ensure to model things better I could leave out all the extra pieces in the ServiceItem struct and the Slide struct and include an ItemType. This would then let me jump to the appropriate db and get the right info for each item.
I've got SlideType enums working
Move logic of changing slides to slide_model
Since the slide_object is merely supposed to be the view of the current slide, deciding which slide to switch to should be entirely on the slide_model, not the slide_object. This way slide_object doesn't need to know anything about the which slide is next and instead have a function to update everything to the slide returned from slide_model's new slide.
Move all big logic to library crate for using rust data types better
I've started to move all the real logic to a pure rust library that can be consumed and used by the cxx-qt rust parts in QML. This could also pave the way to using any other rust gui instead of QML in the future.
TODO [A] Consider converting diesel to raw sqlx instead
From what I can gather, sometimes an orm is just too hard to work around rather than doing raw sql queries. The only issue is that my queries have been rather small. I only really need to select everything into the app and then run it from there. However, it could still be a consideration as things age. Perhaps when there are hundreds or even thousands of items in the database, it'll be more effective to use something like SQLx.
Progress is moving on this. SQLx works for the song model already, I'll just copy the kind of work over to the others.
TODO [B] start and end times for videos feature
This is something I couldn't get right in my head and plans and I hope rust will help me to solve it.
I've got a sorta working concept. It hinges on MPV's –start and –end properties. We'll use this to make sure the video has the right settings. But, when switching to another video, we'll need to reset it.
It does reset, but doesn't if the video we are switching to is the same video, but different start and end times. This could be problematic if the user wanted to have two sections of the same video loaded. For say a teaching moment or something like that.
TODO [B] Fix updating things in the song editor
/chris/lumina/src/branch/master/~/dev/lumina/src/qml/presenter/SongEditor.qml::function%20updateLyrics%28lyrics%29%20%7B The core problem with this is that when we set the song, the index to get the item is the index of the item in the vector, not the ID in the DB. So, when we get a song, we can't use that index to update things, we need to make sure we are using the id so that all the new work in updating the right item is done correctly.
TODO Find all references to the ID and make sure to be passing around the db id instead of the one found in the index to make sure we are finding the right song for every operation
The problem was compounded in that we are getting the ID through the proxy model too, which is different from the model index in rust. By setting the songID to the id found within the returned song, the rust model will have the same id meaning when we use that id, we are using the right one. Need to maybe find a way to ensure we are always passing around the id in the db so that we aren't using the wrong one anywhere.
DONE Seems that updating songs aren't reflected well
DONE I need to test to make sure I've fixed this.
Sometimes it seemed that things would update, other times it would seem that after jumping to present view and then back that things wouldn't be updated.
TODO Refactor service_item_model.rs and slide_model.rs
I've been thinking about my design of the service item model and slide model classes and believe I've used way too many properties for these models than is necessary. Instead I would really only need to have the title, type, and ids of the various items in the other models, then find a way to look them up when requesting them for the slide_object.
In doing this, I think I've started to come up with a basic design.
Since I haven't gotten nested objects to work just yet, I think what I might do is move more connections into QML. This way I can run a basic javascript wrapper around the signal and slots connections to make sure I'm getting the correct info from the correct places.
Basically a workflow could look like this.
Add an item from the library to the servicelist. This will add the item in either by inserting or appending. Inserting uses the proper index, and insterts only the name, type, background(a generated one that is either from ffmpeg or the actual bg), and id within the corresponding model for that type of content.
This will call the itemInserted signal which will connect to the slideModels' insertItem slot. This slot is essentially the same as the serviceItem, except it'll only track the name, type, id within corresponding model, and index of the current item of the service item. This enables us to make sure that each serviceItem can hold multiple slides still, especially for songs.
Then when we want to load that into the slideObject, we simply grab the item from the slideModel, find the item in the corresponding types model, then use the index from the slideModel to make sure we are using the right item.
To display all the slides…
Actually as I type this out, I'm starting to think that the slide_model still needs all the metadata that the slide_object will have. The reason being that I'd like to have details in the slide preview system that can only come from having all the info available to QML. This makes the QML preview system a lot easier to reason with because you can use property binding rather than needing to create a custom building system for each arbitrary detail we want to add the to the previews. All that said, what properties does the slide_object and slide_model really need then? Is there a way for the model to have fewer props?
NO I've reconsidered this again and instead I'll have each slide when added somehow generate a background that can be used. Either from the actual background or ffmpeg, or some way of grabbing something. This can render in the slide to show a preview. That'd be the only addition needed. Perhaps another would be to add something like in Proclaim where we have an abbreviation for the verse type in the preview of songs, but that's not a super necessary item just yet.
TODO Create a song_lyrics searching and importer for the song_editor
This file will hold all the functions and facilities to search for songs through Genius lyrics and import the lyrics into the app.
TODO Create an emacs interface
For me, building lumina presentations through the ui is cumbersome. I'd like to improve it but honestly, it works great for the normal person use case, maybe for now as I get more of it matured. I'll consider developing an emacs interface and connect it. Maybe even develop a server/client architecture so that I can build presentations quickly through a myriad of ways too.
TODO Possibly add better handling of data through enums
I've done a sample of this in the image_model.rs file. But, I essentially want to make sure I can ask that each piece of data is associated with an enum so that I am ensuring to protect myself. Now that I think about it more though, I'm not 100% sure why or what to do it with, so I need a clear reason before just "It's more rust-like!!!"
Here is an example
impl FromStr for Role {
type Err = ();
fn from_str(input: &str) -> Result<Role, Self::Err> {
match input {
"id" => Ok(Role::IdRole),
"title" => Ok(Role::TitleRole),
"path" => Ok(Role::PathRole),
_ => Err(()),
}
}
}
Apparently this doesn't work with cxx_qt right now….
And I think it's been improved by allow Q_ENUMs to be made. So, perhaps I'll figure out how to register those enums to QML and can pass them back into the rust side to stop using so many random ints.
TODO Add a way to interact with OBS feature
The basic implementation is done. In order to make use of it in the odd broken QT way, i needed to implement clone on my stuct, but it worked out.
DONE OBWS
DONE Need to create a way to track the obs scenes. Then render them as a model.
Once the model of OBS scenes is created, we can select a scene to add it to the service item. Then hopefully activate will take that scene and set it inside obs when switching slides.
TODO This should be ported to slides rather than service_items.
Since sometimes in a presentation you'd possibly want different obs scenes, lets instead make these changes on the slides rather than on the service_items. That way each slide can have an associated obs scene and do some trickerydo to determine if we need to change it.
I need to properly update them yet, it would seem I never assigned the obs scene to the slides and then obs wouldn't have anything to change to. I'm trying to change it now.
TODO OBWS setting scenes
This has been really tricky since there is something of a bug when using runtime.block_on()
rather than having a single cohesive tokio runtime. So, perhaps I need to figure out if I can't make a runtime that works for the whole app so that I can manage these a little better.
TODO Find segfault in webengine bug
/chris/lumina/src/branch/master/~/dev/lumina/src/qml/presenter/Slide.qml:🆔%20web
When moving service items around and thus slides, sometimes the WebEngineView causes a segfault
Maybe I need to use a timer function before loading the WebView? That way while moving things around, we aren't loading anything and wait until moving is over?
ACTUALLY, if I can just generate thumbnails, I won't even need the WebEngineView in the PreviewSlideListDelegate anyway, which seems to fix it.
TODO Add a generate thumbnails function for reveal.js presentations feature
This site is very helpful: https://html2canvas.hertzen.com/configuration/
I could use html2canvas in order to render the file in a canvas and pick it's size. Then I could take images of a slide, check to see if there are more slides, take another after changing and so on. This will likely need to be a lengthy script and I'll need to toy with how to load both html2canvas and this script into the QML webengine
TODO write a function for setting each slide to the appropriate index in html presentations feature
TODO Build a slide_editor.rs maintenance
This file can house all the logic for the editor and propogate the changes to the Slide.qml better. This way it can talk more directly to the song_model if done properly.
This could also help to separate more concerns in Rust and allow me to fix some small problems from the complications of Rust to C++ to QML. Maybe I can setup the changes to certain data pieces more cleanly this way.
Need to experiment with it more.
TODO Need to use a better logging systems so things stop getting confusingly lost maintenance
/chris/lumina/src/branch/master/~/dev/lumina/src/rust/song_model.rs::AudioRole,
TODO Need to work on all warnings and errors to cleanup logs
TODO Figure out qml hot reload maintenance
TODO Switch to using rust only deletion functions. bug
For this to work I'll need to use a vector of indexes. Somehow I'll need to figure out what QML can pass to Rust and then cycle through all of them and remove each item.
TODO Start planning out what a 1.0 release would look like and decide how to get there roadmap
A 1.0 release may be achievable soon as long as I can figure out what is good to have in and what isn't. Then figure out what outstanding bugs and odd workflows exist and fix them. Then figure out deploying the package to various distros, windows, and mac.
DONE REFACTORING THE BACKEND
A large portion of the back I am refactoring to create a slide class with a slide object for QML to look at as the master slide. Then a slide model for us to use to know for sure what the next slide will look like always and jump to it better within listviews and gridviews. Then use a serviceitemmodel that is aware of the slidemodel to know which slides belong to it. A lot of the UI will need to be refactored a bit to point to the new objects properly.
Could start working on moving slide.h and slide.cpp to a slide.rs. Then creating a slide_object.rs. Then maybe a service_item.rs. Creating these very basic classes in Rust would mean I start learning more and more Rust, and I would be preventing more memory bugs.
DONE What is out
Some of the special effects and things that I wanted to do could perhaps hold off. A lot of the things that I want to do to help make this really special could hold off. Blur, Color Adjustments, and Shadows for backgrounds and text and stuff can hold off for now. More of the special propresenter kind of things.
I had some scope creep. While working on a handful of things I started to transition things over to using Rust instead of C++ with CXX-QT. In the end, I believe this to be a MUCH better move since so much of C++ is dangerous in a lot of ways and I am not confident in my abilities as a developer to make sure I'm not creating memory bugs.
In some ways, this made things harder, Rust does things differently and doesn't have quite as many niceties as QT's built in stuff, but in the end, I do think it'll mean good things. Also, having this built this way may pave the way for others to build QT apps in Rust.
Others:
- Detail Layout
- Effects
- Overall Search
TODO What is In
I need to make the UI fit so much better. A lot of making the UI work is going to start being top priority. So for starters.
Since moving to Rust, I'm going to include that all of the models except maybe the serviceitemmodel should be finished in Rust in order for this to be ready to release.
Others:
- Multi Drag? Maybe…
- Adding the ability to use Librepresenter in other wayland compositors - Need to address the QWindow problem. Fixed.
DONE Major Bugs
Drag and Drop of ServiceList
this is fixed, but now I need to move the slides around as you change the serviceItemModel- UI Blocking when saving
DONE Fix inserting items from service bugs
DONE need to finish figuring out proper removal of slides
DONE There is still a bug in inserting items to the service list. The listview starts to stack items ontop of each other.
DONE Multi Select and Delete
Need to figure out multi delete of libraries. Selection is working but after 1 item is deleted, the model resets and then breaks my selection list…
I think i need deletion functions in all models
DONE Items in library with missing videos or images don't show any helpful UI.
DONE Now there are bugs related to switch the slideModel in C++ to slide_model in Rust.
I'll need to make sure I'm removing the right slide after a serviceItem is removed and then move them as well.
DONE slide_model.rs doesn't move slides right yet
Either their index in the vector is wrong or their service_item_id is wrong. So my next approach will be to move slides individually rather than all at once?
DONE Song Model
This still needs ported to Rust. It'll be the hardest of the library models since it includes the song lyric parsing functions.
TODO [A] serivce_item_model
This needs to get ported to rust so that I can start adding more features to it soon. This is a blocker for the start and end times I believe
This is now a much higher priority since I need to get this done before a lot of other things are even possible. Video times and presentation indexes will probably rely on this.
Maybe the first approach is to scan through the rest of the C++ code and see what I can easily move to rust fast. Things like moving items are a more involved set of steps.
Start with select, deselect, select_items, and deactivate. Then either move onto save or move things…
- Select
- Activate
- Deselect
- Select Items Multiple items will be next. This will allow me to edit things much faster, and is necessary for releasing this.
- Deactivate
- Load
- Save
TODO Deployment
- Linux Need to figure out if I can use Nix to deploy in various fashions. Maybe I'll need to handcraft my own things for Arch, flatpak, and or snap.
- Windows
- Macos
TODO A busy indicator while deleting library items feature ui
TODO find song on SongSelect or perhaps Genius Lyrics feature
This function will need to include parsing through the HTML of the results page. Finding the first "song-result", then "song-result-title", and inside that tag is the name. In the URL is the CCLI number.
Lyrics will probably be better to grab from genius lyrics.
TODO Create a setting for holding static slides and audios :feature: /chris/lumina/src/branch/master/~/dev/church-presenter/src/qml/presenter/Settings.qml
TODO [B] ffmpeg.rs feature
This still needs a lot of work.
TODO [B] ytdl.rs feature
This still needs a lot of work. Mostly error handling.
TODO UI Blocks while saving bug
This is waiting till we get the service_item_model.rs finished so we can use rust threads.
TODO [B] give images an aspect ratio option feature
TODO [B] Fix ImageEditor to make more sense for images ui
TODO Add image slideshow with looping feature
I could add this by adding a bool as a gallery option in the ImageSqlModel. Then add a loop bool as well. Then perhaps I'd ask if this image item contains a gallery and if so, make sure to loop through all of the filePaths as they could be saved as a list instead of a single filepath. Then decide on the last one whether or not to loop back to the beginning based on the loop bool in the image item.
TODO Add image gallery options feature
TODO Finish toolbar in presentation display ui
WAIT Make toolbar functional for songeditor
[3/4]
[75%]
core
- alignment
- font - Need to finish the UI portion of it
- fontsize - Need to finish the UI portion of it
- effects? For effects, I'm not 100% sure how to do this in an easy to build out way. Should I just do them the same as the other attributes or have effects be individually stored? Which effects to use? I'm thinking shadows for sure for readability on slides. Also, maybe I should have an effect of like glow? But maybe I'll come back to this after more of the core system is finished.
WAIT nix-shell needs a little bit of work perhaps yet. But may be working under plasma just not minimal window managers using qt5ct.
https://discourse.nixos.org/t/developing-kirigami-applications/19947/17 This thread helped a lot
DONE [A] Fix using arrows shows the right slide, but the slide preview list doesn't follow it
DONE
[A]
Updating properties in models. [0/0]
[0%]
All of the models need to be editable from the outside so that the editor pages a can appropriately change the properties of each item. I'll go in this order.
DONE Video
DONE Image
DONE Presentations
DONE Songs
Songs will be the hardest so I'll save them for last. They are not even using the rust models yet anyway. The key that I figured out is that instead of relying on the proxy model to map to the appropriate id inside the rust model. I'll store an id in the sqlite database and use that as a way to find each item. I'll need to keep tinkering with the best way to do that as right now I looped through all the items and that may get inefficient as models grow.
Another big blocker in this process is to make sure that all properties are accessed appropriately on the QML side. I need to update a lot of QML code yet.
DONE DATA CHANGED
Almost done here, but I can't get the data to emit the change and therefore inform the proxyModel of the changes and change it in the list view.
DONE [A] new_song method feature bug
DONE Figure out how to nest qobjects
This is supposed to be covered in the examples and the book.
- https://github.com/KDAB/cxx-qt/blob/main/examples/qml_features/rust/src/nested_qobjects.rs
- https://kdab.github.io/cxx-qt/book/concepts/nested_objects.html
But, I can't seem to get it to compile. I'll keep tinkering but this would be huge for allowing me to have a single object that can get passed into functions of other objects to be able to call inner functions from the outer call. This would mean I could have obs and slides talk. I could have the slide_object talk to the model. And more…
Maybe an alternative to this would be connecting them through signals, but idk yet….
Another alternative would be to try to use rust mods to make sure it is in scope of the qobject mod block.
DONE [A] Make things not rely on my own machine. bug
Right now some of the paths are hardcoded and I need to fix that very fast so that everything will work on other machines.
DONE [A] Make Presentation Window follow the presenter component core
Starting this by creating a slide singleton that will carry the variables for the current visible slide in the presentation.
May need to think about making this a slide class for all possible slides and a presentation singleton which carries the slide, but first I'll work out if this implementation works instead.
The left dock doesn't carry the change from the arrow buttons and the video on the actual presentation doesn't load.'
All pieces working now
DONE RENAME TO LUMINA
"Lumina" is a word derived from Latin, which means "lights" or "illuminations." It can be associated with brilliance, radiance, or the glow of light. In the context of a church presentation software, "Lumina" could represent the concept of shedding light, enlightenment, or guiding through visual presentations.
Let's rename everything to that.
DONE [B] presentations need to know their index of individual slides and count bug
Both PDFs and reveal.js presentations think every slide is the first one. I need a way of finding the individual components and then properly switching to the next one.
Switching to the next slide in reveal.js may be tricky since I'll need to push into the WebEngineView the next reveal function and then get back how many more slides and fragments there are.
DONE Saving needs to be asynchronous
I need to figure out how to make saving asynchronous in order to not lock the ui thread while saving.
Tokio seems to not be working the way I expected….
Works much better with spawning an os thread.
Still needs some form of ui to indicate that saving is in progress.
DONE [B] Fix switching songs in editor not showing the right lyrics
DONE Mouse needs to have resize shape when hovering controls bug
DONE Adding move row to service list bug
/chris/lumina/src/branch/master/~/dev/lumina/src/rust/service_item_model.rs::pub%20fn%20move_rows%28 Since cxx-qt is having trouble compiling beginMoveRows for rust, I tried a wrapper function in C++ but that's causing an overflow in the slide_model after the signal. Actually I don't think a wrapper function should even work since the Rust model is the one that should be calling beginMoveRows, not the C++ model.
All that said, the real solution is to figure out how to get beginMoveRows to compile for rust, until then, implementing some wrapper functions and using beginResetModel instead will work for move_up and move_down.
ALMOST DONE!! I only now need to figure out and fix whatever is happening to the seg fault that happens when moving things fast.
DONE
Port to CXX-QT 6.0 [0%]
[0/0]
/chris/lumina/src/branch/master/~/dev/lumina/src/rust/lib.rs
DONE image_model.rs
DONE video_model.rs
DONE presentation_model.rs
DONE songs/song_model.rs
DONE songs/song_editor.rs
DONE ytdl.rs
DONE utils.rs
DONE obs.rs
DONE 18000 errors…..
round 1 of errors done…..
DONE 237 errors…
now round 2 There were more after this too… some thousands of them I suppose
DONE FIX CMAKE? or build.rs
This was a doozy. Apparently the way that cmake links things together changed in cxx_qt 6.0. So, I had to rename a lot of the library linking to ${APP_NAME}_lib instead of using the ${CRATE} name. So, basically it changed from liblumina to lumina_lib I believe.
Like this..
target_link_libraries(${APP_NAME} PRIVATE ${APP_NAME}_lib)
DONE Write a function to handle switching to the next fragment in revealjs
/chris/lumina/src/branch/master/~/dev/lumina/src/qml/presenter/Slide.qml::WebEngineView%20%7B
In order to achieve this, I have to do some of the logic in qml as opposed to rust. Rust just is too far abstracted I think… Unless maybe I can have some form of slide signal pieces that the slide can react to and pass the necessary pieces into rust. I'll need to experiment with this, but I've found that it is all possible, so I'll keep playing.
- First in JS
- Now need to see if I can do more logic in Rust instead.
- Maybe signal handlers?
I've written this with signal handlers now. It's working sorta.
DONE Rename SlideEditor.qml to SongEditorSlideList.qml
DONE Make saving file auto use the last save file and go from there
DONE When updating background, it isn't changed in the list
DONE Need to test on other wayland compositors but Hyprland doesn't show the presentation window. bug
Quite by accident, I discovered how I may be able to fix this bug. Even though in QML I cannot show the window on demand, apparently in C++ I can still do it. So I will attempt to show the window by subclassing QQuickView in Rust and assign it's source through a QML file that is the PresentationWindow.qml
FIXED!
DONE Database doesn't exist we crash bug
Need to handle the error and create the database in case it doesn't exist with the proper setup.
DONE Let's copy it from the old comp to test
DONE Research diesel's ability to build the database for me
DONE Choose function to use
I've got diesel migrations to work and can essentially use that to initialize the database for me.
DONE Find proper error loading path that is earliest
I think songs are loaded first
DONE Create database
Simply having diesel load the database creates one if there isn't one there
DONE Load rest of app
Once the migration is done, the rest just loads since it's in the setup function of the songs.
DONE get_lyric_list method
/chris/lumina/src/branch/master/~/dev/church-presenter/src/rust/song_model.rs::todo!(); This is the big one. Previous implementation in cpp is here: /chris/lumina/src/branch/master/src/cpp/songsqlmodel.cpp::QStringList%20SongSqlModel::getLyricList%28const%20int%20&row%29
DONE Add video repeat pieces feature
This is possible with a toggle in the presenter but it'd be even better to have that built into the video model so that videos remember whether they should repeat. This would make sense in things like countdowns or video slideshows.
DONE Make libraries and models aware of being selected.
This allows us to drag multiple to service list and delete multiple. final part to this is allowing for multiple select and multiple move in service list or library
This is mostly done, just need to include the ability to multi select and then figure out multi drag.
DONE Library and ServiceList scrollbar is in the way bug ui
DONE bug in dragging servicelist items to reorder. Maybe I can fix with me simplified model system bug
I switched back to using Kirigami.dragHandler and properly implemented moveRows in the serviceItemModel
DONE Check for edge cases in inputing wrong vorder and lyrics core
Fix broken append when importing River song
Let's test this, because I think I fixed it. still extra bits on last slide
DONE
Fix possible bug in arrangingItems in draghandler [1/3]
[33%]
bug
- Basic fixed drag n drop
- Allow for a less buggy interaction I think one of the major problems has to do with moving the item while I am still draggin it. This means that I am then shifting the item's id whilst dragging and causing some unsuspected behavior? Not sure, need to maybe consult some one else if possible.
- Need to check for edge cases
DONE Build out a slide preview system so we can see each slide in the song or image slideshow ui
- Initial ListView with text coming from
getLyricList
- Depending on this Need to make getLyricList give back the verses with empty lines as separate slides
- Need to perhaps address the MPV crashing problem for a smoother experience.
Essentially, mpv objects cause a seg fault when we remove them from the qml graph scene and are somehow re-referencing them. Using
reuseItems
, I can prevent the seg fault but then we are storing a lot of things in memory and will definitely cause slowdowns on older hardware. So far I haven't seen too many problems with thereuseItems
piece yet. Apparently, I still have crashing Setting a really highcacheBuffer
in the ListView seems to have fixed the crashing, but will result in higher memory use. As of right now we are using 1.1Gb total, so I may think of a better solution later, but for now, that'll have to work. - There is also a small hiccup in switching between songs. I appears as if songs that don't have any slides will have ghost slides from the previously selected song.
- Another issue I discovered was that when switching to a song with videoBackgrounds, the mpv object doesn't ALWAYS load the first frame of the slide. Can I let the video play a tiny bit longer to make sure frames ALWAYS get loaded? That didn't work..
- There is one other issue with videoBackgrounds now going black on the second slide after switching to a slideModel. I need to check if the videos are the same and if so do nothing. fixed. Maybe I'll need to change something else but what?
DONE Make serviceItemModel aware of being selected and active
Being selected means that those items can be dragged or deleted or moved together. Being active, means that the singular item is the currently displayed item.
DONE ServiceItemModel load needs to first look for on disk path and then the archive path
Check audio and background first, if they don't exist, grab the file in the archive and put it in the local folder and use that path to create the serviceitem
DONE Unload video when switching to something with just image core bug
DONE Create a nextslide function to be used after the end of the list of slides slide
- Check to make sure this works in all conditions but I believe it works ok.
DONE To finish the UX of which item is active, the Presentation needs to switch to the active slide in the preview system.
- To make this work I think I'll need to make serviceitemmodel able to signal when a particular item is active and give it's index so the list can follow suit. nevermind, I can just check if it's active in the delegate.
DONE Images stored in sql need to have aspect saved and applied dynamically here core
/chris/lumina/src/branch/master/~/dev/church-presenter/src/qml/presenter/Slide.qml::fillMode:%20Image.PreserveAspectCrop I didn't save the aspect, but I applied it based on type of item first, we can change that later.
DONE VideoSQL Model and SQLite system needs fixing bug
DONE Add ability to use arrow keys to move through slides core feature
DONE Make sure the video gets changed in a proper manner to not have left over video showing from previous items video slide
- Build a basic system that changes to black first and then switches to the video
- Build out a loading system that will load the next video if it needs to and then the switch can be instant. The second option is the best, but requires a lot more work. I have the first already working so I'll come back to this once I have more of an idea of how to do it.
DONE Add an audio file to the song so that it will play when the song is presented feature song
- Add audio file to model
- add ui for adding audio file
- add extra mpv piece to slide to play audio file
DONE Make the hover effect of dragging items over the servicelist show in the correct spot at all times.
Believe I've fixed this
DONE add a dropping area in the library feature ui
- Basic droparea
- Determine which library to add to based on extension.
- Add a presentation model so that presentations can be added this way.
DONE images and videos need a better get system
DONE Bug in mpv race condition with selecting with the presenter but not with the actual PresentationWindow. bug
when selecting an item in the ServiceList, if the PresentationWindow isn't visible, it seems to prompt mpv to show a window of it's own with the video playing if the item contains a video.
DONE Find a way to maths the textsize slide
This may not be as needed. Apparently the text shrinks to fit it's space.
DONE Fix bug in not removing old slides in the SongEditor when switching songs from the Library bug
DONE
Need to make getLyricList
give back the verses with empty lines as separate slides core
DONE bug in changing slides with the arrows core
slides are inconsistent in changing from one slide to the next or previous. Both functions need looked at.
Maybe my best solution would be to architect a model or class for both the presentation controller and the presentation window to follow and do all the heavy lifting in there.
Finished the arrows working through a proper c++ class
DONE Fix broken append when importing River song
This was due to the song not having a vorder. Need to protect from edge cases of the user inputing the formatted text that doesn't fit what's expected in code.
DONE implement previousSlide and previousAction
DONE
Need to make ListModel capable of bringing in a string list [2/2]
[100%]
- Create a Model
- Create a class that we'll make a list of in the model
DONE Make an image sql model
DONE Parse Lyrics to create a list of strings for slides
SCHEDULED: <2022-03-23 Wed 10:00>
DONE BUG in dropping and then selecting song will duplicate entries dev
SCHEDULED: <2022-04-05 Tue> /chris/lumina/src/branch/master/~/dev/church-presenter/src/qml/presenter/LeftDock.qml::Layout.fillHeight:%20true
or at least turns the entry above it into the same as itself while retaining it's title?
DONE Make nextSlideText a nextAction function to incorporate other types of items
DONE Fix file dialog using basic QT theme
DONE Delete temp folder
Thoughts
I'm considering porting from using QML and CXX-QT to something like Iced or Slint and thus doing the entire app in a far more "Rust" way. The issues with this include:
- Rewrite almost the entire thing
- Most of the logic is fairly tied to the UI
- Will be using the current state of the app for a long time until it's nearly feature parity
Having rewritten a lot of the logic once already to Rust, I think it'll go faster, but I'm afraid of continuing to have FOMO in picking a library that isn't quite up to snuff. Iced seems to be a good contender to be around for a while since System 76 is taking it on as their library to build COSMIC in. However, I just don't think I like the way you build UI's in Iced.
Slint on the other hand is basically like QML but for Rust, which is the whole reason this project started. QML and therefore Slint, are perfect for designing UI's. It's a powerful Object Tree that the code will nearly tell you in it's form how the UI should look since objects are nested. Slint also seems a bit more finished.
Slint is also GPL3. So that means its protected. Good for me, not for others. Iced seems to have more community backing. Slint does have a dual license though and that is a bit scary.
I think I might just use Slint. Maybe it's easier to contribute to than CXX-QT?
Let's also list the problems I've had with CXX-QT…
- A lot of types that need to cross the boundary are specific to QT and therefore cause a lot of duplicated memory.
- The specific QT types are different and not "Rust" like.
- It's complicated to inherit from QT types to build models. And that's the only way to work with collections of data in QML. Models.
- Some things listed in the docs just don't seem to compile.
- APIs are changing. They are still trying to land on a model for how things should look to the user of the library.
Slint and Iced both are a more nailed down API. However, QT is a far more mature system….