Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kdenlive
Commits
0fb7ba92
Commit
0fb7ba92
authored
Jan 31, 2020
by
Jean-Baptiste Mardelle
Browse files
Get rid of remaining qml1 in timeline
parent
14f47e39
Pipeline
#14250
passed with stage
in 14 minutes and 57 seconds
Changes
7
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/bin/model/markerlistmodel.cpp
View file @
0fb7ba92
...
...
@@ -463,7 +463,9 @@ bool MarkerListModel::editMarkerGui(const GenTime &pos, QWidget *parent, bool cr
{
bool
exists
;
auto
marker
=
getMarker
(
pos
,
&
exists
);
Q_ASSERT
(
exists
||
createIfNotFound
);
if
(
!
exists
&&
!
createIfNotFound
)
{
pCore
->
displayMessage
(
i18n
(
"No guide found at current position"
),
InformationMessage
);
}
if
(
!
exists
&&
createIfNotFound
)
{
marker
=
CommentedTime
(
pos
,
QString
());
...
...
src/timeline2/view/qml/ClipMenu.qml
deleted
100644 → 0
View file @
14f47e39
import
QtQuick
2.11
import
QtQuick
.
Controls
1.4
import
com
.
enums
1.0
Menu
{
id
:
clipMenu
property
int
clipId
property
int
clipFrame
property
int
clipStatus
property
int
trackId
property
bool
grouped
property
bool
canBeAudio
property
bool
canBeVideo
property
bool
hasActiveTrack
property
bool
canBeGrouped
:
timeline
.
isInSelection
(
clipId
)
onAboutToHide
:
{
timeline
.
ungrabHack
()
}
onAboutToShow
:
{
canBeGrouped
=
timeline
.
isInSelection
(
clipId
)
hasActiveTrack
=
timeline
.
hasActiveTracks
()
}
MenuItem
{
text
:
i18n
(
"
Copy
"
)
iconName
:
'
edit-copy
'
onTriggered
:
{
root
.
copiedClip
=
clipId
timeline
.
copyItem
()
}
}
MenuItem
{
visible
:
canBeGrouped
text
:
i18n
(
"
Group
"
)
iconName
:
'
object-group
'
onTriggered
:
timeline
.
triggerAction
(
'
group_clip
'
)
}
MenuItem
{
visible
:
grouped
text
:
i18n
(
"
Ungroup
"
)
iconName
:
'
object-ungroup
'
onTriggered
:
timeline
.
unGroupSelection
(
clipId
)
}
MenuItem
{
text
:
i18n
(
"
Edit Duration
"
)
iconName
:
'
measure
'
onTriggered
:
{
timeline
.
editItemDuration
(
clipId
)
}
}
MenuItem
{
visible
:
root
.
copiedClip
!=
-
1
&&
root
.
copiedClip
!=
clipId
text
:
i18n
(
"
Paste Effects
"
)
iconName
:
'
edit-paste
'
onTriggered
:
timeline
.
pasteEffects
(
clipId
)
}
MenuSeparator
{
visible
:
true
}
MenuItem
{
text
:
i18n
(
"
Split Audio
"
)
onTriggered
:
timeline
.
splitAudio
(
clipId
)
visible
:
!
grouped
&&
canBeAudio
&&
clipStatus
==
ClipState
.
VideoOnly
}
MenuItem
{
text
:
i18n
(
"
Split Video
"
)
onTriggered
:
timeline
.
splitVideo
(
clipId
)
visible
:
!
grouped
&&
canBeVideo
&&
clipStatus
==
ClipState
.
AudioOnly
}
Menu
{
title
:
i18n
(
"
Markers
"
)
MenuItem
{
text
:
i18n
(
"
Add Marker
"
)
onTriggered
:
timeline
.
addMarker
(
clipId
)
}
MenuItem
{
text
:
i18n
(
"
Add Marker/Guide quickly
"
)
onTriggered
:
timeline
.
addQuickMarker
(
clipId
)
}
MenuItem
{
text
:
i18n
(
"
Edit Marker
"
)
onTriggered
:
timeline
.
editMarker
(
clipId
)
}
MenuItem
{
text
:
i18n
(
"
Delete Marker
"
)
onTriggered
:
timeline
.
deleteMarker
(
clipId
)
}
MenuItem
{
text
:
i18n
(
"
Delete All Markers
"
)
onTriggered
:
timeline
.
deleteAllMarkers
(
clipId
)
}
}
MenuItem
{
text
:
i18n
(
"
Set Audio Reference
"
)
onTriggered
:
timeline
.
setAudioRef
(
clipId
)
visible
:
canBeAudio
}
MenuItem
{
text
:
i18n
(
"
Align Audio
"
)
onTriggered
:
timeline
.
alignAudio
(
clipId
)
visible
:
canBeAudio
}
MenuItem
{
text
:
i18n
(
"
Remove
"
)
iconName
:
'
edit-delete
'
onTriggered
:
timeline
.
triggerAction
(
'
delete_timeline_clip
'
)
}
MenuItem
{
enabled
:
hasActiveTrack
visible
:
true
text
:
i18n
(
"
Extract Clip
"
)
iconName
:
'
timeline-extract
'
onTriggered
:
timeline
.
extract
(
clipId
)
}
MenuSeparator
{
visible
:
true
}
MenuItem
{
visible
:
true
text
:
i18n
(
"
Change Speed
"
)
onTriggered
:
{
timeline
.
changeItemSpeed
(
clipId
,
-
1
)
}
}
MenuItem
{
text
:
i18n
(
"
Clip in Project Bin
"
)
onTriggered
:
timeline
.
triggerAction
(
'
clip_in_project_tree
'
)
}
MenuItem
{
visible
:
true
text
:
i18n
(
"
Split At Playhead
"
)
onTriggered
:
timeline
.
triggerAction
(
'
cut_timeline_clip
'
)
}
MenuItem
{
visible
:
true
text
:
clipStatus
!=
ClipState
.
Disabled
?
i18n
(
"
Disable clip
"
)
:
i18n
(
"
Enable clip
"
)
onTriggered
:
timeline
.
switchEnableState
(
clipId
)
}
AssetMenu
{
title
:
i18n
(
"
Insert an effect...
"
)
menuModel
:
effectModel
onAssetSelected
:
{
timeline
.
addEffectToClip
(
assetId
,
clipId
)
}
}
AssetMenu
{
title
:
i18n
(
"
Insert a composition...
"
)
menuModel
:
transitionModel
isTransition
:
true
onAssetSelected
:
{
timeline
.
addCompositionToClip
(
assetId
,
clipId
,
clipFrame
)
}
}
}
src/timeline2/view/qml/CompositionMenu.qml
deleted
100644 → 0
View file @
14f47e39
import
QtQuick
2.11
import
QtQuick
.
Controls
1.4
Menu
{
id
:
compositionMenu
property
int
clipId
property
int
clipStatus
property
int
trackId
property
bool
grouped
onAboutToHide
:
{
timeline
.
ungrabHack
()
}
function
show
()
{
//mergeItem.visible = timeline.mergeClipWithNext(trackIndex, index, true)
popup
()
}
MenuItem
{
visible
:
!
grouped
&&
timeline
.
selection
.
length
>
1
text
:
i18n
(
"
Group
"
)
iconName
:
'
object-group
'
onTriggered
:
timeline
.
groupSelection
()
}
MenuItem
{
visible
:
grouped
text
:
i18n
(
"
Ungroup
"
)
iconName
:
'
object-ungroup
'
onTriggered
:
timeline
.
unGroupSelection
(
clipId
)
}
MenuItem
{
text
:
i18n
(
"
Edit Duration
"
)
iconName
:
'
measure
'
onTriggered
:
{
timeline
.
editItemDuration
(
clipId
)
}
}
MenuItem
{
visible
:
true
text
:
i18n
(
"
Copy
"
)
iconName
:
'
edit-copy
'
onTriggered
:
{
root
.
copiedClip
=
clipId
timeline
.
copyItem
()
}
}
MenuItem
{
text
:
i18n
(
"
Remove
"
)
iconName
:
'
edit-delete
'
onTriggered
:
timeline
.
triggerAction
(
'
delete_timeline_clip
'
)
}
MenuSeparator
{
visible
:
true
}
}
src/timeline2/view/qml/Ruler.qml
View file @
0fb7ba92
...
...
@@ -18,7 +18,6 @@
import
QtQuick
2.11
import
QtQuick
.
Controls
2.4
import
QtQuick
.
Controls
.
Styles
1.4
Rectangle
{
id
:
rulerRoot
...
...
src/timeline2/view/qml/TrackHead.qml
View file @
0fb7ba92
...
...
@@ -17,10 +17,7 @@
*/
import
QtQuick
2.11
import
QtQuick
.
Controls
1.4
import
QtQuick
.
Controls
2.4
as
NEWQML
import
QtQuick
.
Controls
.
Styles
1.4
import
QtQuick
.
Layouts
1.11
import
QtQuick
.
Controls
2.4
Rectangle
{
id
:
trackHeadRoot
...
...
@@ -86,11 +83,6 @@ Rectangle {
onPressed
:
{
parent
.
clicked
()
if
(
mouse
.
button
==
Qt
.
RightButton
)
{
/*headerMenu.trackId = trackId
headerMenu.thumbsFormat = thumbsFormat
headerMenu.audioTrack = trackHeadRoot.isAudio
headerMenu.recEnabled = trackHeadRoot.showAudioRecord
headerMenu.popup()*/
root
.
showHeaderMenu
()
}
}
...
...
@@ -102,17 +94,13 @@ Rectangle {
}
}
}
ColumnLayout
{
Item
{
id
:
targetColumn
width
:
track
TagLabel
.
width
*
.
5
width
:
track
HeadRoot
.
iconSize
*
.
4
height
:
trackHeadRoot
.
height
Item
{
width
:
parent
.
width
Layout.fillHeight
:
true
Layout.topMargin
:
1
Layout.bottomMargin
:
1
Layout.leftMargin
:
1
Layout.alignment
:
Qt
.
AlignVCenter
anchors.fill
:
parent
anchors.margins
:
1
Rectangle
{
id
:
trackTarget
color
:
'
grey
'
...
...
@@ -141,7 +129,7 @@ Rectangle {
}
}
}
NEWQML.
ToolTip
{
ToolTip
{
visible
:
targetArea
.
containsMouse
font.pixelSize
:
root
.
baseUnit
delay
:
1500
...
...
@@ -192,123 +180,136 @@ Rectangle {
}
}
}
ColumnLayout
{
Item
{
id
:
trackHeadColumn
spacing
:
0
anchors.fill
:
parent
anchors.leftMargin
:
targetColumn
.
width
anchors.topMargin
:
0
RowLayout
{
spacing
:
0
Layout.leftMargin
:
1
ToolButton
{
id
:
expandButton
implicitHeight
:
trackHeadRoot
.
iconSize
implicitWidth
:
trackHeadRoot
.
iconSize
iconName
:
trackHeadRoot
.
collapsed
?
'
arrow-right
'
:
'
arrow-down
'
onClicked
:
{
trackHeadRoot
.
myTrackHeight
=
trackHeadRoot
.
collapsed
?
Math
.
max
(
collapsedHeight
*
1.5
,
controller
.
getTrackProperty
(
trackId
,
"
kdenlive:trackheight
"
))
:
collapsedHeight
ToolButton
{
id
:
expandButton
anchors.left
:
trackHeadColumn
.
left
implicitHeight
:
trackHeadRoot
.
iconSize
implicitWidth
:
trackHeadRoot
.
iconSize
icon.name
:
trackHeadRoot
.
collapsed
?
'
arrow-right
'
:
'
arrow-down
'
onClicked
:
{
trackHeadRoot
.
myTrackHeight
=
trackHeadRoot
.
collapsed
?
Math
.
max
(
collapsedHeight
*
1.5
,
controller
.
getTrackProperty
(
trackId
,
"
kdenlive:trackheight
"
))
:
collapsedHeight
}
ToolTip
{
visible
:
expandButton
.
hovered
font.pixelSize
:
root
.
baseUnit
delay
:
1500
timeout
:
5000
background
:
Rectangle
{
color
:
activePalette
.
alternateBase
border.color
:
activePalette
.
light
}
contentItem
:
Label
{
color
:
activePalette
.
text
text
:
trackLabel
.
visible
?
i18n
(
"
Minimize
"
)
:
i18n
(
"
Expand
"
)
}
tooltip
:
trackLabel
.
visible
?
i18n
(
"
Minimize
"
)
:
i18n
(
"
Expand
"
)
}
Item
{
width
:
trackTagLabel
.
contentWidth
+
4
height
:
width
Layout.topMargin
:
1
Rectangle
{
id
:
trackLed
color
:
Qt
.
darker
(
trackHeadRoot
.
color
,
0.55
)
}
Item
{
id
:
tagContainer
anchors.left
:
expandButton
.
right
width
:
trackHeadRoot
.
iconSize
height
:
trackHeadRoot
.
iconSize
//Layout.topMargin: 1
Rectangle
{
id
:
trackLed
color
:
Qt
.
darker
(
trackHeadRoot
.
color
,
0.55
)
anchors.fill
:
parent
anchors.margins
:
trackHeadRoot
.
iconSize
/
8
border.width
:
0
Text
{
id
:
trackTagLabel
text
:
trackHeadRoot
.
trackTag
anchors.fill
:
parent
width
:
height
border.width
:
0
Text
{
id
:
trackTagLabel
text
:
trackHeadRoot
.
trackTag
anchors.fill
:
parent
font.pointSize
:
root
.
fontUnit
font.pointSize
:
root
.
fontUnit
color
:
activePalette
.
text
verticalAlignment
:
Text
.
AlignVCenter
horizontalAlignment
:
Text
.
AlignHCenter
}
MouseArea
{
id
:
tagMouseArea
anchors.fill
:
parent
hoverEnabled
:
true
cursorShape
:
Qt
.
PointingHandCursor
onClicked
:
{
timeline
.
switchTrackActive
(
trackHeadRoot
.
trackId
)
}
}
ToolTip
{
visible
:
tagMouseArea
.
containsMouse
font.pixelSize
:
root
.
baseUnit
delay
:
1500
timeout
:
5000
background
:
Rectangle
{
color
:
activePalette
.
alternateBase
border.color
:
activePalette
.
light
}
contentItem
:
Label
{
color
:
activePalette
.
text
verticalAlignment
:
Text
.
AlignVCenter
horizontalAlignment
:
Text
.
AlignHCenter
text
:
i18n
(
"
Click to make track active/inactive. Active tracks will react to editing operations
"
)
}
MouseArea
{
id
:
tagMouseArea
anchors.fill
:
parent
hoverEnabled
:
true
cursorShape
:
Qt
.
PointingHandCursor
onClicked
:
{
timeline
.
switchTrackActive
(
trackHeadRoot
.
trackId
)
}
}
NEWQML.ToolTip
{
visible
:
tagMouseArea
.
containsMouse
font.pixelSize
:
root
.
baseUnit
delay
:
1500
timeout
:
5000
background
:
Rect
ang
l
e
{
color
:
activePalette
.
alternateBase
border.color
:
activePalette
.
light
state
:
'
normalled
'
states
:
[
State
{
name
:
'
locked
'
when
:
trackHeadRoot
.
isLocked
PropertyCh
ange
s
{
target
:
trackLed
color
:
'
red
'
}
contentItem
:
Label
{
color
:
activePalette
.
text
text
:
i18n
(
"
Click to make track active/inactive. Active tracks will react to editing operations
"
)
},
State
{
name
:
'
active
'
when
:
trackHeadRoot
.
isActive
PropertyChanges
{
target
:
trackLed
color
:
timeline
.
targetColor
}
}
state
:
'
normalled
'
states
:
[
State
{
name
:
'
locked
'
when
:
trackHeadRoot
.
isLocked
PropertyChanges
{
target
:
trackLed
color
:
'
red
'
}
},
State
{
name
:
'
active
'
when
:
trackHeadRoot
.
isActive
PropertyChanges
{
target
:
trackLed
color
:
timeline
.
targetColor
}
PropertyChanges
{
target
:
trackTagLabel
color
:
timeline
.
targetTextColor
}
},
State
{
name
:
'
inactive
'
when
:
!
trackHeadRoot
.
isLocked
&&
!
trackHeadRoot
.
isActive
PropertyChanges
{
target
:
trackLed
color
:
Qt
.
darker
(
trackHeadRoot
.
color
,
0.55
)
}
PropertyChanges
{
target
:
trackTagLabel
color
:
timeline
.
targetTextColor
}
]
transitions
:
[
Transition
{
to
:
'
*
'
ColorAnimation
{
target
:
trackLed
;
duration
:
300
}
},
State
{
name
:
'
inactive
'
when
:
!
trackHeadRoot
.
isLocked
&&
!
trackHeadRoot
.
isActive
PropertyChanges
{
target
:
trackLed
color
:
Qt
.
darker
(
trackHeadRoot
.
color
,
0.55
)
}
]
}
}
Item
{
// Spacer
width
:
2
}
Label
{
text
:
trackHeadRoot
.
trackName
font.pixelSize
:
root
.
baseUnit
verticalAlignment
:
Text
.
AlignVCenter
horizontalAlignment
:
Text
.
AlignHCenter
visible
:
trackHeadRoot
.
collapsed
&&
trackHeadRoot
.
width
>
trackTarget
.
width
+
expandButton
.
width
+
trackTagLabel
.
width
+
(
5
*
muteButton
.
width
)
}
Item
{
// Spacer
Layout.fillWidth
:
true
}
]
transitions
:
[
Transition
{
to
:
'
*
'
ColorAnimation
{
target
:
trackLed
;
duration
:
300
}
}
]
}
}
Label
{
anchors.left
:
tagContainer
.
right
anchors.leftMargin
:
2
anchors.verticalCenter
:
parent
.
verticalCenter
text
:
trackHeadRoot
.
trackName
font.pixelSize
:
root
.
baseUnit
verticalAlignment
:
Text
.
AlignVCenter
horizontalAlignment
:
Text
.
AlignHCenter
visible
:
trackHeadRoot
.
collapsed
&&
trackHeadRoot
.
width
>
trackTarget
.
width
+
expandButton
.
width
+
trackTagLabel
.
width
+
(
4
*
muteButton
.
width
)
+
4
}
Row
{
width
:
childrenRect
.
width
x
:
Math
.
max
(
2
*
trackHeadRoot
.
iconSize
+
2
,
parent
.
width
-
width
-
4
)
spacing
:
0
ToolButton
{
iconName
:
'
tools-wizard
'
id
:
effectButton
icon.name
:
'
tools-wizard
'
checkable
:
true
enabled
:
trackHeadRoot
.
effectNames
!=
''
checked
:
enabled
&&
trackHeadRoot
.
isStackEnabled
...
...
@@ -323,20 +324,46 @@ Rectangle {
id
:
muteButton
implicitHeight
:
trackHeadRoot
.
iconSize
implicitWidth
:
trackHeadRoot
.
iconSize
icon
N
ame
:
isAudio
?
(
isDisabled
?
'
kdenlive-hide-audio
'
:
'
kdenlive-show-audio
'
)
:
(
isDisabled
?
'
kdenlive-hide-video
'
:
'
kdenlive-show-video
'
)
icon
S
ource
:
isAudio
?
(
isDisabled
?
'
qrc:///pics/kdenlive-hide-audio.svgz
'
:
'
qrc:///pics/kdenlive-show-audio.svgz
'
)
:
(
isDisabled
?
'
qrc:///pics/kdenlive-hide-video.svgz
'
:
'
qrc:///pics/kdenlive-show-video.svgz
'
)
icon
.n
ame
:
isAudio
?
(
isDisabled
?
'
kdenlive-hide-audio
'
:
'
kdenlive-show-audio
'
)
:
(
isDisabled
?
'
kdenlive-hide-video
'
:
'
kdenlive-show-video
'
)
icon
.s
ource
:
isAudio
?
(
isDisabled
?
'
qrc:///pics/kdenlive-hide-audio.svgz
'
:
'
qrc:///pics/kdenlive-show-audio.svgz
'
)
:
(
isDisabled
?
'
qrc:///pics/kdenlive-hide-video.svgz
'
:
'
qrc:///pics/kdenlive-show-video.svgz
'
)
onClicked
:
controller
.
setTrackProperty
(
trackId
,
"
hide
"
,
isDisabled
?
(
isAudio
?
'
1
'
:
'
2
'
)
:
'
3
'
)
tooltip
:
isAudio
?
(
isDisabled
?
i18n
(
"
Unmute
"
)
:
i18n
(
"
Mute
"
))
:
(
isDisabled
?
i18n
(
"
Show
"
)
:
i18n
(
"
Hide
"
))
ToolTip
{
visible
:
muteButton
.
hovered
font.pixelSize
:
root
.
baseUnit
delay
:
1500
timeout
:
5000
background
:
Rectangle
{
color
:
activePalette
.
alternateBase
border.color
:
activePalette
.
light
}
contentItem
:
Label
{
color
:
activePalette
.
text
text
:
isAudio
?
(
isDisabled
?
i18n
(
"
Unmute
"
)
:
i18n
(
"
Mute
"
))
:
(
isDisabled
?
i18n
(
"
Show
"
)
:
i18n
(
"
Hide
"
))
}
}
}
ToolButton
{
id
:
lockButton
implicitHeight
:
trackHeadRoot
.
iconSize
implicitWidth
:
trackHeadRoot
.
iconSize
icon
N
ame
:
isLocked
?
'
kdenlive-lock
'
:
'
kdenlive-unlock
'
icon
S
ource
:
isLocked
?
'
qrc:///pics/kdenlive-lock.svg
'
:
'
qrc:///pics/kdenlive-unlock.svg
'
icon
.n
ame
:
isLocked
?
'
kdenlive-lock
'
:
'
kdenlive-unlock
'
icon
.s
ource
:
isLocked
?
'
qrc:///pics/kdenlive-lock.svg
'
:
'
qrc:///pics/kdenlive-unlock.svg
'
onClicked
:
controller
.
setTrackLockedState
(
trackId
,
!
isLocked
)
tooltip
:
isLocked
?
i18n
(
"
Unlock track
"
)
:
i18n
(
"
Lock track
"
)
ToolTip
{
visible
:
lockButton
.
hovered
font.pixelSize
:
root
.
baseUnit
delay
:
1500
timeout
:
5000
background
:
Rectangle
{
color
:
activePalette
.
alternateBase
border.color
:
activePalette
.
light
}
contentItem
:
Label
{
color
:
activePalette
.
text
text
:
isLocked
?
i18n
(
"
Unlock track
"
)
:
i18n
(
"
Lock track
"
)
}
}
SequentialAnimation
{
id
:
flashLock
...
...
@@ -355,32 +382,20 @@ Rectangle {
}
}
}
Layout.rightMargin
:
4
}
RowLayout
{
id
:
recLayout
Layout.maximumHeight
:
showAudioRecord
?
-
1
:
0
Loader
{
id
:
audioVuMeter
Layout.fillWidth
:
true
Layout.rightMargin
:
2
Layout.leftMargin
:
4
visible
:
showAudioRecord
&&
(
trackHeadRoot
.
height
>=
2
*
muteButton
.
height
+
resizer
.
height
)
source
:
isAudio
&&
showAudioRecord
?
"
AudioLevels.qml
"
:
""
onLoaded
:
item
.
trackId
=
trackId
}
}
RowLayout
{
Item
{
anchors.bottom
:
trackHeadColumn
.
bottom
anchors.left
:
trackHeadColumn
.
left