more ui setup for viewing all slides in item
This commit is contained in:
parent
83fcb59ea0
commit
8442913576
3 changed files with 38 additions and 22 deletions
|
@ -29,7 +29,7 @@ Controls.Page {
|
||||||
property string dragItemBackground: ""
|
property string dragItemBackground: ""
|
||||||
property string dragItemFont: ""
|
property string dragItemFont: ""
|
||||||
property string dragItemFontSize
|
property string dragItemFontSize
|
||||||
property string dragItemSlideNumber
|
property int dragItemSlideNumber
|
||||||
|
|
||||||
property bool editing: true
|
property bool editing: true
|
||||||
|
|
||||||
|
|
|
@ -93,9 +93,9 @@ FocusScope {
|
||||||
|
|
||||||
Presenter.Slide {
|
Presenter.Slide {
|
||||||
id: previewSlide
|
id: previewSlide
|
||||||
implicitWidth: Kirigami.Units.gridUnit * 32
|
implicitWidth: root.width - 400
|
||||||
implicitHeight: width / 16 * 9
|
implicitHeight: width / 16 * 9
|
||||||
/* minimumWidth: 300 */
|
/* minimumWidth: 200 */
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
textSize: width / 15
|
textSize: width / 15
|
||||||
itemType: root.itemType
|
itemType: root.itemType
|
||||||
|
@ -182,15 +182,18 @@ FocusScope {
|
||||||
anchors.bottom: root.bottom
|
anchors.bottom: root.bottom
|
||||||
width: parent.width
|
width: parent.width
|
||||||
orientation: ListView.Horizontal
|
orientation: ListView.Horizontal
|
||||||
|
spacing: Kirigami.Units.smallSpacing * 2
|
||||||
cacheBuffer: 900
|
cacheBuffer: 900
|
||||||
reuseItems: true
|
reuseItems: true
|
||||||
|
|
||||||
model: serviceItemModel
|
model: serviceItemModel
|
||||||
delegate: Rectangle {
|
delegate: Rectangle {
|
||||||
id: previewHighlight
|
id: previewHighlight
|
||||||
property var outerModelData: modelData
|
property var outerModelData: model
|
||||||
implicitWidth: 210
|
implicitHeight: Kirigami.Units.gridUnit * 6
|
||||||
implicitHeight: width / 16 * 9
|
implicitWidth: Kirigami.Units.gridUnit * 11
|
||||||
|
border.color: Kirigami.Theme.highlightColor
|
||||||
|
radius: 5
|
||||||
color: {
|
color: {
|
||||||
if (active || previewerMouse.containsMouse)
|
if (active || previewerMouse.containsMouse)
|
||||||
Kirigami.Theme.highlightColor
|
Kirigami.Theme.highlightColor
|
||||||
|
@ -200,16 +203,21 @@ FocusScope {
|
||||||
ListView {
|
ListView {
|
||||||
id: slidesList
|
id: slidesList
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
implicitHeight: parent.height
|
model: outerModelData.slideNumber === 0 ? 1 : outerModelData.slideNumber
|
||||||
model: outerModelData.slideNumber
|
width: parent.width * model - 10
|
||||||
|
height: parent.height
|
||||||
orientation: ListView.Horizontal
|
orientation: ListView.Horizontal
|
||||||
cacheBuffer: 900
|
cacheBuffer: 900
|
||||||
reuseItems: true
|
reuseItems: true
|
||||||
Component.onCompleted: showPassiveNotification(outerModelData.slideNumber)
|
spacing: Kirigami.Units.smallSpacing
|
||||||
|
Component.onCompleted: {
|
||||||
|
showPassiveNotification("Number of slides: " + outerModelData.slideNumber);
|
||||||
|
parent.width = width;
|
||||||
|
}
|
||||||
delegate: Presenter.Slide {
|
delegate: Presenter.Slide {
|
||||||
id: previewSlideItem
|
id: previewSlideItem
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
implicitWidth: 200
|
implicitWidth: Kirigami.Units.gridUnit * 10
|
||||||
implicitHeight: width / 16 * 9
|
implicitHeight: width / 16 * 9
|
||||||
textSize: width / 4
|
textSize: width / 4
|
||||||
itemType: outerModelData.type
|
itemType: outerModelData.type
|
||||||
|
@ -217,17 +225,24 @@ FocusScope {
|
||||||
videoSource: outerModelData.backgroundType === "video" ? background : ""
|
videoSource: outerModelData.backgroundType === "video" ? background : ""
|
||||||
audioSource: ""
|
audioSource: ""
|
||||||
chosenFont: outerModelData.font
|
chosenFont: outerModelData.font
|
||||||
text: outerModelData.text[index] === "This is demo text" ? "" : outerModelData.text[index]
|
text: outerModelData.text[index + 1] === "This is demo text" ? "" : outerModelData.text[index + 1]
|
||||||
pdfIndex: 0
|
pdfIndex: 0
|
||||||
preview: true
|
preview: true
|
||||||
editMode: true
|
editMode: true
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
id: innerMouse
|
||||||
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
|
onClicked: changeServiceItem(outerModelData.index)
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Controls.Label {
|
Controls.Label {
|
||||||
id: slidesTitle
|
id: slidesTitle
|
||||||
width: previewSlideItem.width
|
width: Kirigami.Units.gridUnit * 7
|
||||||
anchors.top: slidesList.bottom
|
anchors.top: slidesList.bottom
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
anchors.topMargin: 5
|
anchors.topMargin: 5
|
||||||
|
@ -236,14 +251,6 @@ FocusScope {
|
||||||
/* font.family: "Quicksand Bold" */
|
/* font.family: "Quicksand Bold" */
|
||||||
}
|
}
|
||||||
|
|
||||||
Controls.ToolButton {
|
|
||||||
anchors.top: slidesTitle.bottom
|
|
||||||
text: "NUM"
|
|
||||||
icon.name: "viewimage"
|
|
||||||
hoverEnabled: true
|
|
||||||
onClicked: showPassiveNotification(slideNumber) && print(slideNumber);
|
|
||||||
}
|
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: previewerMouse
|
id: previewerMouse
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
|
@ -508,14 +508,23 @@ Item {
|
||||||
font, fontSize, itemID) {
|
font, fontSize, itemID) {
|
||||||
if (type === "song") {
|
if (type === "song") {
|
||||||
const newtext = songsqlmodel.getLyricList(itemID);
|
const newtext = songsqlmodel.getLyricList(itemID);
|
||||||
print("adding: " + name + " of type " + type);
|
print("adding: " + name + " of type " + type + " with " + newtext.length + " slides");
|
||||||
serviceItemModel.insertItem(index, name,
|
serviceItemModel.insertItem(index, name,
|
||||||
type, background,
|
type, background,
|
||||||
backgroundType, newtext,
|
backgroundType, newtext,
|
||||||
audio, font, fontSize);
|
audio, font, fontSize, newtext.length);
|
||||||
totalServiceItems++;
|
totalServiceItems++;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
/* if (type === "presentation") { */
|
||||||
|
/* print("adding: " + name + " of type " + type + " with " + newtext.length + " slides"); */
|
||||||
|
/* serviceItemModel.insertItem(index, name, */
|
||||||
|
/* type, background, */
|
||||||
|
/* backgroundType, "", */
|
||||||
|
/* "", "", 0, pageCount); */
|
||||||
|
/* totalServiceItems++; */
|
||||||
|
/* return; */
|
||||||
|
/* } */
|
||||||
print("adding: " + name + " of type " + type);
|
print("adding: " + name + " of type " + type);
|
||||||
serviceItemModel.insertItem(index, name,
|
serviceItemModel.insertItem(index, name,
|
||||||
type, background,
|
type, background,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue