Commit 015a7937 authored by Clement CHAVANCE's avatar Clement CHAVANCE

Creating clip from the preview widget is done

parent cb97a475
......@@ -176,3 +176,17 @@ void PreviewWidget::markerStopClicked()
{
m_ui->rulerWidget->setMarker( PreviewRuler::STOP );
}
void PreviewWidget::createNewClipFromMarkers()
{
Media* selectedMedia = m_renderer->getMedia();
qint64 beg = m_ui.rulerWidget->getMarker( PreviewRuler::Start );
qint64 end = m_ui.rulerWidget->getMarker( PreviewRuler::Stop );
beg = beg < 0 ? 0 : beg;
Clip* part = new Clip( selectedMedia, beg, end );
//Adding the newly created clip to the media
selectedMedia->addClip( part );
return ;
}
......@@ -68,6 +68,7 @@ private slots:
void endReached();
void markerStartClicked();
void markerStopClicked();
void createNewClipFromMarkers();
};
#endif // PREVIEWWIDGET_H
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment