initial ui code for viewing multiple slides per item
This commit is contained in:
parent
6271df91fc
commit
6953a7681f
1 changed files with 50 additions and 47 deletions
|
@ -192,59 +192,62 @@ FocusScope {
|
||||||
reuseItems: true
|
reuseItems: true
|
||||||
|
|
||||||
model: serviceItemModel
|
model: serviceItemModel
|
||||||
delegate: Rectangle {
|
delegate: Repeater {
|
||||||
id: previewHighlight
|
model: previewSlidesList.model.slideNumber
|
||||||
implicitWidth: 210
|
delegate: Rectangle {
|
||||||
implicitHeight: width / 16 * 9
|
id: previewHighlight
|
||||||
color: {
|
implicitWidth: 210
|
||||||
if (active || previewerMouse.containsMouse)
|
|
||||||
Kirigami.Theme.highlightColor
|
|
||||||
else
|
|
||||||
Kirigami.Theme.backgroundColor
|
|
||||||
}
|
|
||||||
|
|
||||||
Presenter.Slide {
|
|
||||||
id: previewSlideItem
|
|
||||||
anchors.centerIn: parent
|
|
||||||
implicitWidth: 200
|
|
||||||
implicitHeight: width / 16 * 9
|
implicitHeight: width / 16 * 9
|
||||||
textSize: width / 4
|
color: {
|
||||||
itemType: type
|
if (active || previewerMouse.containsMouse)
|
||||||
imageSource: backgroundType === "image" ? background : ""
|
Kirigami.Theme.highlightColor
|
||||||
videoSource: backgroundType === "video" ? background : ""
|
else
|
||||||
audioSource: ""
|
Kirigami.Theme.backgroundColor
|
||||||
chosenFont: font
|
}
|
||||||
text: model.text[0] === "This is demo text" ? "" : model.text[0]
|
|
||||||
pdfIndex: 0
|
|
||||||
preview: true
|
|
||||||
editMode: true
|
|
||||||
|
|
||||||
}
|
Presenter.Slide {
|
||||||
|
id: previewSlideItem
|
||||||
|
anchors.centerIn: parent
|
||||||
|
implicitWidth: 200
|
||||||
|
implicitHeight: width / 16 * 9
|
||||||
|
textSize: width / 4
|
||||||
|
itemType: type
|
||||||
|
imageSource: backgroundType === "image" ? background : ""
|
||||||
|
videoSource: backgroundType === "video" ? background : ""
|
||||||
|
audioSource: ""
|
||||||
|
chosenFont: font
|
||||||
|
text: model.text[index] === "This is demo text" ? "" : model.text[index]
|
||||||
|
pdfIndex: 0
|
||||||
|
preview: true
|
||||||
|
editMode: true
|
||||||
|
|
||||||
Controls.Label {
|
}
|
||||||
id: slidesTitle
|
|
||||||
width: previewSlideItem.width
|
|
||||||
anchors.top: previewSlideItem.bottom
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
|
||||||
anchors.topMargin: 5
|
|
||||||
elide: Text.ElideRight
|
|
||||||
text: name
|
|
||||||
/* font.family: "Quicksand Bold" */
|
|
||||||
}
|
|
||||||
|
|
||||||
MouseArea {
|
Controls.Label {
|
||||||
id: previewerMouse
|
id: slidesTitle
|
||||||
anchors.fill: parent
|
width: previewSlideItem.width
|
||||||
hoverEnabled: true
|
anchors.top: previewSlideItem.bottom
|
||||||
onClicked: changeServiceItem(index)
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
cursorShape: Qt.PointingHandCursor
|
anchors.topMargin: 5
|
||||||
}
|
elide: Text.ElideRight
|
||||||
|
text: name
|
||||||
|
/* font.family: "Quicksand Bold" */
|
||||||
|
}
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
id: previewerMouse
|
||||||
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
|
onClicked: changeServiceItem(index)
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: serviceItemModel
|
target: serviceItemModel
|
||||||
onDataChanged: if (active)
|
onDataChanged: if (active)
|
||||||
previewSlidesList.positionViewAtIndex(index, ListView.Center)
|
previewSlidesList.positionViewAtIndex(index, ListView.Center)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Kirigami.WheelHandler {
|
Kirigami.WheelHandler {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue