adding font and fontSize support

This commit is contained in:
Chris Cochrun 2022-09-26 10:35:44 -05:00
parent 2711bde130
commit ed632e0733
10 changed files with 128 additions and 7 deletions

View file

@ -222,6 +222,8 @@ Item {
dragItemBackgroundType = backgroundType;
dragItemBackground = background;
dragItemAudio = audio;
dragItemFont = font;
dragItemFontSize = fontSize;
draggedLibraryItem = self;
} else {
songListItem.Drag.drop()

View file

@ -28,6 +28,8 @@ Controls.Page {
property string dragItemAudio: ""
property string dragItemBackgroundType: ""
property string dragItemBackground: ""
property string dragItemFont: ""
property string dragItemFontSize
property bool editing: true
@ -173,6 +175,7 @@ Controls.Page {
function editSwitch(item) {
if (editMode) {
refocusTimer.repeat = false;
switch (editType) {
case "song" :
presentation.visible = false;
@ -226,6 +229,7 @@ Controls.Page {
presentationEditor.visible = false;
presentation.visible = true;
editMode = false;
refocusTimer.repeat = true;
presenting = true;
}
}

View file

@ -91,6 +91,7 @@ Item {
imageSource: imagebackground
videoSource: vidbackground
audioSource: SlideObject.audio
chosenFont: SlideObject.font
text: SlideObject.text
pdfIndex: SlideObject.pdfIndex
preview: true

View file

@ -38,6 +38,7 @@ Window {
videoSource: presentationWindow.visible ? SlideObject.videoBackground : ""
audioSource: SlideObject.audio
text: SlideObject.text
chosenFont: SlideObject.font
pdfIndex: SlideObject.pdfIndex
itemType: SlideObject.type
}

View file

@ -39,12 +39,15 @@ ColumnLayout {
Layout.fillWidth: true
onDropped: (drag) => {
print("DROPPED AT END");
showPassiveNotification(drag.source.title);
appendItem(dragItemTitle,
dragItemType,
dragItemBackground,
dragItemBackgroundType,
dragItemText,
dragItemAudio,
dragItemFont,
dragItemFontSize,
dragItemIndex);
dropHighlightLine.visible = false;
}
@ -123,6 +126,8 @@ ColumnLayout {
dragItemBackgroundType,
dragItemText,
dragItemAudio,
dragItemFont,
dragItemFontSize,
dragItemIndex);
} else if (drag.keys[0] === "serviceitem") {
serviceItemModel.move(serviceItemList.indexDragged,
@ -404,13 +409,15 @@ ColumnLayout {
}
function addItem(index, name, type,
background, backgroundType, text, audio, itemID) {
background, backgroundType, text, audio,
font, fontSize, itemID) {
if (type === "song") {
const newtext = songsqlmodel.getLyricList(itemID);
print("adding: " + name + " of type " + type);
serviceItemModel.insertItem(index, name,
type, background,
backgroundType, newtext, audio);
backgroundType, newtext,
audio, font, fontSize);
totalServiceItems++;
return;
}
@ -421,7 +428,8 @@ ColumnLayout {
totalServiceItems++;
}
function appendItem(name, type, background, backgroundType, text, audio, itemID) {
function appendItem(name, type, background, backgroundType,
text, audio, font, fontSize, itemID) {
print("adding: " + name + " of type " + type);
let lyrics;
if (type === "song") {
@ -430,7 +438,8 @@ ColumnLayout {
lyrics = songsqlmodel.getLyricList(itemID);
print(lyrics);
serviceItemModel.addItem(name, type, background,
backgroundType, lyrics, audio);
backgroundType, lyrics,
audio, font, fontSize);
totalServiceItems++;
return;
};