adding footer information

This commit is contained in:
Chris Cochrun 2023-04-18 10:29:31 -05:00
parent 990edf3818
commit 4f081acd7a
2 changed files with 84 additions and 35 deletions

View file

@ -23,6 +23,7 @@ Kirigami.ApplicationWindow {
property bool editMode: false
property string soundEffect
property string footerLeftString
signal edit()
@ -59,11 +60,36 @@ Kirigami.ApplicationWindow {
}
footer: RowLayout {
Controls.TextArea {
id: filePathLabel
Layout.alignment: Qt.AlignLeft
Layout.leftMargin: Kirigami.Units.smallSpacing * 2
text: footerLeftString
background: Item{}
readOnly: true
HoverHandler {
id: hoverHandler
enabled: false
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.IBeamCursor
}
}
RowLayout {
id: rightFooterItems
spacing: 10
Layout.alignment: Qt.AlignRight
Layout.rightMargin: Kirigami.Units.smallSpacing * 2
Controls.Label {
Layout.alignment: Qt.AlignRight
Layout.rightMargin: Kirigami.Units.smallSpacing * 2
/* elide: Text.ElideLeft */
text: "hello"
text: "Total Service Items: " + ServiceItemModel.rowCount()
}
Controls.Label {
Layout.alignment: Qt.AlignRight
Layout.rightMargin: Kirigami.Units.smallSpacing * 2
/* elide: Text.ElideLeft */
text: "Total Slides: " + SlideModel.rowCount()
}
}
}

View file

@ -12,6 +12,7 @@ Item {
property string type: "video"
property var video
property bool audioOn: true
property bool editingRange: false
GridLayout {
id: mainLayout
@ -39,10 +40,6 @@ Item {
onEditingFinished: updateTitle(text);
}
Controls.Label {
text: "Looping:"
Layout.leftMargin: 20
}
Controls.CheckBox {
id: loopCheckBox
Layout.preferredWidth: 300
@ -59,6 +56,12 @@ Item {
Item { Layout.fillWidth: true }
Controls.ToolSeparator {}
Controls.ToolButton {
text: "Edit Range"
icon.name: "image-auto-adjust"
hoverEnabled: true
onClicked: editingRange = !editingRange
}
Controls.ToolButton {
text: "Effects"
icon.name: "image-auto-adjust"
@ -138,16 +141,26 @@ Item {
}
}
Controls.RangeSlider {
id: videoLengthSlider
Rectangle {
id: videoRangeBox
Layout.columnSpan: 2
Layout.preferredWidth: videoPreview.Layout.preferredWidth
Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter
Layout.leftMargin: 25
Layout.rightMargin: 25
Layout.topMargin: 50
Layout.topMargin: 40
visible: editingRange
ColumnLayout {
anchors.fill: parent
Controls.RangeSlider {
id: videoLengthSlider
Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter
Layout.leftMargin: 25
Layout.rightMargin: 25
to: videoPreview.duration
from: 0
@ -162,23 +175,31 @@ Item {
}
RowLayout {
Layout.preferredWidth: parent.width
Layout.alignment: Qt.AlignLeft
Layout.leftMargin: 25
Layout.rightMargin: 25
Controls.Label {
Layout.alignment: Qt.AlignLeft
Layout.leftMargin: videoLengthSlider.Layout.leftMargin
text: "Start Time: " + videoLengthSlider.first.value
text: "Start Time: " + new Date(videoLengthSlider.first.value * 1000).toISOString().slice(11, 19);
}
Controls.Label {
Layout.alignment: Qt.AlignRight
Layout.rightMargin: videoLengthSlider.Layout.rightMargin
text: "End Time: " + videoLengthSlider.second.value
text: "End Time: " + new Date(videoLengthSlider.second.value * 1000).toISOString().slice(11, 19);
}
}
Controls.ToolButton {
text: "FIX"
onClicked: videoLengthSlider.setValues(video.startTime, video.endTime)
}
}
}
Item {
id: botEmpty
Layout.fillHeight: true
@ -218,6 +239,7 @@ Item {
console.log(video.endTime);
mpvLoadingTimer.restart();
videoLengthSlider.setValues(vid.startTime, vid.endTime);
footerLeftString = "File path: " + video.filePath
}
function stop() {
@ -250,6 +272,7 @@ Item {
function updateLoop(value) {
/* changeStartTime(value, false); */
let bool = videoProxyModel.updateLoop(video.id, value);
if (bool)
video.loop = value;
/* showPassiveNotification("Loop changed to: " + video.loop); */
}