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]
|
#[qinvokable]
|
||||||
pub fn add_item(
|
pub fn add_item(
|
||||||
mut self: Pin<&mut Self>,
|
mut self: Pin<&mut Self>,
|
||||||
text: QString,
|
name: QString,
|
||||||
ty: QString,
|
ty: QString,
|
||||||
image_background: QString,
|
text: Vec<QString>,
|
||||||
video_background: QString,
|
background: QString,
|
||||||
|
background_type: QString,
|
||||||
audio: QString,
|
audio: QString,
|
||||||
font: QString,
|
font: QString,
|
||||||
font_size: i32,
|
font_size: i32,
|
||||||
htext_alignment: QString,
|
|
||||||
vtext_alignment: QString,
|
|
||||||
service_item_id: i32,
|
|
||||||
slide_count: i32,
|
slide_count: i32,
|
||||||
looping: bool,
|
looping: bool,
|
||||||
|
video_start_time: f32,
|
||||||
|
video_end_time: f32,
|
||||||
) {
|
) {
|
||||||
let service_item = ServiceItem {
|
let service_item = ServiceItem {
|
||||||
|
name,
|
||||||
ty,
|
ty,
|
||||||
text,
|
text,
|
||||||
image_background,
|
background,
|
||||||
video_background,
|
background_type,
|
||||||
audio,
|
audio,
|
||||||
font,
|
font,
|
||||||
font_size,
|
font_size,
|
||||||
htext_alignment,
|
|
||||||
vtext_alignment,
|
|
||||||
service_item_id,
|
|
||||||
slide_count,
|
slide_count,
|
||||||
looping,
|
looping,
|
||||||
active: false,
|
video_start_time,
|
||||||
selected: false,
|
video_end_time,
|
||||||
video_thumbnail: QString::from(""),
|
..Default::default()
|
||||||
};
|
};
|
||||||
|
|
||||||
self.as_mut().add_service_item(&service_item);
|
self.as_mut().add_service_item(&service_item);
|
||||||
|
@ -195,35 +193,33 @@ mod service_item_model {
|
||||||
pub fn insert_item(
|
pub fn insert_item(
|
||||||
mut self: Pin<&mut Self>,
|
mut self: Pin<&mut Self>,
|
||||||
index: i32,
|
index: i32,
|
||||||
text: QString,
|
name: QString,
|
||||||
|
text: Vec<QString>,
|
||||||
ty: QString,
|
ty: QString,
|
||||||
image_background: QString,
|
background: QString,
|
||||||
video_background: QString,
|
background_type: QString,
|
||||||
audio: QString,
|
audio: QString,
|
||||||
font: QString,
|
font: QString,
|
||||||
font_size: i32,
|
font_size: i32,
|
||||||
htext_alignment: QString,
|
|
||||||
vtext_alignment: QString,
|
|
||||||
service_item_id: i32,
|
|
||||||
slide_count: i32,
|
slide_count: i32,
|
||||||
looping: bool,
|
looping: bool,
|
||||||
|
video_start_time: f32,
|
||||||
|
video_end_time: f32,
|
||||||
) {
|
) {
|
||||||
let service_item = ServiceItem {
|
let service_item = ServiceItem {
|
||||||
|
name,
|
||||||
ty,
|
ty,
|
||||||
text,
|
text,
|
||||||
image_background,
|
background,
|
||||||
video_background,
|
background_type,
|
||||||
audio,
|
audio,
|
||||||
font,
|
font,
|
||||||
font_size,
|
font_size,
|
||||||
htext_alignment,
|
|
||||||
vtext_alignment,
|
|
||||||
service_item_id,
|
|
||||||
slide_count,
|
slide_count,
|
||||||
looping,
|
looping,
|
||||||
active: false,
|
video_start_time,
|
||||||
selected: false,
|
video_end_time,
|
||||||
video_thumbnail: QString::from(""),
|
..Default::default()
|
||||||
};
|
};
|
||||||
|
|
||||||
self.as_mut().insert_service_item(&service_item, index);
|
self.as_mut().insert_service_item(&service_item, index);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue