23 Q_PROPERTY(
bool active READ isActive WRITE setActive NOTIFY activeChanged)
24 Q_PROPERTY(QScreen *screen READ screen WRITE setScreen NOTIFY screenChanged)
25 Q_PROPERTY(Error error READ error NOTIFY errorChanged)
26 Q_PROPERTY(QString errorString READ errorString NOTIFY errorChanged)
32 CapturingNotSupported = 2,
38 explicit QScreenCapture(QObject *parent =
nullptr);
39 ~QScreenCapture() override;
41 QMediaCaptureSession *captureSession()
const;
43 void setScreen(QScreen *screen);
44 QScreen *screen()
const;
46 bool isActive()
const;
49 QString errorString()
const;
52 void setActive(
bool active);
53 void start() { setActive(
true); }
54 void stop() { setActive(
false); }
57 void activeChanged(
bool);
59 void screenChanged(QScreen *);
60 void errorOccurred(QScreenCapture::Error error,
const QString &errorString);
63 void setCaptureSession(QMediaCaptureSession *captureSession);
64 QPlatformSurfaceCapture *platformScreenCapture()
const;
65 friend class QMediaCaptureSession;
66 Q_DISABLE_COPY(QScreenCapture)
67 Q_DECLARE_PRIVATE(QScreenCapture)