Public feed
#603498
Index: videowidget.cpp
===================================================================
--- videowidget.cpp (révision 683495)
+++ videowidget.cpp (copie de travail)
@@ -66,6 +66,13 @@
}
}
+void VideoWidget::requestScreenShot()
+{
+ K_D(VideoWidget);
+ if (k_ptr->backendObject())
+ BACKEND_CALL("requestScreenShot");
+}
+
void VideoWidgetPrivate::_k_cursorTimeout()
{
if (m_backendObject) {
@@ -157,6 +164,8 @@
if (pBACKEND_GET(int, cap, "overlayCapabilities")) {
q->setProperty("_k_overlayCapabilities", cap);
}
+
+ QObject::connect(m_backendObject, SIGNAL(screenShotReady(const QImage&)), q, SIGNAL(screenShotReady(const QImage&)));
}
/*
Index: videowidget.h
===================================================================
--- videowidget.h (révision 683495)
+++ videowidget.h (copie de travail)
@@ -158,6 +158,19 @@
void setAspectRatio(AspectRatio);
void setScaleMode(ScaleMode);
+
+ /**
+ * Tells the backend to takes a video screenshot. When the screenshot
+ * is ready signal screenShotReady(const QImage&) is emitted.
+ */
+ void requestScreenShot();
+
+ Q_SIGNALS:
+ /**
+ * This signal is emitted when a video screenShot has been made.
+ * Be aware that the image can be null.
+ */
+ void screenShotReady(const QImage&);
protected:
/**