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
78d0ce91
Commit
78d0ce91
authored
May 20, 2020
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add arrow button in track targets to switch stream
parent
71ffcac6
Pipeline
#20636
passed with stage
in 9 minutes and 27 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
1 deletion
+28
-1
src/timeline2/view/qml/TrackHead.qml
src/timeline2/view/qml/TrackHead.qml
+21
-1
src/timeline2/view/timelinecontroller.cpp
src/timeline2/view/timelinecontroller.cpp
+5
-0
src/timeline2/view/timelinecontroller.h
src/timeline2/view/timelinecontroller.h
+2
-0
No files found.
src/timeline2/view/qml/TrackHead.qml
View file @
78d0ce91
...
...
@@ -101,7 +101,7 @@ Rectangle {
}
width
:
2
*
fontMetrics
.
boundingRect
(
"
M
"
).
width
height
:
trackHeadRoot
.
height
verticalAlignment
:
Text
.
Align
VCenter
verticalAlignment
:
Text
.
Align
Top
horizontalAlignment
:
Text
.
AlignHCenter
visible
:
trackHeadRoot
.
isAudio
?
timeline
.
hasAudioTarget
>
0
:
timeline
.
hasVideoTarget
anchors.top
:
parent
.
top
...
...
@@ -134,6 +134,26 @@ Rectangle {
}
}
}
ToolButton
{
focusPolicy
:
Qt
.
NoFocus
visible
:
trackHeadRoot
.
isAudio
&&
timeline
.
clipTargets
>
1
&&
trackHeadRoot
.
height
>
(
2
*
expandButton
.
height
)
background
:
Rectangle
{
color
:
Qt
.
darker
(
trackTarget
.
bgColor
,
1.5
)
border.color
:
activePalette
.
light
}
anchors.bottom
:
parent
.
bottom
width
:
parent
.
width
height
:
width
contentItem
:
Item
{
Image
{
source
:
"
image://icon/go-down
"
anchors.fill
:
parent
}
}
onClicked
:
{
root
.
showTargetMenu
(
trackId
)
}
}
}
ToolTip
{
visible
:
targetArea
.
containsMouse
...
...
src/timeline2/view/timelinecontroller.cpp
View file @
78d0ce91
...
...
@@ -2553,6 +2553,11 @@ int TimelineController::hasAudioTarget() const
return
m_hasAudioTarget
;
}
int
TimelineController
::
clipTargets
()
const
{
return
m_model
->
m_binAudioTargets
.
size
();
}
bool
TimelineController
::
hasVideoTarget
()
const
{
return
m_hasVideoTarget
;
...
...
src/timeline2/view/timelinecontroller.h
View file @
78d0ce91
...
...
@@ -69,6 +69,7 @@ class TimelineController : public QObject
Q_PROPERTY
(
int
hasAudioTarget
READ
hasAudioTarget
NOTIFY
hasAudioTargetChanged
)
Q_PROPERTY
(
bool
hasVideoTarget
READ
hasVideoTarget
NOTIFY
hasVideoTargetChanged
)
Q_PROPERTY
(
int
clipTargets
READ
clipTargets
NOTIFY
hasAudioTargetChanged
)
Q_PROPERTY
(
bool
autoScroll
READ
autoScroll
NOTIFY
autoScrollChanged
)
Q_PROPERTY
(
QColor
videoColor
READ
videoColor
NOTIFY
colorsChanged
)
Q_PROPERTY
(
QColor
audioColor
READ
audioColor
NOTIFY
colorsChanged
)
...
...
@@ -155,6 +156,7 @@ public:
Q_INVOKABLE
const
QString
audioTargetName
(
int
tid
)
const
;
Q_INVOKABLE
int
videoTarget
()
const
;
Q_INVOKABLE
int
hasAudioTarget
()
const
;
Q_INVOKABLE
int
clipTargets
()
const
;
Q_INVOKABLE
bool
hasVideoTarget
()
const
;
Q_INVOKABLE
bool
autoScroll
()
const
;
Q_INVOKABLE
int
activeTrack
()
const
{
return
m_activeTrack
;
}
...
...
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