[vlmc-devel] Timeline.cpp: Register ThumbnailImageProvider

Yikai Lu git at videolan.org
Tue Aug 16 03:37:06 CEST 2016


vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Mon Aug 15 20:24:20 2016 -0500| [8a723c910acf7a0f0fcde699b7e24b0015381fd3] | committer: Yikai Lu

Timeline.cpp: Register ThumbnailImageProvider

> https://code.videolan.org/videolan/vlmc/commit/8a723c910acf7a0f0fcde699b7e24b0015381fd3
---

 src/Gui/timeline/Timeline.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/Gui/timeline/Timeline.cpp b/src/Gui/timeline/Timeline.cpp
index 5f8901d..62b4f68 100644
--- a/src/Gui/timeline/Timeline.cpp
+++ b/src/Gui/timeline/Timeline.cpp
@@ -30,6 +30,8 @@
 #include "Workflow/MainWorkflow.h"
 #include "Gui/MainWindow.h"
 #include "Gui/effectsengine/EffectStack.h"
+#include "ThumbnailImageProvider.h"
+
 #include <QtQuick/QQuickView>
 #include <QtQml/QQmlContext>
 #include <QUrl>
@@ -41,6 +43,9 @@ Timeline::Timeline( MainWindow* parent )
 {
     m_container->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
     m_container->setFocusPolicy( Qt::TabFocus );
+    auto p = new ThumbnailImageProvider;
+    m_view->engine()->addImageProvider( QStringLiteral( "thumbnail" ), p );
+    m_view->rootContext()->setContextProperty( QStringLiteral( "thumbnailProvider" ), p );
     m_view->rootContext()->setContextProperty( QStringLiteral( "mainwindow" ), parent );
     m_view->rootContext()->setContextProperty( QStringLiteral( "workflow" ), Core::instance()->workflow() );
     m_view->setSource( QUrl( QStringLiteral( "qrc:/QML/main.qml" ) ) );



More information about the Vlmc-devel mailing list