Changeset View
Changeset View
Standalone View
Standalone View
src/monitor/view/kdenlivemonitoreffectscene.qml
Show All 30 Lines | 3 | Item { | |||
---|---|---|---|---|---|
31 | onOffsetxChanged: canvas.requestPaint() | 31 | onOffsetxChanged: canvas.requestPaint() | ||
32 | onOffsetyChanged: canvas.requestPaint() | 32 | onOffsetyChanged: canvas.requestPaint() | ||
33 | property bool iskeyframe | 33 | property bool iskeyframe | ||
34 | property int requestedKeyFrame | 34 | property int requestedKeyFrame | ||
35 | property var centerPoints: [] | 35 | property var centerPoints: [] | ||
36 | property var centerPointsTypes: [] | 36 | property var centerPointsTypes: [] | ||
37 | onCenterPointsChanged: canvas.requestPaint() | 37 | onCenterPointsChanged: canvas.requestPaint() | ||
38 | property bool showToolbar: false | 38 | property bool showToolbar: false | ||
39 | property bool showOpacity: false | ||||
40 | property bool showRotation: false | ||||
39 | signal effectChanged() | 41 | signal effectChanged() | ||
40 | signal centersChanged() | 42 | signal centersChanged() | ||
41 | signal addKeyframe() | 43 | signal addKeyframe() | ||
42 | signal seekToKeyframe() | 44 | signal seekToKeyframe() | ||
43 | signal toolBarChanged(bool doAccept) | 45 | signal toolBarChanged(bool doAccept) | ||
46 | signal opacityChanged(double value) | ||||
47 | signal angleChanged(double value) | ||||
44 | onZoomChanged: { | 48 | onZoomChanged: { | ||
45 | effectToolBar.setZoom(root.zoom) | 49 | effectToolBar.setZoom(root.zoom) | ||
46 | } | 50 | } | ||
47 | onDurationChanged: { | 51 | onDurationChanged: { | ||
48 | timeScale = width / duration | 52 | timeScale = width / duration | ||
49 | if (duration < 200) { | 53 | if (duration < 200) { | ||
50 | frameSize = 5 * timeScale | 54 | frameSize = 5 * timeScale | ||
51 | } else if (duration < 2500) { | 55 | } else if (duration < 2500) { | ||
▲ Show 20 Lines • Show All 473 Lines • ▼ Show 20 Line(s) | 243 | Rectangle { | |||
525 | } | 529 | } | ||
526 | Rectangle { | 530 | Rectangle { | ||
527 | anchors.centerIn: parent | 531 | anchors.centerIn: parent | ||
528 | width: root.iskeyframe ? effectsize.height * 1.5 : effectsize.height / 2 | 532 | width: root.iskeyframe ? effectsize.height * 1.5 : effectsize.height / 2 | ||
529 | height: 1 | 533 | height: 1 | ||
530 | color: framerect.hoverColor | 534 | color: framerect.hoverColor | ||
531 | } | 535 | } | ||
532 | } | 536 | } | ||
537 | | ||||
538 | OpacitySlider { | ||||
539 | id: opacitySlider | ||||
540 | anchors { | ||||
mardelle: The opacityChanged(real) should be defined in the root object (around line 38 of this file)… | |||||
541 | left: parent.left | ||||
542 | top: parent.top | ||||
543 | topMargin: 20 | ||||
544 | leftMargin: 10 | ||||
545 | } | ||||
546 | } | ||||
547 | | ||||
548 | RotationSlider { | ||||
There is no reason to trigger th signal when creating the object. mardelle: There is no reason to trigger th signal when creating the object.
The root.opacityChanged… | |||||
549 | id: rotationSlider | ||||
550 | anchors { | ||||
551 | left: parent.left | ||||
552 | top: parent.top | ||||
553 | topMargin: 40 | ||||
mardelle: Same remark as opacityChanged. Signal should be defined as root signal. | |||||
554 | leftMargin: 10 | ||||
555 | } | ||||
556 | } | ||||
557 | | ||||
mardelle: Extra bracket, remove | |||||
533 | MonitorRuler { | 558 | MonitorRuler { | ||
534 | id: clipMonitorRuler | 559 | id: clipMonitorRuler | ||
535 | anchors { | 560 | anchors { | ||
536 | left: root.left | 561 | left: root.left | ||
mardelle: remove | |||||
537 | right: root.right | 562 | right: root.right | ||
538 | bottom: root.bottom | 563 | bottom: root.bottom | ||
539 | } | 564 | } | ||
540 | height: root.rulerHeight | 565 | height: root.rulerHeight | ||
541 | } | 566 | } | ||
542 | } | 567 | } |
The opacityChanged(real) should be defined in the root object (around line 38 of this file), and not as a child of the Opacity item.
Then, in the Opacity.qml file, you trigger the signal by calling:
root.opacityChanged(value)