Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Multimedia
Kdenlive
Commits
570e524b
Commit
570e524b
authored
Apr 16, 2020
by
Sashmita Raghav
Committed by
Jean-Baptiste Mardelle
Apr 16, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add proxy icon to clips in timeline
parent
c2325f34
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
0 deletions
+40
-0
src/timeline2/model/timelineitemmodel.cpp
src/timeline2/model/timelineitemmodel.cpp
+5
-0
src/timeline2/model/timelinemodel.hpp
src/timeline2/model/timelinemodel.hpp
+1
-0
src/timeline2/view/qml/Clip.qml
src/timeline2/view/qml/Clip.qml
+28
-0
src/timeline2/view/qml/Track.qml
src/timeline2/view/qml/Track.qml
+6
-0
No files found.
src/timeline2/model/timelineitemmodel.cpp
View file @
570e524b
...
...
@@ -190,6 +190,7 @@ QHash<int, QByteArray> TimelineItemModel::roleNames() const
QHash
<
int
,
QByteArray
>
roles
;
roles
[
NameRole
]
=
"name"
;
roles
[
ResourceRole
]
=
"resource"
;
roles
[
IsProxyRole
]
=
"isProxy"
;
roles
[
ServiceRole
]
=
"mlt_service"
;
roles
[
BinIdRole
]
=
"binId"
;
roles
[
TrackIdRole
]
=
"trackId"
;
...
...
@@ -269,6 +270,10 @@ QVariant TimelineItemModel::data(const QModelIndex &index, int role) const
}
return
result
;
}
case
IsProxyRole
:
{
QString
proxy
=
clip
->
getProperty
(
"kdenlive:proxy"
);
return
proxy
.
size
()
>
2
;
}
case
FakeTrackIdRole
:
return
clip
->
getFakeTrackId
();
case
FakePositionRole
:
...
...
src/timeline2/model/timelinemodel.hpp
View file @
570e524b
...
...
@@ -114,6 +114,7 @@ public:
enum
{
NameRole
=
Qt
::
UserRole
+
1
,
ResourceRole
,
/// clip only
IsProxyRole
,
/// clip only
ServiceRole
,
/// clip only
StartRole
,
/// clip only
BinIdRole
,
/// clip only
...
...
src/timeline2/view/qml/Clip.qml
View file @
570e524b
...
...
@@ -31,6 +31,7 @@ Rectangle {
property
string
clipResource
:
''
property
string
mltService
:
''
property
string
effectNames
property
bool
isProxy
:
false
property
int
modelStart
property
real
scrollX
:
0
property
int
inPoint
:
0
...
...
@@ -663,6 +664,33 @@ Rectangle {
styleColor
:
'
black
'
}
}
Rectangle
{
//proxy
id
:
proxyRect
color
:
'
yellow
'
width
:
labelRect
.
height
height
:
labelRect
.
height
x
:
labelRect
.
x
anchors.top
:
labelRect
.
top
anchors.left
:
labelRect
.
right
visible
:
clipRoot
.
isProxy
&&
!
clipRoot
.
isAudio
Text
{
// Proxy P
id
:
proxyLabel
text
:
"
P
"
font.pointSize
:
root
.
fontUnit
+
1
visible
:
proxyRect
.
visible
anchors
{
top
:
proxyRect
.
top
left
:
proxyRect
.
left
leftMargin
:
(
labelRect
.
height
-
proxyLabel
.
width
)
/
2
topMargin
:
(
labelRect
.
height
-
proxyLabel
.
height
)
/
2
}
color
:
'
black
'
styleColor
:
'
black
'
}
}
}
KeyframeView
{
...
...
src/timeline2/view/qml/Track.qml
View file @
570e524b
...
...
@@ -188,6 +188,12 @@ Item{
value
:
model
.
resource
when
:
loader
.
status
==
Loader
.
Ready
&&
isClip
(
model
.
clipType
)
}
Binding
{
target
:
loader
.
item
property
:
"
isProxy
"
value
:
model
.
isProxy
when
:
loader
.
status
==
Loader
.
Ready
&&
isClip
(
model
.
clipType
)
}
Binding
{
target
:
loader
.
item
property
:
"
maxDuration
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment