"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/qml/filters/pillar_echo/ui.qml" between
shotcut-20.09.01.tar.gz and shotcut-20.09.13.tar.gz

About: Shotcut is a cross-platform (Qt) advanced video editor.

ui.qml  (shotcut-20.09.01):ui.qml  (shotcut-20.09.13)
skipping to change at line 40 skipping to change at line 40
width: 350 width: 350
height: 180 height: 180
Component.onCompleted: { Component.onCompleted: {
filter.blockSignals = true filter.blockSignals = true
filter.set(middleValue, Qt.rect(0, 0, profile.width, profile.height)) filter.set(middleValue, Qt.rect(0, 0, profile.width, profile.height))
filter.set(startValue, Qt.rect(0, 0, profile.width, profile.height)) filter.set(startValue, Qt.rect(0, 0, profile.width, profile.height))
filter.set(endValue, Qt.rect(0, 0, profile.width, profile.height)) filter.set(endValue, Qt.rect(0, 0, profile.width, profile.height))
if (filter.isNew) { if (filter.isNew) {
// Add default preset. // Add default preset.
filter.set(rectProperty, '25%/25%:50%x50%') var rect = defaultRect()
filter.set(rectProperty, '' + rect.x + '/' + rect.y + ':' + rect.wid
th + 'x' + rect.height)
filter.set("blur", 4) filter.set("blur", 4)
filter.savePreset(preset.parameters) filter.savePreset(preset.parameters)
} else { } else {
filter.set(middleValue, filter.getRect(rectProperty, filter.animateI n + 1)) filter.set(middleValue, filter.getRect(rectProperty, filter.animateI n + 1))
if (filter.animateIn > 0) if (filter.animateIn > 0)
filter.set(startValue, filter.getRect(rectProperty, 0)) filter.set(startValue, filter.getRect(rectProperty, 0))
if (filter.animateOut > 0) if (filter.animateOut > 0)
filter.set(endValue, filter.getRect(rectProperty, filter.duratio n - 1)) filter.set(endValue, filter.getRect(rectProperty, filter.duratio n - 1))
} }
filter.blockSignals = false filter.blockSignals = false
setControls() setControls()
setKeyframedControls() setKeyframedControls()
if (filter.isNew) if (filter.isNew)
filter.set(rectProperty, filter.getRect(rectProperty)) filter.set(rectProperty, filter.getRect(rectProperty))
} }
function defaultRect() {
var result
if (producer.displayAspectRatio > profile.aspectRatio) {
result = Qt.rect(0, 0, profile.width, Math.round(profile.width / pro
ducer.displayAspectRatio))
} else {
result = Qt.rect(0, 0, Math.round(profile.height * producer.displayA
spectRatio), profile.height)
}
result.x = Math.round((profile.width - result.width) / 2)
result.y = Math.round((profile.height - result.height) / 2)
return result
}
function getPosition() { function getPosition() {
return Math.max(producer.position - (filter.in - producer.in), 0) return Math.max(producer.position - (filter.in - producer.in), 0)
} }
function setFilter(position) { function setFilter(position) {
if (position !== null) { if (position !== null) {
filter.blockSignals = true filter.blockSignals = true
if (position <= 0 && filter.animateIn > 0) if (position <= 0 && filter.animateIn > 0)
filter.set(startValue, filterRect) filter.set(startValue, filterRect)
else if (position >= filter.duration - 1 && filter.animateOut > 0) else if (position >= filter.duration - 1 && filter.animateOut > 0)
skipping to change at line 114 skipping to change at line 127
rectH.text = filterRect.height.toFixed() rectH.text = filterRect.height.toFixed()
} }
var enabled = position <= 0 || (position >= (filter.animateIn - 1) && po sition <= (filter.duration - filter.animateOut)) || position >= (filter.duration - 1) var enabled = position <= 0 || (position >= (filter.animateIn - 1) && po sition <= (filter.duration - filter.animateOut)) || position >= (filter.duration - 1)
rectX.enabled = enabled rectX.enabled = enabled
rectY.enabled = enabled rectY.enabled = enabled
rectW.enabled = enabled rectW.enabled = enabled
rectH.enabled = enabled rectH.enabled = enabled
} }
GridLayout { GridLayout {
columns: 6 columns: 4
anchors.fill: parent anchors.fill: parent
anchors.margins: 8 anchors.margins: 8
Label { Label {
text: qsTr('Preset') text: qsTr('Preset')
Layout.alignment: Qt.AlignRight Layout.alignment: Qt.AlignRight
} }
Preset { Preset {
id: preset id: preset
parameters: [rectProperty] parameters: [rectProperty]
Layout.columnSpan: 5 Layout.columnSpan: 3
onBeforePresetLoaded: { onBeforePresetLoaded: {
filter.resetProperty(rectProperty) filter.resetProperty(rectProperty)
} }
onPresetSelected: { onPresetSelected: {
setControls() setControls()
setKeyframedControls() setKeyframedControls()
positionKeyframesButton.checked = filter.keyframeCount(rectPrope rty) > 0 && filter.animateIn <= 0 && filter.animateOut <= 0 positionKeyframesButton.checked = filter.keyframeCount(rectPrope rty) > 0 && filter.animateIn <= 0 && filter.animateOut <= 0
filter.blockSignals = true filter.blockSignals = true
filter.set(middleValue, filter.getRect(rectProperty, filter.anim ateIn + 1)) filter.set(middleValue, filter.getRect(rectProperty, filter.anim ateIn + 1))
if (filter.animateIn > 0) if (filter.animateIn > 0)
skipping to change at line 148 skipping to change at line 161
filter.set(endValue, filter.getRect(rectProperty, filter.dur ation - 1)) filter.set(endValue, filter.getRect(rectProperty, filter.dur ation - 1))
filter.blockSignals = false filter.blockSignals = false
} }
} }
Label { Label {
text: qsTr('Position') text: qsTr('Position')
Layout.alignment: Qt.AlignRight Layout.alignment: Qt.AlignRight
} }
RowLayout { RowLayout {
Layout.columnSpan: 3
TextField { TextField {
id: rectX id: rectX
horizontalAlignment: Qt.AlignRight horizontalAlignment: Qt.AlignRight
onEditingFinished: if (filterRect.x !== parseFloat(text)) { onEditingFinished: if (filterRect.x !== parseFloat(text)) {
filterRect.x = parseFloat(text) filterRect.x = parseFloat(text)
setFilter(getPosition()) setFilter(getPosition())
} }
} }
Label { text: ',' } Label { text: ',' }
TextField { TextField {
id: rectY id: rectY
horizontalAlignment: Qt.AlignRight horizontalAlignment: Qt.AlignRight
onEditingFinished: if (filterRect.y !== parseFloat(text)) { onEditingFinished: if (filterRect.y !== parseFloat(text)) {
filterRect.y = parseFloat(text) filterRect.y = parseFloat(text)
setFilter(getPosition()) setFilter(getPosition())
} }
} }
} }
UndoButton { UndoButton {
onClicked: { onClicked: {
rectX.text = rectY.text = 0 var rect = defaultRect()
filterRect.x = filterRect.y = 0 filterRect.x = rectX.text = rect.x
filterRect.y = rectY.text = rect.y
setFilter(getPosition()) setFilter(getPosition())
} }
} }
KeyframesButton { KeyframesButton {
id: positionKeyframesButton id: positionKeyframesButton
Layout.rowSpan: 2 Layout.rowSpan: 2
checked: filter.keyframeCount(rectProperty) > 0 && filter.animateIn <= 0 && filter.animateOut <= 0 checked: filter.keyframeCount(rectProperty) > 0 && filter.animateIn <= 0 && filter.animateOut <= 0
onToggled: { onToggled: {
if (checked) { if (checked) {
filter.clearSimpleAnimation(rectProperty) filter.clearSimpleAnimation(rectProperty)
skipping to change at line 195 skipping to change at line 208
} }
checked = filter.keyframeCount(rectProperty) > 0 && filter.anima teIn <= 0 && filter.animateOut <= 0 checked = filter.keyframeCount(rectProperty) > 0 && filter.anima teIn <= 0 && filter.animateOut <= 0
} }
} }
Label { Label {
text: qsTr('Size') text: qsTr('Size')
Layout.alignment: Qt.AlignRight Layout.alignment: Qt.AlignRight
} }
RowLayout { RowLayout {
Layout.columnSpan: 3
TextField { TextField {
id: rectW id: rectW
horizontalAlignment: Qt.AlignRight horizontalAlignment: Qt.AlignRight
onEditingFinished: if (filterRect.width !== parseFloat(text)) { onEditingFinished: if (filterRect.width !== parseFloat(text)) {
filterRect.width = parseFloat(text) filterRect.width = parseFloat(text)
setFilter(getPosition()) setFilter(getPosition())
} }
} }
Label { text: 'x' } Label { text: 'x' }
TextField { TextField {
id: rectH id: rectH
horizontalAlignment: Qt.AlignRight horizontalAlignment: Qt.AlignRight
onEditingFinished: if (filterRect.height !== parseFloat(text)) { onEditingFinished: if (filterRect.height !== parseFloat(text)) {
filterRect.height = parseFloat(text) filterRect.height = parseFloat(text)
setFilter(getPosition()) setFilter(getPosition())
} }
} }
} }
UndoButton { UndoButton {
onClicked: { onClicked: {
rectW.text = profile.width / 10 var rect = defaultRect()
rectH.text = profile.height / 10 filterRect.width = rectW.text = rect.width
filterRect.width = profile.width / 10 filterRect.height = rectH.text = rect.height
filterRect.height = profile.height / 10
setFilter(getPosition()) setFilter(getPosition())
} }
} }
Label { Label {
text: qsTr('Blur') text: qsTr('Blur')
Layout.alignment: Qt.AlignRight Layout.alignment: Qt.AlignRight
} }
SliderSpinner { SliderSpinner {
id: amountSlider id: amountSlider
minimumValue: 0 minimumValue: 0
maximumValue: 10.0 maximumValue: 10.0
stepSize: .1 stepSize: .1
decimals: 2 decimals: 2
suffix: ' %' suffix: ' %'
onValueChanged: filter.set("blur", value) onValueChanged: filter.set("blur", value)
} }
UndoButton { UndoButton {
onClicked: amountSlider.value = 20 onClicked: amountSlider.value = 4
} }
Item { Layout.fillWidth: true } Item { width: 1 }
Item { Layout.fillHeight: true } Item { Layout.fillHeight: true }
} }
Connections { Connections {
target: filter target: filter
onChanged: setKeyframedControls() onChanged: setKeyframedControls()
onInChanged: setFilter(null) onInChanged: setFilter(null)
onOutChanged: setFilter(null) onOutChanged: setFilter(null)
onAnimateInChanged: setFilter(null) onAnimateInChanged: setFilter(null)
 End of changes. 10 change blocks. 
13 lines changed or deleted 27 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)