fixing more inserting pieces
This commit is contained in:
parent
4499d1a957
commit
f2f2ab27b9
2 changed files with 17 additions and 10 deletions
|
@ -557,8 +557,8 @@ Item {
|
|||
const image = imageProxyModel.getImage(itemID);
|
||||
console.log("adding: " + image.title + " of type " + type);
|
||||
ServiceItemModel.insertItem(index, image.title,
|
||||
type, image.filePath,
|
||||
"image", "", "",
|
||||
"", type, image.filePath,
|
||||
"image", "",
|
||||
"", 0, 0, false, 0.0, 0.0);
|
||||
serviceItemList.forceLayout()
|
||||
return;
|
||||
|
@ -567,8 +567,8 @@ Item {
|
|||
const video = videoProxyModel.getVideo(itemID);
|
||||
console.log("adding: " + video.title + " of type " + type);
|
||||
ServiceItemModel.insertItem(index, video.title,
|
||||
type, video.filePath,
|
||||
"video", "", "",
|
||||
"", type, video.filePath,
|
||||
"video", "",
|
||||
"", 0, 0, video.loop, video.startTime, video.endTime);
|
||||
serviceItemList.forceLayout()
|
||||
return;
|
||||
|
@ -581,8 +581,8 @@ Item {
|
|||
" of type " + type +
|
||||
" with " + lyrics.length + " slides");
|
||||
ServiceItemModel.insertItem(index, song.title,
|
||||
type, song.background,
|
||||
song.backgroundType, lyrics,
|
||||
lyrics, type, song.background,
|
||||
song.backgroundType,
|
||||
song.audio, song.font, song.fontSize,
|
||||
lyrics.length, true, 0.0, 0.0);
|
||||
serviceItemList.forceLayout()
|
||||
|
@ -594,8 +594,8 @@ Item {
|
|||
" of type " + type +
|
||||
" with " + pres.pageCount + " slides");
|
||||
ServiceItemModel.insertItem(index, pres.title,
|
||||
type, pres.filePath,
|
||||
"image", "",
|
||||
"", type, pres.filePath,
|
||||
"image",
|
||||
"", "", 0, pres.pageCount, false, 0.0, 0.0);
|
||||
serviceItemList.forceLayout()
|
||||
return;
|
||||
|
|
|
@ -260,6 +260,13 @@ mod slide_model {
|
|||
index: i32,
|
||||
service_item: &QMap_QString_QVariant,
|
||||
) {
|
||||
for (key, data) in service_item.iter() {
|
||||
println!(
|
||||
"{:?}: {:?}",
|
||||
key,
|
||||
data.value_or_default::<QString>()
|
||||
);
|
||||
}
|
||||
let ty = service_item
|
||||
.get(&QString::from("ty"))
|
||||
.unwrap_or(QVariant::from(&QString::from("")))
|
||||
|
@ -386,7 +393,7 @@ mod slide_model {
|
|||
slide.video_background = QString::from("");
|
||||
slide.slide_index = 0;
|
||||
self.as_mut().insert_slide(&slide, slide_index);
|
||||
println!("Item added in rust model!");
|
||||
println!("Image added to slide model!");
|
||||
}
|
||||
Some(ty) if ty == QString::from("song") => {
|
||||
let count = text_vec.len();
|
||||
|
@ -439,7 +446,7 @@ mod slide_model {
|
|||
_ => println!("It's somethign else!"),
|
||||
};
|
||||
|
||||
println!("Item added in rust model!");
|
||||
println!("Item added in slide model!");
|
||||
}
|
||||
|
||||
#[qinvokable]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue