Changeset View
Changeset View
Standalone View
Standalone View
src/monitor/view/kdenlivemonitoreffectscene.qml
Show All 22 Lines | 3 | Item { | |||
---|---|---|---|---|---|
23 | onOffsetxChanged: canvas.requestPaint() | 23 | onOffsetxChanged: canvas.requestPaint() | ||
24 | onOffsetyChanged: canvas.requestPaint() | 24 | onOffsetyChanged: canvas.requestPaint() | ||
25 | property bool iskeyframe | 25 | property bool iskeyframe | ||
26 | property int requestedKeyFrame | 26 | property int requestedKeyFrame | ||
27 | property var centerPoints: [] | 27 | property var centerPoints: [] | ||
28 | property var centerPointsTypes: [] | 28 | property var centerPointsTypes: [] | ||
29 | onCenterPointsChanged: canvas.requestPaint() | 29 | onCenterPointsChanged: canvas.requestPaint() | ||
30 | property bool showToolbar: false | 30 | property bool showToolbar: false | ||
31 | property bool showOpacity: false | ||||
32 | property bool showRotation: false | ||||
31 | signal effectChanged() | 33 | signal effectChanged() | ||
32 | signal centersChanged() | 34 | signal centersChanged() | ||
33 | signal addKeyframe() | 35 | signal addKeyframe() | ||
34 | signal seekToKeyframe() | 36 | signal seekToKeyframe() | ||
35 | signal toolBarChanged(bool doAccept) | 37 | signal toolBarChanged(bool doAccept) | ||
38 | signal opacityChanged(real value) | ||||
39 | signal angleChanged() | ||||
36 | onZoomChanged: { | 40 | onZoomChanged: { | ||
37 | effectToolBar.setZoom(root.zoom) | 41 | effectToolBar.setZoom(root.zoom) | ||
38 | } | 42 | } | ||
39 | 43 | | |||
40 | Text { | 44 | Text { | ||
41 | id: fontReference | 45 | id: fontReference | ||
42 | property int fontSize | 46 | property int fontSize | ||
43 | fontSize: font.pointSize | 47 | fontSize: font.pointSize | ||
▲ Show 20 Lines • Show All 461 Lines • ▼ Show 20 Line(s) | 223 | Rectangle { | |||
505 | } | 509 | } | ||
506 | Rectangle { | 510 | Rectangle { | ||
507 | anchors.centerIn: parent | 511 | anchors.centerIn: parent | ||
508 | width: root.iskeyframe ? effectsize.height * 1.5 : effectsize.height / 2 | 512 | width: root.iskeyframe ? effectsize.height * 1.5 : effectsize.height / 2 | ||
509 | height: 1 | 513 | height: 1 | ||
510 | color: framerect.hoverColor | 514 | color: framerect.hoverColor | ||
511 | } | 515 | } | ||
512 | } | 516 | } | ||
517 | | ||||
518 | Opacity { | ||||
519 | id: opacity | ||||
520 | anchors { | ||||
mardelle: The opacityChanged(real) should be defined in the root object (around line 38 of this file)… | |||||
521 | left: parent.left | ||||
522 | top: parent.top | ||||
523 | topMargin: 20 | ||||
524 | leftMargin: 10 | ||||
525 | } | ||||
526 | } | ||||
527 | | ||||
528 | Rotation { | ||||
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… | |||||
529 | id: rotation | ||||
530 | anchors { | ||||
531 | left: parent.left | ||||
532 | top: parent.top | ||||
533 | topMargin: 30 | ||||
mardelle: Same remark as opacityChanged. Signal should be defined as root signal. | |||||
534 | leftMargin: 10 | ||||
535 | } | ||||
536 | } | ||||
537 | } | ||||
mardelle: Extra bracket, remove | |||||
513 | } | 538 | } | ||
mardelle: remove |
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)