Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Kdenlive
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
258
Issues
258
List
Boards
Labels
Service Desk
Milestones
Merge Requests
15
Merge Requests
15
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Multimedia
Kdenlive
Commits
c743a878
Commit
c743a878
authored
Apr 02, 2019
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Revert "Merge branch '1904'""
This reverts commit
2518ec46
.
parent
2518ec46
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
31 additions
and
15 deletions
+31
-15
src/timeline2/model/timelineitemmodel.cpp
src/timeline2/model/timelineitemmodel.cpp
+2
-0
src/timeline2/view/qml/Track.qml
src/timeline2/view/qml/Track.qml
+0
-1
src/timeline2/view/qml/TrackHead.qml
src/timeline2/view/qml/TrackHead.qml
+7
-8
src/timeline2/view/qml/timeline.qml
src/timeline2/view/qml/timeline.qml
+2
-6
src/timeline2/view/timelinecontroller.cpp
src/timeline2/view/timelinecontroller.cpp
+17
-0
src/timeline2/view/timelinecontroller.h
src/timeline2/view/timelinecontroller.h
+3
-0
No files found.
src/timeline2/model/timelineitemmodel.cpp
View file @
c743a878
...
...
@@ -452,6 +452,8 @@ void TimelineItemModel::setTrackProperty(int trackId, const QString &name, const
roles
.
push_back
(
TrackActiveRole
);
}
else
if
(
name
==
QLatin1String
(
"kdenlive:thumbs_format"
))
{
roles
.
push_back
(
ThumbsFormatRole
);
}
else
if
(
name
==
QLatin1String
(
"kdenlive:collapsed"
))
{
roles
.
push_back
(
HeightRole
);
}
else
if
(
name
==
QLatin1String
(
"kdenlive:audio_rec"
))
{
roles
.
push_back
(
AudioRecordRole
);
}
...
...
src/timeline2/view/qml/Track.qml
View file @
c743a878
...
...
@@ -33,7 +33,6 @@ Column{
property
int
trackInternalId
:
-
42
property
int
trackThumbsFormat
property
int
itemType
:
0
height
:
parent
.
height
/*function redrawWaveforms() {
for (var i = 0; i < repeater.count; i++)
...
...
src/timeline2/view/qml/TrackHead.qml
View file @
c743a878
...
...
@@ -45,10 +45,6 @@ Rectangle {
border.color
:
root
.
frameColor
signal
clicked
()
onCollapsedChanged
:
{
resizer
.
y
=
trackHeadRoot
.
height
-
resizer
.
height
}
function
pulseLockButton
()
{
flashLock
.
restart
();
}
...
...
@@ -463,11 +459,14 @@ Rectangle {
}
onReleased
:
{
root
.
stopScrolling
=
false
parent
.
opacity
=
0
parent
.
y
=
trackHeadRoot
.
height
-
parent
.
height
//resizer.y = spacer.y + spacer.height
if
(
!
trimInMouseArea
.
containsMouse
)
{
parent
.
opacity
=
0
}
if
(
mouse
.
modifiers
&
Qt
.
ShiftModifier
)
{
timeline
.
adjustAllTrackHeight
(
trackHeadRoot
.
trackId
,
trackHeadRoot
.
myTrackHeight
)
}
}
onEntered
:
parent
.
opacity
=
0.
5
onEntered
:
parent
.
opacity
=
0.
3
onExited
:
parent
.
opacity
=
0
onPositionChanged
:
{
if
(
mouse
.
buttons
===
Qt
.
LeftButton
)
{
...
...
src/timeline2/view/qml/timeline.qml
View file @
c743a878
...
...
@@ -646,16 +646,13 @@ Rectangle {
effectNames
:
model
.
effectNames
isStackEnabled
:
model
.
isStackEnabled
width
:
headerWidth
height
:
model
.
trackHeight
current
:
item
===
timeline
.
activeTrack
trackId
:
item
height
:
model
.
trackHeight
onIsLockedChanged
:
tracksRepeater
.
itemAt
(
index
).
isLocked
=
isLocked
collapsed
:
height
<=
collapsedHeight
onMyTrackHeightChanged
:
{
trackBaseRepeater
.
itemAt
(
index
).
height
=
myTrackHeight
tracksRepeater
.
itemAt
(
index
).
height
=
myTrackHeight
height
=
myTrackHeight
collapsed
=
height
<=
collapsedHeight
collapsed
=
myTrackHeight
<=
collapsedHeight
if
(
!
collapsed
)
{
controller
.
setTrackProperty
(
trackId
,
"
kdenlive:trackheight
"
,
myTrackHeight
)
controller
.
setTrackProperty
(
trackId
,
"
kdenlive:collapsed
"
,
"
0
"
)
...
...
@@ -1281,7 +1278,6 @@ Rectangle {
delegate
:
Track
{
trackModel
:
multitrack
rootIndex
:
trackDelegateModel
.
modelIndex
(
index
)
height
:
trackHeight
timeScale
:
timeline
.
scaleFactor
width
:
tracksContainerArea
.
width
isAudio
:
audio
...
...
src/timeline2/view/timelinecontroller.cpp
View file @
c743a878
...
...
@@ -676,6 +676,23 @@ void TimelineController::showTrackAsset(int trackId)
emit
showItemEffectStack
(
getTrackNameFromIndex
(
trackId
),
m_model
->
getTrackEffectStackModel
(
trackId
),
pCore
->
getCurrentFrameSize
(),
false
);
}
void
TimelineController
::
adjustAllTrackHeight
(
int
trackId
,
int
height
)
{
bool
isAudio
=
m_model
->
getTrackById_const
(
trackId
)
->
isAudioTrack
();
auto
it
=
m_model
->
m_allTracks
.
cbegin
();
while
(
it
!=
m_model
->
m_allTracks
.
cend
())
{
int
target_track
=
(
*
it
)
->
getId
();
if
(
target_track
!=
trackId
&&
m_model
->
getTrackById_const
(
target_track
)
->
isAudioTrack
()
==
isAudio
)
{
m_model
->
getTrackById
(
target_track
)
->
setProperty
(
QStringLiteral
(
"kdenlive:trackheight"
),
QString
::
number
(
height
));
}
++
it
;
}
int
tracksCount
=
m_model
->
getTracksCount
();
QModelIndex
modelStart
=
m_model
->
makeTrackIndexFromID
(
m_model
->
getTrackIndexFromPosition
(
0
));
QModelIndex
modelEnd
=
m_model
->
makeTrackIndexFromID
(
m_model
->
getTrackIndexFromPosition
(
tracksCount
-
1
));
m_model
->
dataChanged
(
modelStart
,
modelEnd
,
{
TimelineModel
::
HeightRole
});
}
void
TimelineController
::
setPosition
(
int
position
)
{
setSeekPosition
(
position
);
...
...
src/timeline2/view/timelinecontroller.h
View file @
c743a878
...
...
@@ -246,6 +246,9 @@ public:
*/
Q_INVOKABLE
void
showAsset
(
int
id
);
Q_INVOKABLE
void
showTrackAsset
(
int
trackId
);
/* @brief Adjust height of all simlar (audio or video) tracks
*/
Q_INVOKABLE
void
adjustAllTrackHeight
(
int
trackId
,
int
height
);
Q_INVOKABLE
bool
exists
(
int
itemId
);
...
...
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