Commit graph

855 commits

Author SHA1 Message Date
Chris Cochrun
d3dbc23e60 fix Video struct missing fields 2023-04-07 06:36:39 -05:00
Chris Cochrun
4f58d6e1fd adding basic presentation_model.rs 2023-04-06 20:44:04 -05:00
Chris Cochrun
a71ead411f be more clear in variable names in image_model 2023-04-06 20:40:21 -05:00
Chris Cochrun
7ac29e28cd remove empty stuff in image_model 2023-04-06 20:39:44 -05:00
Chris Cochrun
e83cc71725 be more clear in variable names 2023-04-06 20:39:06 -05:00
Chris Cochrun
b5228dd872 remove empty stuff in video_model 2023-04-06 20:38:52 -05:00
Chris Cochrun
8c2d32af6b getting basic video_model.rs ready 2023-04-06 20:37:19 -05:00
Chris Cochrun
c1e9feb1b3 removing old testing stuff 2023-04-06 06:44:40 -05:00
Chris Cochrun
c8f1c85525 removing non needed deps 2023-04-06 06:33:20 -05:00
Chris Cochrun
b7e426edb8 tweaks to build env 2023-04-06 06:32:44 -05:00
Chris Cochrun
7a36f3f8af introducing video struct in models.rs 2023-04-06 06:06:09 -05:00
Chris Cochrun
fc2d0492fa the image_model.rs is working
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.
2023-04-06 05:49:28 -05:00
Chris Cochrun
caed6e6367 setting diesel up more 2023-04-04 15:15:29 -05:00
Chris Cochrun
37a2dbd986 diesel instead of sea-orm
sea-orm was getting to be bigger hassle I think and harder to compile,
diesel seems simple and effective enough.
2023-04-04 14:29:14 -05:00
Chris Cochrun
d308bd33b2 removing entities and sea-orm 2023-04-04 14:28:56 -05:00
Chris Cochrun
8430355fdd remove cruft 2023-04-04 13:01:04 -05:00
Chris Cochrun
db99525963 trying to add sea-orm as a way to create sql based models 2023-04-04 11:20:00 -05:00
Chris Cochrun
43f8c92253 add image_model file and video_thumbnail
Neither of these are used yet, but it's time to start added the code
2023-04-03 14:57:23 -05:00
Chris Cochrun
cf48c86202 udpating cargo 2023-04-03 14:57:17 -05:00
Chris Cochrun
97b949a704 removing unused video_thumbnail code to be used later 2023-04-03 14:57:01 -05:00
Chris Cochrun
6f545c3bf8 removing unused tests and unused video_thumbnail mod 2023-04-03 14:56:44 -05:00
Chris Cochrun
b95c429ca7 remove unnecessary type 2023-04-03 10:37:47 -05:00
Chris Cochrun
71fb6f4aee fixing some rust environment issues for the shell
Updated a lot of things to include ffmpeg_6-full so that we can use
some of the latest ffmpeg features and include ffmpeg-next in our rust
project.

Then some of the environment pieces were missing for ffmpeg-next to build.
2023-04-03 10:36:30 -05:00
Chris Cochrun
89c270e6a0 fix pdfs not working with rust model right 2023-04-03 06:12:20 -05:00
Chris Cochrun
4296a205a8 making signal and slots use appropriate signals
This makes it so other DataChanged signals don't reset the view as was
happening before.
2023-04-01 07:20:46 -05:00
Chris Cochrun
d2f26e4cc0 reorder roles 2023-04-01 07:19:35 -05:00
Chris Cochrun
146b54239e remove commented code 2023-04-01 07:13:54 -05:00
Chris Cochrun
0b052bb463 simplify DataChanged signal in rust 2023-04-01 07:13:11 -05:00
Chris Cochrun
060341adb7 video_thumbnail works to be set in rust
Since every slide is asking for their own, we don't need to loop
through all slides, we just use the index to put the thumbnail into
the right slides and emit data changed.
2023-04-01 07:02:42 -05:00
Chris Cochrun
995f9ffc03 add video_thumbnail additional
The actual code to generate thumbnails is still in C++ but I've added
a helper method to Rust now. It still needs connected.
2023-04-01 06:52:02 -05:00
Chris Cochrun
6a15f9a652 remove old commented code 2023-04-01 06:51:42 -05:00
Chris Cochrun
0efccdfa54 fix insert_item_from_service 2023-04-01 06:51:07 -05:00
Chris Cochrun
6377182ab3 add enum Role
This will make it easier to ensure we are always using the appropriate
data type in the DataChanged signal since we won't need to hand pass
i32s around and instead define them once in the function get_role.
2023-03-31 15:21:28 -05:00
Chris Cochrun
0f0f16e069 fix activate
slide_model.rs activate function now properly tells of the data that
was changed so that ListViews that use it as a model will reset their
data properly on changes.

The important parts were to ensure we are using the right indexes for
top_left and bottom_right. Then also ensure the roles are correct, but
I think I had that already, just went with the implementation that
CXX-Qt used in their examples.
2023-03-31 14:47:44 -05:00
Chris Cochrun
bd2002ada2 ensure active is proper color
For some reason the right value isn't being loaded on dataChanged, so
this makes sure to reset the value correctly for now.
2023-03-31 14:10:17 -05:00
Chris Cochrun
0a9c17cdde add activate function properly
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.
2023-03-31 13:13:20 -05:00
Chris Cochrun
b8bfa4b108 adding a proper Cxx type for slides 2023-03-31 09:56:22 -05:00
Chris Cochrun
98233e040a add ffmepg 2023-03-31 09:56:13 -05:00
Chris Cochrun
9938241ebb use correct ids and models 2023-03-31 09:55:52 -05:00
Chris Cochrun
be988e9ade use correct index for SlideChanged signal 2023-03-31 09:55:24 -05:00
Chris Cochrun
df7e85957c use rust slide_model activate 2023-03-31 09:55:00 -05:00
Chris Cochrun
23bc1435ea remove old debug info 2023-03-31 09:54:47 -05:00
Chris Cochrun
609d2af90b idk attempt to add ffmpeg? 2023-03-30 15:31:43 -05:00
Chris Cochrun
469837ca8e add a bit of iter 2023-03-30 13:25:00 -05:00
Chris Cochrun
6f185e6f6e slide_model.rs functions like get_item and activate
These functions aren't perfect, but this code all makes them
essentially work so that we can call from QML
2023-03-30 09:33:51 -05:00
Chris Cochrun
7e8694eca2 mapping slide_model.rs to serviceItems better 2023-03-29 15:10:04 -05:00
Chris Cochrun
fc1eb193dd image_count > slide_count
This is a better name for this field as it encapsulates that the
slides are not just images
2023-03-29 14:29:29 -05:00
Chris Cochrun
b3de8dfabf remove my_object.rs
This was a testing file while figuring out rust in qt
2023-03-29 14:29:03 -05:00
Chris Cochrun
7180c02876 model adds slides more properly 2023-03-29 13:50:12 -05:00
Chris Cochrun
90c1825b10 a compiling and sorta working model
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.
2023-03-28 15:05:36 -05:00