diff --git a/src/rust/service_item_model.rs b/src/rust/service_item_model.rs index 83c8f20..6e6ae07 100644 --- a/src/rust/service_item_model.rs +++ b/src/rust/service_item_model.rs @@ -145,35 +145,33 @@ mod service_item_model { #[qinvokable] pub fn add_item( mut self: Pin<&mut Self>, - text: QString, + name: QString, ty: QString, - image_background: QString, - video_background: QString, + text: Vec, + background: QString, + background_type: QString, audio: QString, font: QString, font_size: i32, - htext_alignment: QString, - vtext_alignment: QString, - service_item_id: i32, slide_count: i32, looping: bool, + video_start_time: f32, + video_end_time: f32, ) { let service_item = ServiceItem { + name, ty, text, - image_background, - video_background, + background, + background_type, audio, font, font_size, - htext_alignment, - vtext_alignment, - service_item_id, slide_count, looping, - active: false, - selected: false, - video_thumbnail: QString::from(""), + video_start_time, + video_end_time, + ..Default::default() }; self.as_mut().add_service_item(&service_item); @@ -195,35 +193,33 @@ mod service_item_model { pub fn insert_item( mut self: Pin<&mut Self>, index: i32, - text: QString, + name: QString, + text: Vec, ty: QString, - image_background: QString, - video_background: QString, + background: QString, + background_type: QString, audio: QString, font: QString, font_size: i32, - htext_alignment: QString, - vtext_alignment: QString, - service_item_id: i32, slide_count: i32, looping: bool, + video_start_time: f32, + video_end_time: f32, ) { let service_item = ServiceItem { + name, ty, text, - image_background, - video_background, + background, + background_type, audio, font, font_size, - htext_alignment, - vtext_alignment, - service_item_id, slide_count, looping, - active: false, - selected: false, - video_thumbnail: QString::from(""), + video_start_time, + video_end_time, + ..Default::default() }; self.as_mut().insert_service_item(&service_item, index);