tweaks to service_item_model to be from rust... not finished
This commit is contained in:
parent
1ca9ab5fc4
commit
c02336b806
1 changed files with 24 additions and 28 deletions
|
@ -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<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().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<QString>,
|
||||
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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue