Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
VideoLAN
VLMC
Commits
bca0bccc
Commit
bca0bccc
authored
Sep 04, 2009
by
Hugo Beauzee-Luyssen
Browse files
Adding a split method for the Clip class
parent
26db1a17
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/Media/Clip.cpp
View file @
bca0bccc
...
...
@@ -157,3 +157,11 @@ void Clip::setEnd( float end )
Q_ASSERT
(
end
<=
1.0
f
);
m_end
=
end
;
}
Clip
*
Clip
::
split
(
float
newEnd
)
{
Clip
*
newClip
=
new
Clip
(
this
,
newEnd
,
m_end
);
m_end
=
newEnd
;
computeLength
();
return
newClip
;
}
src/Media/Clip.h
View file @
bca0bccc
...
...
@@ -99,6 +99,14 @@ class Clip : public QObject
const
QString
&
getNotes
()
const
;
void
setNotes
(
const
QString
&
notes
);
/**
* \brief Split this clip in two parts.
* \param newEnd The new end for this Clip. This will be the beginning of the
* newly created Clip.
* \returns The remaining part as a new Clip.
*/
Clip
*
split
(
float
newEnd
);
private:
void
computeLength
();
...
...
Write
Preview
Supports
Markdown
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